Javascript Opens new window but Variable is not pa

Results 1 to 3 of 3

Thread: Javascript Opens new window but Variable is not pa

  1. #1
    David Highlander Guest

    Default Javascript Opens new window but Variable is not pa

    Can somoene who knows both javascript and ASP help me with this one? <BR><BR>I have on one page this: (It opens up a new window and is supposed to pass an ID variable)<BR><BR>&#060;script LANGUAGE="JavaScript"&#062;<BR>function SomeFunctionName(ID) {<BR> winname="New"<BR> msgWin ="tasks/taskdetails.asp?"+ID,winname,"width=300,height=225 ,resizable=yes,scrollbars=yes");<BR> if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) &#062;= 3)<BR> { msgWin.focus(); }<BR> if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) &#062;= 3)<BR> { msgWin.focus(); }<BR> }<BR>&#060;/script&#062;<BR><BR>This is the code in my body that initiates the script:<BR>&#060;a href="javascript:SomeFunctionName(&#060;%=RS1("ID" )%&#062;);"&#062;Link&#060;/a&#062;<BR><BR>Ok the problem is the new window opens but the ID variable does not pass? I think the variable is passing but I do not know how to grab it because of the Javascript. I usually use:<BR>recordID = TRIM( Request("id") )<BR>but that isn&#039t working.<BR><BR>Any thoughts on how I can grab the variable?

  2. #2
    Join Date
    Dec 1969

    Default RE: Javascript Opens new window but Variable is no

    your problem is you need to name your querystring values that you pass. Your code should look like this.<BR><BR>msgWin ="tasks/taskdetails.asp?ID="+ID,winname,"width=300,height= 225,resizable=yes,scrollbars=yes");<BR>

  3. #3
    David Highlander Guest

    Default **** TYPOS. LOL - Thanks man.

    I would have never seen that typo. I appreciate the extra set of eyes.

Posting Permissions

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