Hi, Sorry for the lame question, but, how do I get a link to open in a new window? Does it have to be in JavaScript? I reallly hope not. Thanks...
Here's some sample HTML you can use to get a link to open in a new window... <a href="http://www.sitename.com/page.html" target="_blank">Link Text</a> Code (markup):
There's also an option to control the size of the new window. For example if you want to display a train schedule or a photograph in a smaller window. I think you need a JavaScript for that. It depends for what purpose.
thanks. It's just so that people don't have to leave my site if I give them a link that's not an ad. Sounds greedy, but I'd like a user to finish reading a page, not getting distracted by the promise of better info elsewhere... I'll try them and see. Maybe it will downgrade the absolute beauty of my site...
target="_ilikeboobies" is my favorite I think if you use target, popup blockers won't catch it, as the window required interaction to open up.
If you wanted more control over the new window you could use js. However you may get caught in popup blockers. <!-- STEP ONE: Copy this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function Start(page) { OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes"); } // End --> </SCRIPT> </HEAD> <!-- STEP ONE: Paste this code into the BODY of your HTML document --> <BODY> <center> <form> <input type=button onClick="Start('http://forums.digitalpoint.com')" value="Open DigitalPoint.com"> </form> or<P> <a href="javascript:Start('http://forums.digitalpoint.com')";>Open DigitalPoint Forums</a> </center> Code (markup):