Dalsor
12-14-2002, 11:16 PM
Greetings,
I'm re-tooling the pages for the ISP I work for, and in the process of doing so, adding a bunch of user helps. Part of these helps is to explain what dial-up modems, DSL modems, etc., are, what they look like, where to plug the lines in ... you get the idea. I thought the best way to do this would be with a combination of text and optional pop up pictures. Read the text, click the link for a picture in a pop up window kinda deal.
The initial pop-up from the main page (click here for more extensive help) works fine. It opens the help window. Within the newly created help window there are subsets of links which use the same javascript code to pop up another window with a picture in it. Though the script will open the new help window fine, it will not open a new window from the help window. The window with the picture always opens in the help window.
I hope I'm making sense. :D
Here's how I'm doing it.
Here is the script used throughout each page. This same script is in the head tags of every page, including the help pages.
Header comments trimmed for space... It's from Dynamic Drive.
<script type="text/javascript">
var win = null;
function helpPopWindow(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
Big main window (index.shtml).
<a href="hlp/netHlp.shtml" onclick="helpPopWindow(this.href,'Internet Help','650','550','yes'); return false">?</a>
When that link is clicked, the help window (netHelp.shtml) is loaded as a pop up. That works fine.
Within the pop up window there are several links, such as...
click <a href="modemAngle.jpg" onclick="helpPopWindow(this.href,'Internal Modem Angle View','360','270','yes'); return false">here
for an angled view</a> of an internal dial-up modem
But when this link is clicked, the image opens in the help window, and not in a new window. I thought it might have something to do with calling an image instead of a new document, but even placing the image in a document and calling the document through the href ends with the same result.
Can anyone see what I might be doing wrong?
Sorry for the formatting. :o
Thanks!
I'm re-tooling the pages for the ISP I work for, and in the process of doing so, adding a bunch of user helps. Part of these helps is to explain what dial-up modems, DSL modems, etc., are, what they look like, where to plug the lines in ... you get the idea. I thought the best way to do this would be with a combination of text and optional pop up pictures. Read the text, click the link for a picture in a pop up window kinda deal.
The initial pop-up from the main page (click here for more extensive help) works fine. It opens the help window. Within the newly created help window there are subsets of links which use the same javascript code to pop up another window with a picture in it. Though the script will open the new help window fine, it will not open a new window from the help window. The window with the picture always opens in the help window.
I hope I'm making sense. :D
Here's how I'm doing it.
Here is the script used throughout each page. This same script is in the head tags of every page, including the help pages.
Header comments trimmed for space... It's from Dynamic Drive.
<script type="text/javascript">
var win = null;
function helpPopWindow(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
Big main window (index.shtml).
<a href="hlp/netHlp.shtml" onclick="helpPopWindow(this.href,'Internet Help','650','550','yes'); return false">?</a>
When that link is clicked, the help window (netHelp.shtml) is loaded as a pop up. That works fine.
Within the pop up window there are several links, such as...
click <a href="modemAngle.jpg" onclick="helpPopWindow(this.href,'Internal Modem Angle View','360','270','yes'); return false">here
for an angled view</a> of an internal dial-up modem
But when this link is clicked, the image opens in the help window, and not in a new window. I thought it might have something to do with calling an image instead of a new document, but even placing the image in a document and calling the document through the href ends with the same result.
Can anyone see what I might be doing wrong?
Sorry for the formatting. :o
Thanks!