hi there,
the problem ive got is that i have two forms (one at the top and one at the bottom) which do the same thing.
would just like to know how i could differentiate between the two forms. as in which form has been submitted.
at the moment the function i have is:
function goThere(){
if (document.myForm_bottom.botttom) {
thisPage = document.myForm_bottom.ipag.value
thisForm = document.myForm_bottom
}else{
thisPage = document.myForm_top.ipag.value
thisForm = document.myForm_top
}
start = <%=firstPage%>
finish = <%=iPageCount%>
isGood = true
if ((isNaN(thisPage)) || thisPage == ""{
isGood = false
}
else{
thisPage = parseInt(thisPage)
if (thisPage > finish || thisPage < start){
isGood = false
}
}
if (!isGood){
alert("Please enter a valid number between " + start + " and " + finish)
thisPage=""; thisForm.ipag.focus();
}
else{
document.location = "searchresults.asp?<%=query%>&ipag=" + thisPage
}
}
but this only looks at the top form. i have tried at the top of the function to find which button has been clicked.
any help would be appreciated
cheers in advance
Storm
the problem ive got is that i have two forms (one at the top and one at the bottom) which do the same thing.
would just like to know how i could differentiate between the two forms. as in which form has been submitted.
at the moment the function i have is:
function goThere(){
if (document.myForm_bottom.botttom) {
thisPage = document.myForm_bottom.ipag.value
thisForm = document.myForm_bottom
}else{
thisPage = document.myForm_top.ipag.value
thisForm = document.myForm_top
}
start = <%=firstPage%>
finish = <%=iPageCount%>
isGood = true
if ((isNaN(thisPage)) || thisPage == ""{
isGood = false
}
else{
thisPage = parseInt(thisPage)
if (thisPage > finish || thisPage < start){
isGood = false
}
}
if (!isGood){
alert("Please enter a valid number between " + start + " and " + finish)
thisPage=""; thisForm.ipag.focus();
}
else{
document.location = "searchresults.asp?<%=query%>&ipag=" + thisPage
}
}
but this only looks at the top form. i have tried at the top of the function to find which button has been clicked.
any help would be appreciated
cheers in advance
Storm