Jump to content

passing array in url


phpme1221

Recommended Posts

  • Replies 62
  • Created
  • Last Reply

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>

 

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

 

 

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 ?

Archived

This topic is now archived and is closed to further replies.

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