PDA

View Full Version : simple scripting


chris_angell
07-02-2002, 01:36 PM
its a quick and studid one:

but i want to place the links from my site in a javascript page. but
i have ended up doing like this: sloppy

function link1() {
window.open('home.htm');
}
function link2() {
window.open('about.htm');
}

could someone please help and show me a simple way to set it up so i can set the pages as varables.. and just say use var 2 ect ect ect

thank you chris

joh6nn
07-02-2002, 02:08 PM
function popup(url) {
window.open(url);
}

<A HREF="whatever.htm" onClick="popup('whatever.htm'); return false;">click click</A>