Ask a Question related to Dreamweaver AppDev, Design and Development.
-
-D- #1
javascript check form question
I have the following function to check a form:
function Search_Form_Check(form) {
if (document.reviewsearch.AY.value == "" &&
document.reviewsearch.ddomenu.value == "" &&
document.reviewsearch.reqname.value == "" && document.reviewsearch.dt.value ==
"" && document.reviewsearch.status.value == "" &&
document.reviewsearch.abrid.value == "")
{
alert ("Please select at least one search criteria.");
return(false);
}
return(true);
}
I have two submit buttons:
<input name="Submit" type="submit" id="Submit" value="Search">
<input type="submit" name="Submit" value="My Reviews">
When the user clicks the submit button with the value "Search" I want to run
the form check function.
When the user clicks the submit button value "My Reviews" I want to bypass
running the function and just submit the page.
How can I ammend the function to run only when the submit button value is
"Search"?
Thanks,
-D-
-D- Guest
-
AI CS Javascript: Check if a textFrame is filled / stroked?
Hi, for a pathItem, i can check if it is filled by using the "filled" attribute. However, for... -
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed... -
How to check whether client browser is JAVASCRIPT, COOKIES enabled and supports 128 bit encryption
DON'T MULTIPOST. Ray at work "Jagan" <jaganmohan.thota@hyd.cognizant.com> wrote in message... -
Adobe Acrobat 5: Javascript question: How do I create a text form that...
I recently came across a pdf file, its a regular page with forms. Nothing fancy I guess. However, the forms were set so that when you place your... -
Where is my Check Form
"frozinorth" wrote: Sometimes you need to make sure that you have the correct browser audience selected. If you are showing available behaviours... -
jman25 #2
Re: javascript check form question
Try this:
In your form tag if you have an onsubmit function, get rid of it and try the
code below in your button elements.
<input name="Submit" type="submit" id="Submit" value="Search"
onclick='Search_Form_Check(this.form)'>
<input type="submit" name="Submit" value="My Reviews">
When the search button is clicked the function will be ran, and when the other
button is pressed it will not.
jman25 Guest



Reply With Quote

