PDA

View Full Version : change the function of this button



skyonline
12-27-2009, 06:50 PM
I have the one javascripts button code and the functions is on "text area" .. but how do I change the function of this button to go to google.com website ..? how to make it..

the javascripts button code :


<input type="image" src="tesdt-copy-1.gif"
onmouseover="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-2.gif';"
onmouseout="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-1.gif';"
onclick="CB(document.getElementById('output').value); return false;"
</form name="I5" width="38" height="38">

Philip M
12-27-2009, 07:14 PM
onclick = "window.location = 'http://www.google.com' "



All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

skyonline
12-27-2009, 07:45 PM
tq,...how about offline html file...it's not work :


<input type="image" src="tesdt-copy-1.gif"
onmouseover="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-2.gif';"
onmouseout="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-1.gif';"
onclick = "window.location = 'file:///C:/Documents%20and%20Settings/Administrator/Desktop/index.htm' "
</form name="I5" width="38" height="38">

Philip M
12-27-2009, 08:57 PM
I am lost again. I do not see anything about google.com.

Old Pedant
12-27-2009, 11:16 PM
Do you realize that your code won't work on *ANY* machine except your own??

And as for the onclick: Do you *HAVE* a file by that name in that location???

[Philip: I think he was saying that when he uses a local file instead of google.com then the onclick doesn't work. Guessing.]

skyonline
12-28-2009, 03:06 AM
<input type="image" src="tesdt-copy-1.gif"
onmouseover="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-2.gif';"
onmouseout="this.src='file:///C:/Documents%20and%20Settings/Administrator/Desktop/test/main%20test%20scripts/test2-copy-1.gif';"
onclick = "window.location = 'file:///C:/Documents%20and%20Settings/Administrator/Desktop/index.htm' "
</form name="I5" width="38" height="38">

yess...that code is work when i save and open in internet explorer...but when in frontpage is't not working .. why..???...tq...

Old Pedant
12-28-2009, 04:22 AM
Probably because FrontPage acts more like a *REAL* server. And you can *NEVER* use FILE:// on a real server. (Okay, maybe not NEVER. But almost never.)