|
||
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Apr 2007
Posts: 259
|
im having this kind of problem where im trying to make buttons light up onmouseoverso it all works when i have 1 button (and 1 java script running) when i add another button it doesn't work. Code:
<SCRIPT LANGUAGE = "JavaScript">
<!--
first=new Image
first.src="pics/news2.gif"
second=new Image
second.src="pics/news.gif"
// --></SCRIPT>
Code:
<body bgcolor="#000000">
<a href="index.php?location=news"
OnMouseOut="monitor.src=first.src"
OnMouseOver="monitor.src=second.src">
<img src="pics/news2.gif" name="monitor" border="0"></a>
third =.. fourth =.. using first second for another button writing all in one html file - cant seem to get it to work. any ideas? (i know im missing the starts and endings, but its all about this) thanks ![]()
__________________
UO Armageddon - now looking for players!.. [new site under const] |
|
|
|
|
|
#3 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 29
Posts: 6,078
|
<!-- --> is the comment for HTML. Javascript uses // and /* */ just like C#.
__________________
Jeff Boulanger ConnectUO - Creator/Core Developer ConnectUO Swag/Merchandise Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Apr 2007
Posts: 259
|
even when i comment those out, it only lights up one button, if i have more buttons none light up
[code]
__________________
UO Armageddon - now looking for players!.. [new site under const] Last edited by Grom09; 11-22-2009 at 01:24 PM. |
|
|
|
|
|
#5 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 29
Posts: 6,078
|
Honestly, for this, I personally would have used CSS. Here is a link on how to do that. Mouseover images with CSS rollover navigation - DoMedia
__________________
Jeff Boulanger ConnectUO - Creator/Core Developer ConnectUO Swag/Merchandise Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
Join Date: Apr 2007
Posts: 259
|
i also tried bellow and nothing
Code:
<SCRIPT LANGUAGE = "JavaScript">
<!--
if (document.images) {
img_on =new Image(); img_on.src ="/pics/news.gif";
img_off=new Image(); img_off.src="/pics/news2.gif";
}
function handleOver() {
if (document.images) document."news.gif".src=img_on.src;
}
function handleOut() {
if (document.images) document."news2.gif".src=img_off.src;
}
Code:
<body bgcolor="#000000">
<a href="index.php?location=news"
OnMouseOut="handleOut();return true;"
OnMouseOver="handleOver();return true;">
<img src="pics/news2.gif" name="monitor" border="0"></a>
__________________
UO Armageddon - now looking for players!.. [new site under const] |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|