codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  If the user selects certain items from the form  BSM at 01:43 on Monday, October 27, 2003
 

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

  Re: If the user selects certain items from the form  BSM at 03:46 on Monday, October 27, 2003
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Header Frame ?
•  Re: Adhyayan - Annual Student Conference and Online Coding Festival
•  Re: calling C# from javascript
•  Re: Gidview row disable
•  Re: Knowing how to get TaylorMade R11 Irons
•  Re: refresh parent after closing pop up window
•  TaylorMade RocketBallz RBZ Driver will travel long and low
•  Supposedly the TaylorMade R11 Irons are supposed
•  TaylorMade R11s Fairway Wood


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012