----------------------------------- poseidon Sun May 11, 2003 7:27 pm Link that leads to a pop-up ----------------------------------- I'm working on a site and I want a pop-up to appear when the user clicks a certain link. eg. when the person clicks the link, a pop-up appears (the little customizable pop-ups that has the "OK" button), and when the user clicks "OK" the pop up closes and the browser links to another page. Does any1 know the code for this? (if it exists) Heres wat i have so far .... a href="" onMouseover="alert('TEXT')">LINKTEXT ----------------------------------- octopi Sun May 11, 2003 8:26 pm ----------------------------------- I just quickly whipped this together: function popup() { var URL = "http://www.google.com"; alert("A popup window will appear..."); popup = window.open(URL,"popup",""); } click ----------------------------------- octopi Sun May 11, 2003 8:35 pm ----------------------------------- errr. On re-read I think I missed what you were saying, is this what you want? function leaving() { var URL = "http://www.google.com"; alert("You are leaving my site..."); window.location = URL; } click ----------------------------------- poseidon Sun May 11, 2003 11:48 pm thx man ----------------------------------- wow .. haha .... looking at ur code makes me feel like a true html newbie ... seems like I need to learn a lot more html thx man ... exactly what I wanted ..... except .... I dont wanna be a nusiance but ... how do u get the linked url to open in another browser? so my initial page will still be there thx again ----------------------------------- poseidon Mon May 12, 2003 12:07 am actually wait ----------------------------------- I just tried it on my site, and for some reason it doesnt wrk .... the pop-up doesnt show ... and geocities(my host) ends up looking for a file So far, I have function leaving() { var URL = "http://www.google.com"; alert("You are leaving my site..."); window.location = URL; } (My coding. I omitted it because there's simply too much) click I was thinking, maybe the problem is in my placement of your coding or maybe .... href= " javacript:leaving() am I supposed to put a URL in there or something? Also ... is there a way to put comments in html? (eg in turing, u use " % " in front of a statement to make it a comment) ----------------------------------- octopi Mon May 12, 2003 12:26 am ----------------------------------- Here are some links, with the documents I uploaded on my server. I included a html comment in them, so you can see. (included below too) ----------------------------------- Homer_simpson Mon May 12, 2003 12:33 am Re: thx man ----------------------------------- wow .. haha .... looking at ur code makes me feel like a true html newbie ... seems like I need to learn a lot more html you need to learn alot more java scripting not html... and CSS and dhtml are also very useful for webdesigning ----------------------------------- poseidon Mon May 12, 2003 10:38 pm thx ----------------------------------- Thanks a lot man ... it wrked ... I think there was an issue w/ geocities ..... cause when i put the same code onto my other host, it wrked perfectly .. but there was always somethign wrong when i used geocities ... o yea .. can any1 suggest a good html tutorial? java tutorial? anyways .... thx again ----------------------------------- krishon Tue May 20, 2003 6:37 pm ----------------------------------- well u can start a new topic and i'll help u out wit some stuff u dun't know. i'm not and html god, as in i dun't know everythin there is to know, but i know a fair bit. Javascript i'm ok at gotta touch up. so nethin u need just holla. ----------------------------------- hez Mon May 26, 2003 3:19 pm ----------------------------------- Here are some links, with the documents I uploaded on my server. I included a html comment in them, so you can see. (included below too) Nicely Stated :wink: we make newbies look bad :twisted: