window.navigate troubles

Results 1 to 7 of 7

Thread: window.navigate troubles

  1. #1
    Java Man Guest

    Default window.navigate troubles

    I&#039;m using the following code to navigate within a switch statement, but keep getting errors-Page cannot be found<BR>Any input would be appreciated.<BR>window.navigate("Toppings.asp?Prod uct=" & prod & "&Name=" & name & "&Desc=" & desc & "&Size=" & size & "&Price=" & price & "&ToppingName=panLARGE");

  2. #2
    sydney bechet Guest

    Default man!

    that example was making me hungry!<BR><BR>i&#039;ll have mushrooms, olives, sausage, and pepperoni, please

  3. #3
    java man Guest

    Default RE: man!

    found out the problem isn&#039;t the window.navigate method- it&#039;s all the variables in the querystring, because the page moves fine without them. See any errors in the string itself?

  4. #4
    australopithecus man Guest

    Default don't see any obvious error

    just kidding, this is sydney bechet - couldn&#039;t pass up the anthopological references though<BR><BR>i don&#039;t see anything wrong with your querystring<BR><BR>but just for giggles, try using "+" instead of "&" to concatenate the variable values in your string<BR><BR>if that doesn&#039;t work, eliminate one querystring name/value pair at a time until you find out who is causing the error

  5. #5
    java man Guest

    Default RE: don't see any obvious error

    tried what you said-I think the problem is getting the variables into the switch statement. The string works fine when it&#039;s hard coded, but chokes on the variables-case 1 works, case 2 doesn&#039;t.<BR><BR> function check_onClick(prod, name, desc, size, price)<BR> {<BR> switch(parseInt(prod))<BR> {<BR> case 1:<BR> window.navigate("Toppings.asp?Product=1&Name=PIZZA &Desc=&Size=SMALL&Price=5.99&ToppingName=pSMALL"); <BR> break;<BR> case 2:<BR> window.navigate("Toppings.asp?Product=" & prod & "&Name=" & name & "&Desc=" & desc & "&Size=" & size & "&Price=" & price & "ToppingName=pMEDIUM");<BR> break;

  6. #6
    sydney bechet Guest

    Default freaking wierd!

    to make sure you&#039;re getting valid data from those variables, try doing an "alert" to see what the variables are holding<BR><BR>e.g. ...<BR><BR>alert("prod = " + prod + "; name = " + name); //etc.

  7. #7
    JAVA MAN Guest

    Default RE: freaking wierd!

    It seems to be working now-could have been the + instead of &&#039;s, didn&#039;t do much the first time I changed it-may have missed one- thanks for the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts