Jump to content

sungpeng

Members
  • Posts

    290
  • Joined

  • Last visited

Posts posted by sungpeng

  1. function chk()
    {
    var name=document.getElementById('checking[]').value;
    var dataString='checking2='+ name;
    $.ajax({
    type:"post",
    url:"send-checking.php",
    
    while($doing=mysql_fetch_array($sqlq)){
    <input type='checkbox' id='checking[]' value='<?php echo $doing["pid"]; ?>' onchange='chk()' />

    It always send the first row value from $doing["pid"]; 

    I need it to send second, third or forth row if i click like the forth row of the check box.

     

    Can someone help ?
  2. if($x==""){

    $x=1;

    }

    <form name='Form' action='posting.php' method='post'>

    while($do=mysql_fetch_array($sql){

    <input type='checkbox' name='<?php print $x; ?>' value='<?php print $do[id]; ?>' />

    $x++;

    }

    <input type='submit' name='checked' value='checking'>

     

     Still the same problem

  3. if($x==""){

    $x=1;

    }

    while($do=mysql_fetch_array($sql){

    <form name='Form' action='posting.php' method='post'>

    <input type='checkbox' name='<?php print $x; ?>' value='<?php print $do[id]; ?>' />

    <input type='submit' name='checked' value='checking'>

    $x++;

    }

     

     

    When I click on the submit button, only one value of $x is sent to posting.php instead of multiple loop values in checkbox. Does anyone have a solution to it ?

     

    Under Posting.php

    for ($x 1$x <= 20$x++) {

    $x=$_POST[$x];

    echo "$x";

    }

  4. <form name="form" action="<?php print $PHP_SELF ?>" method="post">

    <textarea name="descript" rows="3" cols="30">

    <?php echo"$doing[intro]"; ?>

    </textarea><br><br>

    <input type="submit" name="intro" value="introduction"> key in your profile

    </form><br><br>

     

    <form name="form" action="<?php print $PHP_SELF ?>" method="post"><textarea name="descript" rows="3" cols="30"><?php echo"$doing[intro]"; ?></textarea><br><br><input type="submit" name="intro" value="introduction"> key in your profile</form><br><br>

     

     

    Is there a programme to make my code from multiple lines into one continuous straight line with no white space and paragraph ?

  5. function Ajax(){

    var xmlHttp;

    try{

    xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari

    }

    catch (e){

    try{

    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer

    }

    catch (e){

    try{

    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

    catch (e){

    alert("No AJAX!?");

    return false;

    }

    }

    }

     

    xmlHttp.onreadystatechange=function(){

    if(xmlHttp.readyState==4){

    document.getElementById('innerscroll3').innerHTML=xmlHttp.responseText;

     

    }

    }

    xmlHttp.open("GET","http://www.domain.org/chat3.php", true);

    xmlHttp.send(null);

    }

     

    </script>

    <br>

    <div id="innerscroll3"></div>

     

     

     

    function Ajaxa(){

    var xmlHttp;

    try{

    xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari

    }

    catch (e){

    try{

    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer

    }

    catch (e){

    try{

    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

    catch (e){

    alert("No AJAX!?");

    return false;

    }

    }

    }

     

    xmlHttp.onreadystatechange=function(){

    if(xmlHttp.readyState==4){

    document.getElementById('innerfetch').innerHTML=xmlHttp.responseText;

     

    }

    }

    xmlHttp.open("GET","http://www.domain.org/chat4.php",true);

    xmlHttp.send(null);

    }

     

     

    </script>

    <div id="innerfetch"></div>

     

    I have two ajax scripts on the same page. I got a result that only one is loaded and the other is not. How do i get two ajax to load on the same page ?

  6. var val = "<?php Print $_REQUEST[cpid]; ?>";

    The first attempt I clicked submit button the value passed to the function open_win.

    To my surprise the first time "val" return as 0 in value.

    The second attempt I clicked submit button the value of the first attempt is reflected out from "val"

    Please help..

  7. 
    <script>
    function open_win() 
    {
    window.open ("chats.php","mywindow","menubar=1,resizable=1,width=350,height=500");
    }
    </script>
    <form name="form" method="post" onsubmit="return open_win();">
    <select name="cpid">
    <option value="2">2</option>
    </select>
    <input type="submit" name="talk" value="Chat">
    </form>
    
    

     

    Please help. I can't get the value $_POST[cpid] from chats.php.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.