![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Apr 2008
Posts: 2
OS: winxp
|
I am a bit new in learning java so i have to ask the pro :D ... oh well what happens is this i use this code to swap image when mouse is over <SCRIPT LANGUAGE = "JavaScript">
<!-- first1=new Image first1.src="prima pagina copy.jpg" second1=new Image second1.src="prima pagina copy2.jpg" // --> </SCRIPT> <a href="" OnMouseOut="monitor1.src=first1.src" OnMouseOver="monitor1.src=second1.src"> <p><img src="prima pagina copy.jpg" name="monitor1" width="179" height="45" border="0" /></p> </a> and my main argue is that in Firefox it works fine, but in Internet Explorer it doesn't even show a image, it only shows a square with a red cross and i dont know what to do to make it work in IE too. I would really apricite your answer. Thank you! |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,888
OS: Vista, various linux distros
|
Re: problem with java....IE
Firstly Javascript is not Java, you're refering to javascript as java, The two are completely different languages. Their names are a publicity thing from when they were brought out. So rembember to refer to what you've written as Javascript and not java, i was not going to look at this thread because i do not know java but i know and have been writing javascript for around 4 years.
Secondly, your script is fine and should run fine in both browsers, there is no compatibility issue(that i can see). The red cross shows that the javascript has run fine, it has changed the source of the image to the source it's supposed to be but the image was not found, (the red cross means the image can not be found to load). You could do this all inline such as the following: (i dont understand why you're using the link to change the image) <a href=""> <p><img src="prima pagina copy.jpg" onMouseOver="this.src='prima pagina copy2.jpg';" onMouseOut="this.src='prima pagina copy.jpg';" name="monitor1" width="179" height="45" border="0" /></p> </a> or if you still want to use the <a> element to change the image you could use <a...onMouseOver="this.firstChild.firstChild.src='prima pagina copy2.jpg';"...> if that makes sence... I also suggest you try out the firefox extension IE Tab (google it), its a brilliant developer tool, it allows you to load pages in firefox using the IE rendering engine (the equivilent of testing script compatibility in IE using firefox). Hope i helped, Jamey p.s. remeber Java != Javascript (Java is not Javascript) |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Apr 2008
Posts: 2
OS: winxp
|
Re: problem with java....IE
well it seemed that the problem was the fact that i changed the format of the pictures from png to jpeg... i dont know why this happend but IE doesnt see jpeg in java ... i dont know why :| .. thnx for the answer :D helped me a lot :D:D
|
|
|
|
![]() |
| Thread Tools | |
|
|