User User name Password  
   
Tuesday 3.3.2026 / 11:40
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > software, operating systems and more > windows - software discussion > javascript problem
Show topics
 
Forums
Forums
javascript problem
  Jump to:
 
Posted Message
arrgghh
Junior Member
_
18. March 2008 @ 12:08 _ Link to this message    Send private message to this user   
i was trying to write a simple script to do an image button, im not sure why the code doesnt work. I have a working script already but was trying to make a generic function.

function ImageOver(a,b)
{
document.images[a].src=b;
return true;
}

when i try to pass the parameters it doesnt work, for example...

<a href="1.2.3.4" onmouseover="return ImageOver("jsbutton1","picture.gif")" >
</a>

im not sure why it wont work, it seems so simple. Im thinking maybe the quotations are being stripped when passing the params, but not sure. Any suggestion would be helpful.

This message has been edited since posting. Last time this message was edited on 18. March 2008 @ 12:12

varnull
Suspended permanently
_
18. March 2008 @ 13:45 _ Link to this message    Send private message to this user   
Don't think it's that.. I never got that far with java.. prefer C++ and ruby..

For some reason your syntax looks wrong, but I can't put my finger on it.. more a "doesn't look right" feeling..

http://ajaxian.com/archives/can-your-pro...-javascript-can
arrgghh
Junior Member
_
19. March 2008 @ 09:35 _ Link to this message    Send private message to this user   
Originally posted by varnull:
Don't think it's that.. I never got that far with java.. prefer C++ and ruby..

For some reason your syntax looks wrong, but I can't put my finger on it.. more a "doesn't look right" feeling..

http://ajaxian.com/archives/can-your-pro...ipt-can


if i try this it works but its not what i want, im not sure why it doesnt seems to work.

function ImageOver(a,b)
{
a = "jsbutton1";
b = "picture.gif";
document.images[a].src=b;
return true;
}

but it doesnt work when passing parameters.

when i try to pass the parameters it doesnt work, for example...

<a href="1.2.3.4" onmouseover="return ImageOver("jsbutton1","picture.gif")" >
</a>

any more suggestions why this wont work?
afterdawn.com > forums > software, operating systems and more > windows - software discussion > javascript problem
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2026 by AfterDawn Ltd.

  IDG TechNetwork