<HEAD> <TITLE>Links</TITLE> <script language="JavaScript"> <!-- /* script by Colm Mac Cárthaigh colmmacc@geocities.com * VERSION 3 * fairly easy to customise, mereley change the startPage and endPage to your requirements. * changes in version 3 - alert if no links selected, now works with IE4, fixed external Form bug * be sure to read all notes at side of script * you are free to use this script as long as you include this message * it would be nice to get an E-Mail form anyone who uses this script, but it's not obligatory * please e-mail me with any problems also */ function newlink(href, descr) { document.write ('<FORM><INPUT TYPE="checkbox" NAME="picklink" VALUE="off"><a href="' + href +'">' + href + '</a><br>' + descr +'<INPUT TYPE=HIDDEN NAME="site" VALUE="' + href + '"><INPUT TYPE=HIDDEN NAME="desc" VALUE="' + descr +'"></FORM>'); } function makepage () { startPage = '<HTML><HEAD><TITLE>Links:</TITLE></HEAD>' + '<BODY TEXT="#000000" LINK="#0000ff" VLINK="#008800" BGCOLOR="#ffffff">' + '<h1><center>Your Links<hr noshade color="#880000"></center></h1>'; linkPage = startPage n = (document.forms.length - 0) // replace 0 with number of extenal forms on page(i.e. the number of FORM tags on the page) for (var i = 0; i < n; i++) { if (document.forms[i].picklink.checked == true) { var site = document.forms[i].site.value; var desc = document.forms[i].desc.value; link = '<a href="' + site + '" target="opener">' + site + '</a><br>' + desc + '<br><br>'; linkPage = linkPage + link } } if (linkPage == startPage){ alert('You did not mark any links - please mark some and start again') } else{ endPage = '<hr noshade color="#880000"><center><h2><a href="http://www.yoururl.com/">The site you just came from</a></h2></BODY></HTML>'; // make sure you put a url and reference in here(to your own site!) linkPage = linkPage + endPage remote = window.open("","remotewin","width=350,height=400,scrollbars=yes"); browserver = navigator.userAgent if (browserver.indexOf("MSIE") != -1){ remote.location = 'javascript:opener.linkPage'; } else { remote.document.write (linkPage); remote.document.close() } if (remote.opener == null) remote.opener = window; remote.opener.name = "opener"; } } //--> </script> </HEAD> <BODY TEXT="#000000" LINK="#0000ff" VLINK="#008800" BGCOLOR="#ffffff"> Put a check next to the links that take your interest and click go!<br><br> <script> <!-- newlink ("http://www.yahoo.com/", "Yahoo") // first field is link, second field is text n.b. this will appear in both windows newlink ("http://www.infoseek.com/", "Infoseek") newlink ("http://www.excite.com/", "Excite") newlink ("http://www.lycos.com/", "Lycos") //--> </SCRIPT> <a href="javascript:makepage()">Go!</a>

1998 Copyright (C) Next Step All Rights Reserved