Go Back   RunUO - Ultima Online Emulation > Developer's Corner > Programming > Script Languages

Script Languages Perl/PHP/Python/Ruby so on and so forth.

Reply
 
Thread Tools Display Modes
Old 11-22-2009, 03:54 AM   #1 (permalink)
Forum Novice
 
Grom09's Avatar
 
Join Date: Apr 2007
Posts: 259
Default java problem

im having this kind of problem where im trying to make buttons light up onmouseover
so 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>
ok so heres the thing, i tried adding :
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]
Grom09 is offline   Reply With Quote
Old 11-22-2009, 04:11 AM   #2 (permalink)
Forum Novice
 
Join Date: Sep 2002
Posts: 114
Default

Pretty sure "<!-- -->" is the comment syntax in Javascript.
LuxoR is offline   Reply With Quote
Old 11-22-2009, 05:47 AM   #3 (permalink)
ConnectUO Creator
 
Join Date: Jan 2004
Age: 29
Posts: 6,076
Default

<!-- --> 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
Jeff is offline   Reply With Quote
Old 11-22-2009, 12:57 PM   #4 (permalink)
Forum Novice
 
Grom09's Avatar
 
Join Date: Apr 2007
Posts: 259
Default

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.
Grom09 is offline   Reply With Quote
Old 11-22-2009, 03:14 PM   #5 (permalink)
ConnectUO Creator
 
Join Date: Jan 2004
Age: 29
Posts: 6,076
Default

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
Jeff is offline   Reply With Quote
Old 11-22-2009, 03:43 PM   #6 (permalink)
Forum Novice
 
Grom09's Avatar
 
Join Date: Apr 2007
Posts: 259
Default

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>
i'l give it a try jeff
__________________
UO Armageddon - now looking for players!.. [new site under const]
Grom09 is offline   Reply With Quote
Old 11-22-2009, 05:41 PM   #7 (permalink)
Forum Novice
 
Grom09's Avatar
 
Join Date: Apr 2007
Posts: 259
Default

ok, i searched through alot of sites, ALot. even for css
i found one java that works almost great. =D finally....
__________________
UO Armageddon - now looking for players!.. [new site under const]
Grom09 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5