PDA

View Full Version : HREF HELP-Code given


vijk2001
08-29-2002, 05:13 PM
Hi all,,...
I am trying to open the site www.javelin.com..what is going wrong here?I am new so it could be a silly BIG mistake!
===========================

<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openWindow(www.javelin.com) {
popupWin = window. open(www.javelin.com,'new_page','width=350,height=250,resizabl
e=no,scrollbars=yes')
}
// done hiding -->
</script>


then with my img link:

<a href="JavaScript:openWindow('www.javelin.com.html')"><img src="imgname.jpg" border="0"></a>
=====================================

What is going wrong???
Vij

beetle
08-29-2002, 05:17 PM
You only need to declare the URL in the function call, and use parameter variables for the rest<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openWindow(nUrl) {
popupWin = window. open(nUrl,'new_page','width=350,height=250,resizabl
e=no,scrollbars=yes')
}
// done hiding -->
</script>

<a href="JavaScript:openWindow('http://www.javelin.com')"><img src="imgname.jpg" border="0"></a>

vijk2001
08-29-2002, 05:29 PM
thankssssssssssssss beetle!!!!!!!!!!!!!!!