Click to See Complete Forum and Search --> : image instead of text link..


Jslave
May 23rd, 2004, 03:39 PM
I was wondering if I could get a little help here....

How can you modify this script to have an image be the link instead of the text ?

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>
</HEAD>



<BODY>



<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','yes');return false;">Popup Yahoo.com</a>

</BODY>

any help will be appreciated

Thanks

dynamic_sysop
May 23rd, 2004, 06:15 PM
here's a quick example i knocked up for you ...

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language=javascript>
function popit(url , title)
{
window.open(url,title);
}
</script>
</head>

<body>

<p><a href="http://google.com" onclick="javascript:popit('http://google.com','test');">
<img border="0" src="file:///C:/Documents%20and%20Settings/den/My%20Documents/My%20Pictures/sub.PNG" width="17" height="16"></a></p>

</body>

</html>

Jslave
May 24th, 2004, 12:51 AM
Hey thanks for the reply !

your example is great but didn't have the window no resize ect...

I had figured it out pretty much on my own through trial and error

looking at several scripts and figuring out what was different.

now I can either have muti image mouse over with fade value

or just a static image...

if anyone is interested in the script post here

Thanks again