Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script for forms in different documents

Status
Not open for further replies.

morechocolate

Technical User
Apr 5, 2001
225
US
I have about 5 forms which are in their own ASP documents. What I would like to do is write a script that takes some action based on the name of the form.

Example:
Say I have
page1.asp with form named form1
page2.asp with form named form2

in page3.asp I want to set up routines for the page1.asp and page2.asp, but I am not sure how to reference the form names in page3.asp. I want to say select case form1 do this case form2 do that.


I know that document.form1 can be done within the same document as the form, but I am not sure how to reference the name when the form is contained within another document than the script.

Thanks for your help in advance.

Pam
 
I need to add something to my example. For both forms the action would be the same. Thus action=update.asp.

The update.asp page would do something different for each of the forms.

Thanks
 
Thank God...I think I know what to do.

If I put use type of hidden in the form and set the value to the name of the form, I think that will do what I want.

Any feedback is appreciated.


Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top