ashutoash
Members-
Posts
26 -
Joined
-
Last visited
Never
Everything posted by ashutoash
-
I tried the following code...but it doesn't seem to work. I dont know how to exactly incorporate it. I know where to put it meaning it in terms of styling, using play pause buttons on click events but just want help with the player. <object width="60" height="20" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"> <param value="OOMBACKGROUND.swf" name="movie"> <param value="high" name="quality"> <embed width="60" height="20" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="OOMBACKGROUND.swf"> </object>
-
Can anyone point me to proper examples or code snippets that can help me add background music to my website. It can be flash enabled or jquery based. I looked at many jquery based examples but some play mp3's some dont. So just want to make something flash enabled. HELP!!!! :facewall:
-
I am stuck at creating a play/pause adobe enabled music player for my website. I tried jquery players and all but I want Adobe enabled player that can play playlists. Can anyone point me to proper tutorials or code examples that can help me get this?
-
Thanks. I used both and could not even tell if there was time difference.
-
I am trying to display rows starting with a specific tag when using fgetcsv() like rows starting with tag SY or AP where the first element of each such rows would have SY or AP has prefix example SY-Atlanta, SY-Texas, AP-Atlanta, AP-texas. The next columns in that row would have some data. I want to display only rows with above said prefix. What is the best way to do it? Use preg_match for each row and display it only if it has a match or is there any easier way? Sample data in csv: SY-Atlanta,0,0,0,5,9,9,0 SY-Texas,0,5,8,0,0,8.4 AP-Atlanta,9,4,8,9,0,0,0 AP-Texas,8,0,9,0,0,0,0 DF-Atlanta,8,4,9,3,0,0,0,0 DF-Texas,8,4,9,0,0,0,0,0
-
@the182guy....can you share an example?
-
I am using jquery .change function to perform an operation when a month is selected from a drop down menu. The change works but I am unable to update the value of the drop down menu with the updated month. My drop down shows the starting value as default even on change. Can anyone help. Following is the code snippet that does change and then the drop down menu form. $("#monthName").change(function() { alert($("#monthName").val()); if ($("#post").val() == 1) { $("#monthselect").submit(); } }); <form id="monthselect" action="<?=$_SERVER['PHP_SELF']?>" method="get"> <input id="post" type="hidden" name="post" value="1"> <label>SELECT MONTH</label> <select id="monthName" name="monthName"> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> </form> Even after the change, January shows up by default even if I select say June or July. I tried something like following but did not work. $("#monthName option[value=" + $("#monthName").val() +"]").attr("selected","selected") ;
-
That worked...thanks xyph :D
-
do you need a code snippet...here is some: $getSite = "SELECT * FROM orderTable WHERE siteName = 'Atlanta' ORDER BY siteName"; $getSiteResults = $getData->db->getLocalQuery($getSite); foreach($getSiteResults as $site) { $result = $site["placeName"]; } I am getting data...that's fine but at some instances it throws the warning PHP Warning: Invalid argument supplied for foreach(). I read online that using @ will suppress these errors...but for me it does not.
-
I use PHP's PDO extensively for data grabbing and inserting. When I am selecting data, the return is a PHP PDO object which in itself contains select statements. So I use foreach to parse through the object and build a table. For cells which I have data it's fine but for cells which do not get any data meaning that have no entry in the db, php throws out a error PHP Warning: Invalid argument supplied for foreach(). I tried using if(is_array) and also @ to suppress them but no luck :'( :'( :'(. Can anyone point me to the right direction for suppressing these errors/warnings!!
-
Thanks cunoodle2 and Jet4Fire. The errorcode thing did not work but I am doing a count of rows and if count == 0, I am displaying ND. . This is solved. But most of my PDO statments, if there is no data, give out a warning PHP Warning: Invalid argument supplied for foreach(). I read somewhere that @ can be used to suppress these but that doesn't work. How can I suppress these? Those warnings are filling up my logs like anything.
-
@cunoodle2: Here is what I am doing. Its a simple query: $result_download = $db->query("SELECT download_hits as total_hits from date1_dcerpc where time = 1314712800 "); I know there are no download_hits at 1314712800 as there is no entry for 1314712800 in the table so the return should be null. I want to know how to check if the PDO object returns null.
-
I want to see if the return value is NULL. Based on that I want to display a NO DATA label on my front end. But I am unable to do it. Hence this question.
-
I am using PDO to run query's and get data. How do I check if the PDO query returned a null value. I tried empty but that doesn't work because PDO array will always contain an SQL query. I want to check if the return value of that query is NULL :confused: . Help please.
-
I am trying to use breadcrumbs in my web page. I have come across jquery plugins which need the links to be defined before hand and then can be breadcrummed. I have links that are generated via ajax calls and I am looking into a way of breadcrumbing them some how and these links can be arbitrary but they do follow a lineage. Can someone point me to proper tutorials or blogs which can teach me breadcrumbing from scratch. I was looking at http://www.somethinghitme.com/projects/jCrumb/index.html?t=JCrumb%20Main and it did not help me much apart from the fact that there is a plugin that can do this. Thanks much in advance.
-
Never mind ...I figured it out. Thanks for you help.
-
I have given them unique values....but is there some thing wrong with my ajax part? Say if I am on a page now and have ploss checked, jitter checked and latency unchecked....the ajax call no matter what is only sending one value even if it's set otherwise and on refresh all the three are returned checked. Are there any ajax function like on refresh or on reload? $.ajax({ type: "GET", url: 'sessionVars.php?pl=' + $('#ploss').val() + '&jit=' + $('#jitter').val() + '&lat=' + $('#latency').val(), });
-
Yeah by default Packet Loss will be checked always and others vary according to check uncheck. Do you suggest that I give each of the checkboxes a unique value like 1,2,3 or something and check if those values are posted via Ajax?
-
@Fugix: When I alert the checkboxes, the value "on" is displayed and this is getting passed to the sessionVars page and the same thing is coming back to the main page.
-
Hi, I am trying to use PHP session variables with checkboxes. My page has 3 checkboxes and those display and hide data according to check and uncheck. This page automatically refreshes every 5 mins. I want to save the checkboxes session and let them be the same on refresh or reload. I am passing the values of the checkboxes that is (on or off) via ajax to another page so that I can get them back on the main page. No matter whatever I do, the boxes are always on. Help lease. Main page code: session_start(); /* Includes */ date_default_timezone_set("UTC"); include("include/SPDB.php"); //include("include/database.php"); if(!isset($_SESSION["PL"])) { $_SESSION["PL"] = $_GET["pl"]; } if(!isset($_SESSION["JIT"])) { $_SESSION["JIT"] = $_GET["jit"]; } if(!isset($_SESSION["LAT"])) { $_SESSION["LAT"] = $_GET["lat"]; } Div tag on this page: <div id="metricoptions"> <? if($_SESSION["PL"] == "on") echo "<input id=\"ploss\" type=\"checkbox\" name=\"metricoptions\" checked=\"checked\" />Packet Loss"; else echo "<input id=\"ploss\" type=\"checkbox\" name=\"metricoptions\" checked=\"checked\"/>Packet Loss"; if($_SESSION["JIT"] == "on") echo "<input id=\"jitter\" type=\"checkbox\" name=\"metricoptions\" checked=\"checked\" />Jitter"; else echo "<input id=\"jitter\" type=\"checkbox\" name=\"metricoptions\"/>Jitter"; if($_SESSION["LAT"] == "on") echo "<input id=\"latency\" type=\"checkbox\" name=\"metricoptions\" checked=\"checked\"/>Latency"; else echo "<input id=\"latency\" type=\"checkbox\" name=\"metricoptions\"/>Latency"; ?> </div> Ajax call on this page: $.ajax({ type: "GET", url: 'sessionVars.php?pl=' + $('#ploss').val() + '&jit=' + $('#jitter').val() + '&lat=' + $('#latency').val(), }); sessionVars page: session_start(); $_SESSION["PL"] = $_GET["pl"]; $_SESSION["JIT"] = $_GET["jit"]; $_SESSION["LAT"] = $_GET["lat"]; Also I use live click function for the checkboxes. Thanks. MOD EDIT: code tags added.
-
never mind...figured it out.
-
@Crayon: What would the expression be if I want to get the first element of the string?
-
Thanks Crayon...it worked ;)
-
@Abraca: I tried it, it doesn't work though!!!
-
All, I have a part of code where I get a string or numbers like (234,2345,4536,45,75657...). Can you guys help figure out how I can get the last element of that particular string..i.e., i want to echo 75657 to screen and the likes. The last number is not a fixed size one. It can be a n digit number. I tried using array_pop and end. But it did not work. Suggestion or code snippets please.