|
how can I get this thing to work?
function screening() {
if ((document.theform.previouslycalled.value =="no") && (document.theform.olderthan18.value =="yes") && (document.theform.painwithtreatment.value =="yes'))
parent.location="/forum/fork.htm";
else {
parent.location="/forum/spoon.htm";
}
}
I am calling this function from another page.
<input type="submit" name="Submit" value="Next" onClick="screening()">
I import it to this page like this:
<script src="/forum/screening.js"></script>
Any ideas would be very helpful.
Thanks
G
|
|
|
Hi I updated the code:
// JavaScript Document
function screening() {
if((parent.document.theform.previouslycalled.value=='no')&&(parent.document.theform.olderthan18.value=='yes')&&(parent.document.theform.painwithtreatment.value=='yes')&&(parent.document.theform.painfrequency.checked!='never')) {
parent.location="/forum/fork.htm";
}
else {
parent.location="/forum/spoon.htm";
}
}
But now what happens is that the user is not going to either page (spoon.htm or fork.htm) but instead the original page reloads. Why is this happening?
I look forward to your response
Thanks
|
|
|
|
|
|
|
|