Results 1 to 2 of 2

Thread: window.location.href

  1. #1
    Join Date
    Dec 1969

    Default window.location.href

    In my program I am using following statement<BR>window.location.href="wodetail.asp?wo num="+ &#060;%=Request("wonum")%&#062; + "&comp=Complete%20WO"<BR><BR>here my page goes to wodetail page with the specified wonum.Code works fine as long as wonum is numeric.If wonum is a string the code fails and gives error message.For example if wonum=12345 then there is no error.But if my wonum=&#039;T12345&#039; then the error message I get is variable &#039;T12345&#039; is undefined.I guess it is treating the variable value as a variable when the value is string type.Any suggession on the syntax used above.<BR><BR>Thanks<BR>Kavita

  2. #2
    Join Date
    Dec 1969

    Default Not advanced, you know...

    You are doing yourself in by separating the &#060;%= stuff from the string. No reason to do so.<BR><BR>window.location.href="wodetail.asp?wonu m=&#060;%=Request("wonum")%&#062;&comp=Complete%20 WO"<BR><BR>Try the JS or regular ASP forums next time, if you would, please. (Besides, you would have gotten the answer faster there, I think.)<BR><BR>

Posting Permissions

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