Very Urgent

Discussion in 'PHP' started by snayak82, May 18, 2010.

  1. #1
    Hi All I am new to Php .If Anyone can help with my query .

    How can i pass a parameter to another php form one php without submitting the form .
     
    snayak82, May 18, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Use AJAX to do that.
     
    s_ruben, May 19, 2010 IP
  3. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Ajax + XML Solves that!
     
    roopajyothi, May 19, 2010 IP
  4. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #4
    API also.. ^_^
     
    bartolay13, May 19, 2010 IP
  5. friendishan

    friendishan Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ajax would be a good choice.
     
    friendishan, May 19, 2010 IP
  6. abstractworld

    abstractworld Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you only want to submit the form without pressing the submit button..if this is the case.. you can call form.submit() in js on any event...
     
    abstractworld, May 19, 2010 IP
  7. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #7
    ^^ without submitting... :D

    you can use simple js like
    
    <script type="text/javascript">
    function copy_to_form2(input) {
       var form2 = document.forms['form2'];
       form2.elements['input2'].value = input.value;
       // or form2.input2.value = input.value;
    }
    </script>
    <form action="" name="form1">
    <input type="text" name="input1" onblur="copy_to_form2(this);" />
    </form>
    
    <form action="" name="form2">
    <input type="text" name="input2" />
    </form>
    
    Code (markup):
     
    gapz101, May 20, 2010 IP