Click to See Complete Forum and Search --> : Opening a popup window on mouseclick


Wildflower
09-07-2003, 03:40 PM
Hi -

Can someone take a look at my code and give me a hand?

Address is http://www.wildatheartdesign.com, and my problem is on the homepage. The four links in the text of the page (domain name, Design, Host, Update) USED TO open a 450x300 window. However, I inadvertently deleted the "onClick" coding for the links and canNOT for the life of me remember how I did this using the function coding I have on the page.

Can someone please help?


Wildflower

Jupac
09-07-2003, 03:46 PM
this might be it
<script type="text/javascript">function open(){window.open("locationofhtm","name",config="height=450,width=300,resizable=0,scrollbars=1,status=0,top=0,left=0,screenx=0,
screeny=0,toolbar=0,menubar=0,location=0")}</script>

Wildflower
09-07-2003, 04:07 PM
Actually, I didn't delete the script. The part I deleted was the "onClick" coding that was inserted by the hyperlink. The following script is what I used:


<SCRIPT LANGUAGE="JavaScript">
<!--
if (navigator.appName.indexOf('Microsoft') > -1) {
document.write('<LINK HREF="../msie.css" REL="styleSheet" TYPE="text/css">');
} else {
document.write('<LINK HREF="../nn.css" REL="styleSheet" TYPE="text/css">');
}

function openHelp() {
helpWindow=window.open("","help",'toolbar=0,location=0,scrollbars=0,width=450,height=300,resizable=0,left=30,top=30');
helpWindow.focus();
}

// -->
</SCRIPT>

pyro
09-07-2003, 04:10 PM
You might want to take a look at http://www.webdevfaqs.com/javascript.php#popup, which will show you how to open a new window that will continue to work for those without javascript enabled.

Wildflower
09-07-2003, 04:37 PM
Perfect! Very cool!


Wildflower