Click to See Complete Forum and Search --> : Link to two pages


fmfanuk
02-11-2003, 04:06 PM
Hi, I am new to java script and html coding and I am trying to link to two seperate links from one hyperlink. The links will be a PDF document and the other link will be a html pop-up in a sized window.

So when the PDF file opens a html popup opens in a condensed window at the same time.

The html pop-up link I believe should be something like this below?

<SCRIPT TYPE="text/javascript">

function custom()
{
window.open('http://www.fleetwoodmac-uk.com/flash1.html','',CONFIG='HEIGHT=290,WIDTH=405,TOOLBAR=no,MENUBAR=no,SCROLLBARS=no,RESIZABLE=no,LOCATI ON=no,DIRECTORIES=no,STATUS=yes')
}
custom()
</SCRIPT>

But I need to load this script on the hyperlink I think.
Normally I place this script on the page that opens, but as the opening page will be a PDF, I cannot do this.
An example of the normal script loaded on the opening page is as follows - http://www.fleetwoodmac-uk.com/video.html

Also if I could have a timeout contained on the popup, even better.

Thanks in advance for all your help.

Regards

Neil

Charles
02-11-2003, 04:10 PM
Before I can answer your question, I need to know how you envision this working for usaers who are not using JavaScript. What is the default behavior when this doesn't work?

fmfanuk
02-11-2003, 04:22 PM
Originally posted by Charles
Before I can answer your question, I need to know how you envision this working for usaers who are not using JavaScript. What is the default behavior when this doesn't work?

This will be on a CD source and will only be used as a disclaimer. The CD is a technical support CD that I index in HTML and auto opens IE or the like. If it was not to work on all browsers, then so be it.

Thanks for your time.

Charles
02-11-2003, 04:30 PM
<a href="some.pdf">PDF</a>
<script type="text/javascript">
<!--
document.links[document.links.length-1].onclick = function() {window.open('disclaimer.html')}
// -->
</script>
<noscript><br><a href="disclaimer.html">Disclaimer</a></noscript>

fmfanuk
02-12-2003, 05:13 AM
Originally posted by Charles
<a href="some.pdf">PDF</a>
<script type="text/javascript">
<!--
document.links[document.links.length-1].onclick = function() {window.open('disclaimer.html')}
// -->
</script>
<noscript><br><a href="disclaimer.html">Disclaimer</a></noscript>

Thanks for your help on this, the script worked perfectly :D

Cheers

Neil

fmfanuk
02-12-2003, 07:43 AM
If there now a way that I can close the window that the script opened after 20secs?

Thanks in advance

Neil

pyro
02-12-2003, 07:57 AM
Inside of disclaimer.html, add this to the <head>

<script language="javascript" type="text/javascript">
setTimeout("window.close()", 20 * 1000);
</script>

fmfanuk
02-12-2003, 09:27 AM
Thanx, works all OK :D

Neil