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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 04-23-2008, 09:52 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 2
OS: winxp


Cry problem with java....IE

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!
zebah is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 04-23-2008, 10:56 AM   #2 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
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)
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-23-2008, 10:57 AM   #3 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,888
OS: Vista, various linux distros


Re: problem with java....IE

Just out of curiosity, what javascript tutorials/tuition etc are you using?
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-23-2008, 11:50 AM   #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
zebah is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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




All times are GMT -7. The time now is 04:36 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85