I modified an Open Window function I found in the FAQs, but I can't get the ID value to pass into the function so the right page will open.
<SCRIPT LANGUAGE="JavaScript">
function MyPopUpWin(txtID) {
var iMyWidth;
var iMyHeight;
//half the screen width minus half the new window width (plus 5 pixel borders).
iMyWidth = (window.screen.width/2) - (320 + 10);
//half the screen height minus half the new window height (plus title and status bars).
iMyHeight = (window.screen.height/2) - (412 + 50);
//Open the window.
var win2 = window.open('flyer.asp?id= + txtID','Flyer','status=no,height=825,width=640,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no');
win2.focus();
}
</SCRIPT>
This is the link that should pass the
<a href="javascript:MyPopUpWin(<%= oRS.Fields(0).Value %>)">View Flyer1</a>
When I mouseover the link the right correct ID shows up in MyPopUpWin(id).
How can I pass the oRS.Fields(0).Value to my ?ID=txtID
<SCRIPT LANGUAGE="JavaScript">
function MyPopUpWin(txtID) {
var iMyWidth;
var iMyHeight;
//half the screen width minus half the new window width (plus 5 pixel borders).
iMyWidth = (window.screen.width/2) - (320 + 10);
//half the screen height minus half the new window height (plus title and status bars).
iMyHeight = (window.screen.height/2) - (412 + 50);
//Open the window.
var win2 = window.open('flyer.asp?id= + txtID','Flyer','status=no,height=825,width=640,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no');
win2.focus();
}
</SCRIPT>
This is the link that should pass the
<a href="javascript:MyPopUpWin(<%= oRS.Fields(0).Value %>)">View Flyer1</a>
When I mouseover the link the right correct ID shows up in MyPopUpWin(id).
How can I pass the oRS.Fields(0).Value to my ?ID=txtID