Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I hate IE

Status
Not open for further replies.

charIie

Programmer
Feb 14, 2006
21
US
Hello, I am still having a problem with this and it only occurs in MS IE. I run this script and left click works fine, as does right click. They open what they are supposed to. The problem that occurs is that the right click still has menucontext still comes up on the right click. But only if you click the picture. The click here link does exactly what I want the picture to do. As far as I can tell the code is the same and should work, but it doesn't. If you see what I'm missing please let me know. Thanks!



<script type="text/javascript">
<!--
function hi(){alert('help');}

function originalShirtL()

{window.open('images/OScloseup.jpg','CloseUp','width=623,height=567,resizable=0,scrollbars=0,location=0,directories=0,status=

0,menubar=0');}

function originalShirtR()

{window.open('images/OScloseupb.jpg','CloseUp','width=623,height=567,resizable=0,scrollbars=0,location=0,directories=0,status

=0,menubar=0');}


//-->
</script>

<span style="cursor:pointer;" onclick="originalShirtR();" oncontextmenu="originalShirtR();return false";>
<img border="0" src="images/Original_Shirt.gif" width="181" height="154"><table border="0" cellpadding="0"

cellspacing="0" style="border-collapse: collapse" width="100%">
</span>


<span id="SpecialSpan"
onmouseover="this.style.cursor='pointer'"
onmouseout="this.style.cursor='default'"
oncontextmenu="hi();return false";>
*click here*
</span>
 
Nevermind, It only works if the images are there! Sorry Everyone!
 
charIie,

Just a quick pointer for your next post - try to put a meaningful description as the subject. "I hate IE" may well be true, but it conveys no information about the problem you're posting about.

Good to see you cracked it in the end, anyway!

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Op wrote:
>Nevermind, It only works if the images are there!

Do you think so? Or you make the statement after testing? I make a quick test of it and it works as far as the event handlings are concerned on ie even the images are not there. Is it not for you?!
 
I made a script and I was fooling around with it off my website directory. When I opened the html file, the images were not in the directory. IE gave me an error saying the files could not be found etc. On the right click the menu still came up afterward. I think it was due to not finding the pictures that something went wrong, because once I used actual pictures in the directory it worked fine. I dont know why.

But it works now, :)

I appologize for the use of the title. I was just frustrated. And it seemed a very valid title at the time. I didnt think much about it.

Thanks for everyone's intrest though.

Charlie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top