...

View Full Version : Over-riding Functions



nevfalath
01-18-2009, 03:44 AM
When I test certain codes on test pages, they work, but when I add them to my website, they don't. I am wondering if maybe certain functions are over-riding others?

In my coding I have more than 1 form, but I named them differently from one another.

For example:



<form name="forms" method="post" onSubmit="return check(this);">


and



<form name="form1" method="get" onSubmit="return LengthValidator(this)">


When I hit Submit, only one works. That is why I am thinking it may be over-riding the other function.

If there is a way to fix this, it would help solve a lot of my coding troubles that I have been coming across lately.

- Shannon -

ninnypants
01-18-2009, 04:19 AM
That's because submit buttons are specific to one form

nevfalath
01-20-2009, 10:52 PM
Oh I see.

Is there something else I can use that would work for more than one form?

I am trying to validate two forms when the user clicks Submit, and if both check out, the user may proceed.

- Shannon -

EDIT: I see that many people suggest using frames. I would really prefer not to do this. Others have suggested creating a form that submits all forms, however most suggested codes seem to be unsuccessful.

nevfalath
01-25-2009, 03:58 PM
Does anyone have any suggestions?

What I am trying to do is verify that all fields have been filled in, but also verify that the length of the password is between 6 and 20 characters. I have the coding for both, I just can not seem to have the submit button check both, because as previously informed, they only verify one function.

oesxyl
01-26-2009, 08:25 AM
Does anyone have any suggestions?

What I am trying to do is verify that all fields have been filled in, but also verify that the length of the password is between 6 and 20 characters. I have the coding for both, I just can not seem to have the submit button check both, because as previously informed, they only verify one function.
you can use another function to submit, same for all forms, form name to detect which form submit the data and call the apropriate function to check and validate.

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum