Jump to content

passing array in url


phpme1221

Recommended Posts

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

what that function does is, when called, submits the 3 forms that are specified in the function scope..

 

function submitForms() 
{ 
this.document.form1.submit(); 
this.document.form2.submit(); 
this.document.form3.submit(); 
} 

 

you would replace, form1, form2, form3 with the names of your forms...

so if you had a form like so..

<form name="test_form" action="#" >

the function would be

function submitForms() 
{ 
document.test_form.submit();  // add as many as you want really
}

then you can make a button that will call the function to submit all of the forms..

<button onlclick="submitForms()">Submit</button>

 

Link to comment
Share on other sites

Hi Aykay,

 

Thanks again, again we dont know # of forms this will generate, a user can have 1 server to register or 10 server to register.  Whats really confusing in the after th foreach;  there is only 1 <form tag so there is only 1 name but if you run the function you mention in you last poist there are 3 different form names to consider but i have only 1, even though it appears as more depending on amount a servers onwned by the user passed in the url

 

 

Link to comment
Share on other sites

Thanks aykay, what should be in the form, so that the js code can use to reference?  keep in mind this is an unknown array of servers. thanks 

<form name = ? or value = ?

<input type='submit' name='entdb' value='Register' >

</form>";

 

should it be a type = submit or type = button ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • 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.