shadow02
Programmer
- Apr 12, 2004
- 14
Ok, in my efforts to use the posts on here to solve my problem, I have gone mad and have resorted to a post. I am very good at VB and getting good at VB script but my first attempt at using javascript is, well, yeah you know.
Basically I am trying to have multiple search buttons on one page and each button will force a submit. Now have played around with the code and managed to get rid of the errors, the code actually does work. Each button will go to a different form. Yet when I use the Request(string) in my vbscript, nothing happens. Why because the URL does not have the data like a normal submit.
So what am I missing. Obviously something has to add the data to the URL.
<SCRIPT LANGUAGE="JavaScript">
function fncDepartment()
{
// alter the action and submit the form
document.Form1.action = "search_result_dep.asp";
document.Form1.submit();
}
function fncTitle()
{
// alter the action and submit the form
document.Form1.action = "search_result_title.asp";
document.Form1.submit();
}
</SCRIPT>
<FORM NAME="Form1">
<input type="submit" value="Show" ONCLICK="fncDepartment();"><BR>
<input type="submit" value="Show" ONCLICK="fncTitle();"><BR>
</FORM>
I would appreciate anyones help on this.
Shadow
Basically I am trying to have multiple search buttons on one page and each button will force a submit. Now have played around with the code and managed to get rid of the errors, the code actually does work. Each button will go to a different form. Yet when I use the Request(string) in my vbscript, nothing happens. Why because the URL does not have the data like a normal submit.
So what am I missing. Obviously something has to add the data to the URL.
<SCRIPT LANGUAGE="JavaScript">
function fncDepartment()
{
// alter the action and submit the form
document.Form1.action = "search_result_dep.asp";
document.Form1.submit();
}
function fncTitle()
{
// alter the action and submit the form
document.Form1.action = "search_result_title.asp";
document.Form1.submit();
}
</SCRIPT>
<FORM NAME="Form1">
<input type="submit" value="Show" ONCLICK="fncDepartment();"><BR>
<input type="submit" value="Show" ONCLICK="fncTitle();"><BR>
</FORM>
I would appreciate anyones help on this.
Shadow