
sungpeng
Members-
Posts
290 -
Joined
-
Last visited
Everything posted by sungpeng
-
$sql = mysql_query("SELECT * FROM database where id=$id") while($do=mysql_fetch_array($sql)){ There are many rows that have the same id numbers. I need all to fetch out. Mysql error. Is it possible to echo out all ?
-
Is there a shorter line for day = 1 to 4 instead of day=1 or day=2 or day=3 or day=4 ?
-
$.ajax({ success:function(html){ $('#msg').html(html); } }); <p id="msg"></p> Is it possible to extract the id="msg" results and put it in php variable or html for further command ?
-
small box at the side of input form show result fetched
sungpeng replied to sungpeng's topic in Javascript Help
How to fetch the data from another php page ? <script> $( "#search" ).autocomplete({ source: availableTags }); </script> <input type="text" id="search"> -
No not working also. <script type='text/javascript'> $(window).load(function(){ $('input[name="searchbox"]').on('change', function() { var val = $(this).val(), var dataString='varal='+ val; alert (dataString); }); }); <input type="text" name="searchbox">
-
small box at the side of input form show result fetched
sungpeng replied to sungpeng's topic in Javascript Help
Like key wording in www.google.com, we haven't completely key in the sentence there is always a dropdown box show the results before we press the search button. -
Is it possible to change it to a search box text instead of a checkbox ? It seemed not working. $(window).load(function(){ $('input[name="searchbox"]').on('change', function() { var val = $(this).val(), var dataString='var='+ val; alert ('dataString'); <input type="text" name="searchbox">
-
small box at the side of input form show result fetched
sungpeng replied to sungpeng's topic in Javascript Help
First an input box form. When key in the letter, it will search the database and fetch result in a small dialogue box beside the input box. The result fetched is not display on the page itself but a small rectangle box beside the input box form. I need the small rectangle box. Like if you key in the input box on some page, some data will appear on a small pop up box of your past data that you have key in somewhere. -
Hi I need a input box, and whenever i key in a letter in it will read the database and fetch result in a small dialogue box beside the form. The dialogue box will disappear if nothing is key in. Can someone help ?
-
thank you
-
I wish to add some text after the current string data in sale. Concat not working is there any problem with this code ? $title="addtext"; $update_status=mysql_query("update product set sale=CONCAT(sale,$title) ");
-
Solved Thank you. One question my friend told me to use html 5 instead of ajax as html 5 all browsers can support while ajax some browsers can't. Is it true ?
-
If i never put in the while loop, it works fine. But once in the while loop, click on the checkbox has no reaction. while($doing=mysql_fetch_array($sqlq)){ <input type='checkbox' name='checking[]' value='<?php echo $doing["pid"]; ?>' > }
-
I successfully send the checkboxValue to the checking1.php page but for the isCheckboxChecked, how am i going to send it over to checking1.php as well ? If i echo the $results at checking1.php they will give me an Array wording output. var dataString='sendcheck='+ checkboxValue;
-
Got the alert box working already but isCheckboxChecked value can't send over to checking1.php, any problem with ajax coding ? $.ajax({ type:"post", url:"checking1.php", data:dataString, cache:false, });
-
i got it. Thank you.
-
Not working also, the alert box never pop up as well. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> <script type="text/javascript"> $('input[name="checking"]').on('change', function() { var checkboxValue= $(this).val(), isCheckboxChecked = $(this).is(':checked') ? 'yes' : 'no'; alert (checkboxValue); $.ajax({ type:"post", url:"checking1.php", data:dataString, }); } </script> <input type='checkbox' name='checking' value='90' />
-
Being trying but don't seem to work. $('input[name="checking[]"]').on('change', function() { var checkboxValue = $(this).val(), isCheckboxChecked = $(this).is(':checked') ? 'yes' : 'no'; alert (isCheckboxChecked); $.ajax({ code here }); } <input type='checkbox' id='checking[]' value='4' onchange='chk(this.value)' />
-
How can i pass the "checked or not checked" with the "value" to ajax together ? $(document).ready(function(){ if ($(this).is(':not(:checked)')){ var checkboxValue = $(this).val(); $.ajax({ type:"post", url:"checking1.php", }); } <input type='checkbox' id='tickcheck' value='4' onchange='chk(this.value)' />
-
Follow up question is if number 2 is checked and number 1 is unchecked, can i bring the variable checked and unchecked to ajax to process ?
-
Thank You
-
http://forums.phpfreaks.com/topic/298242-php-ajax-loop-array-send-data/ I need to send data from PHP mysql loop to ajax using "form" onchange event. Can anyone help. Please follow the link.
-
It always send value 1 <input type='checkbox' id='checking[]' value='1' onchange='chk()' /> I need it to send value 2 etc if i click on value 2 checkbox using php loop to define value. <input type='checkbox' id='checking[]' value='2' onchange='chk()' />