|
| |
|
|
jeffmetcalf
Posts: 186 Joined: 3/16/2002 From: Status: offline
|
Help with a paramaterized popup - 5/18/2007 12:30:47
This piece of code runs fine:
<a href="#" onClick="MyWindow=window.open('partslabor.asp','MyWindow','toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=300'); return false;">Labor and Materials</a>
<i><font color="#CC0000" size="1">(popups must be allowed for this site)</font></i> This little piece of code does not:
<a href="#" onClick="MyWindow=window.open('partslabor.asp?CALLNBR=<%=FP_FieldURL(fp_rs,"CALLNBR")%>','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=300'); return false;">Labor and Materials</a>
<i><font color="#CC0000" size="1">(popups must be allowed for this site)</font></i>
That gets Microsoft VBScript runtime error '800a000d' Type mismatch: 'rs' /mycplus/_fpclass/fpdblib.inc, line 48 Or is there a way to change the default way this will open: <a target="_blank" href="partslabor.asp?CALLNBR=<%=FP_FieldURL(fp_rs,"CALLNBR")%>"> Thanks in advance.
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Help with a paramaterized popup - 5/18/2007 13:42:58
I would put the opening a new window portion in a separate function in the head of the document, ie: <script type="text/javascript"> function popIt(url,winName) { ref = window.open(url,winName,"'toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=300") ref.focus(); } </script> Then this: <a target="_blank" href="partslabor.asp?CALLNBR=<%=FP_FieldURL(fp_rs,"CALLNBR")%>"> becomes this: <a target="whatever" href="partslabor.asp?CALLNBR=<%=FP_FieldURL(fp_rs,"CALLNBR")%>" onclick="popIt(this,'newWin');return false;"> See if that works for you.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|