|
| 17 Apr 2012 09:04 AM |
function changeImg(){ img = document.images['Custom_Menu_Icon']; if(img.src=="Images/Custom_Menu_Icon.png"){ alert("lol"); img.src = "Images/Custom_Menu_Icon_Hover.png"; } else if(img.src=="Images/Custom_Menu_Icon_Hover.png"){ img.src="Images/Custom_Menu_Icon.png"; } else{ img.src="Images/Custom_Menu_Icon.png"; } }
The If statement(s) are not working, the Alert is to test and it's just not working. |
|
|
| Report Abuse |
|
|
Lotoco
|
  |
| Joined: 13 Apr 2012 |
| Total Posts: 55 |
|
|
| 17 Apr 2012 09:56 AM |
This is a ROBLOX scripting forum, not a web programming forum.
Use your browser's output. Duh.
Lot o' co-ffee |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 10:08 AM |
| Actually if you can find the statement by a admin that says Lua only then I would <3 to see. |
|
|
| Report Abuse |
|
|
Lotoco
|
  |
| Joined: 13 Apr 2012 |
| Total Posts: 55 |
|
|
| 17 Apr 2012 10:19 AM |
"Need help with a script you are writing? Need to edit an existing script? This is the place to share your 1337 programming skills and help others! [For advanced ROBLOX users.]"
Script = for ROBLOX game JavaScript = web language
Lot o' co-ffee |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 10:25 AM |
Incorrect. >Script (computing), a small program written for a command interpreter or another scripting language Taken from Wikipedia. :P What you going to say now? |
|
|
| Report Abuse |
|
|
Lotoco
|
  |
| Joined: 13 Apr 2012 |
| Total Posts: 55 |
|
|
| 17 Apr 2012 10:25 AM |
Go to Scripters forum.
Lot o' co-ffee |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 10:28 AM |
| Hang on. He doesn't need to. He can keep his post here. |
|
|
| Report Abuse |
|
|
Lotoco
|
  |
| Joined: 13 Apr 2012 |
| Total Posts: 55 |
|
|
| 17 Apr 2012 10:30 AM |
Those people know more JavaScript.
Anyhow, why not do this?
< img src="?" onmouseover="this.src='hover.png';" onmouseout="this.src='normal.png';" />
Lot o' co-ffee |
|
|
| Report Abuse |
|
|
| |
|
Lotoco
|
  |
| Joined: 13 Apr 2012 |
| Total Posts: 55 |
|
|
| 17 Apr 2012 06:38 PM |
@biker
Why'd you bump this? As far as the forums can see, it is resolved.
Lot o' co-ffee |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 06:43 PM |
| How? I still don't have my help. |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 17 Apr 2012 06:49 PM |
| Biker's completely correct. This isn't done. I gotta brush up on my JavaScript and I'll see if I can help in any way. |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 17 Apr 2012 06:57 PM |
| Can't find anything wrong D; |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2012 07:08 PM |
Your allowed to have this post here, as this is Scripting. Does it say ANYWHERE Lua Scripting Helpers?
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Apr 2012 07:52 PM |
function changeImg(){ img = document.images['Custom_Menu_Icon']; if(img.src=="Images/Custom_Menu_Icon.png"){ alert("lol"); img.src = "Images/Custom_Menu_Icon_Hover.png"; } else if(img.src=="Images/Custom_Menu_Icon_Hover.png"){ img.src="Images/Custom_Menu_Icon.png"; } else{ img.src="Images/Custom_Menu_Icon.png"; } }
Is img An Object U can add an id and: img = document.getElementById('Custom_Menu_Icon') and idk is it src or href? |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Apr 2012 09:12 PM |
lot, he is perfectly fine being allowed to post here. stop being such a failure of a troll, i can't stand people like you. |
|
|
| Report Abuse |
|
|