Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
how to call two cgi programs by submitting one form
Old 08-25-2009, 01:05 PM how to call two cgi programs by submitting one form
Novice Talker

Posts: 10
Trades: 0
Hi, how to call two cgi programs by submitting one form. One cgi displays on the left side. The other cgi displays on the right side. I tried the following, it didn't work.

Code:
function checknum(myform) {
      myform.action = "suggestLeft.cgi";
      checknum_right();
      return true;
}

function checknum_right() {
      document.myformright.target = "lowright";
      document.myformright.action = "suggestRight.cgi";
      return true;
    
}

.....

<form method="get" name="myform" target="lowleft" onSubmit="return checknum(this)">
<input type="text" name="word" value="" size="30">&nbsp;
<input type="submit" value="Submit">&nbsp;
<input type="reset">
</form>

<form name="myformright" target="lowright" onSubmit="return checknum_right()">
</form>
Thanks for any suggest!!
hpdp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2009, 02:30 PM Re: how to call two cgi programs by submitting one form
prasanthmj's Avatar
Experienced Talker

Posts: 42
Name: Prasanth
Trades: 0
Create two iframes one for left and one on the right side. give name to the iframe.
Code:
   <iframe name='k3' frameborder='0' width='100%' height='527'>
   </iframe>
    <iframe name='k4' frameborder='0' width='100%' height='527'>
    </iframe>
Add a button or link whose onclick is handled using JavaScript.

Code:
<a onclick='javascript: submitTest();'>Submit</a>


<script language='JavaScript' type='text/javascript'>

    function submitTest() {
     document.myform.action = "action1.php";
      document.myform.target='k3';
      document.myform.submit();
      document.myform.action = "action2.php";
      document.myform.target='k4';
      document.myform.submit();
      
      return false;
    }

   </script>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
prasanthmj is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how to call two cgi programs by submitting one form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17849 seconds with 12 queries