Topic: Works Fine in FF but IE gives 'Error Object Expected' HELP!!!! Pages that link to <a href="https://ozoneasylum.com/backlink?for=30405" title="Pages that link to Topic: Works Fine in FF but IE gives &amp;#039;Error Object Expected&amp;#039; HELP!!!!" rel="nofollow" >Topic: Works Fine in FF but IE gives &#039;Error Object Expected&#039; HELP!!!!\

 
Author Thread
paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

IP logged posted posted 07-10-2008 13:56 Edit Quote

Hi guys, this is weird issue Im stuck up against. I have an image with an onclick event as such:

<img src="somethin.jpg" onclick="_lighten('itemname')"/>

the _lighten() function is in an external js file being included. In Firefox this runs perfectly fine but in IE its not running at all. Infact I tried calling the function from different objects and its not working??? Whats wrong here...and what do I do!

MaGnA
Nervous Wreck (II) Inmate

From: Toronto
Insane since: Jan 2008

IP logged posted posted 07-10-2008 17:06 Edit Quote

What does the _lighten() function look like?

paritycheck
Bipolar (III) Inmate

From: you tell me
Insane since: Mar 2004

IP logged posted posted 07-12-2008 08:23 Edit Quote

it doesnt matter what teh function is even if it just contains an alert() it doesnt call it at all fro what I've noticed...

samliew
Obsessive-Compulsive (I) Inmate

From: JavaScript World
Insane since: Aug 2008

IP logged posted posted 08-25-2008 08:06 Edit Quote

The info you have provided is insufficient. Why not post the code or link so that we can see the whole picture?

Hope this helps!

Personal Website | My JavaScripts | My Facebook

esskay
Bipolar (III) Inmate

From:
Insane since: Jan 2005

IP logged posted posted 08-26-2008 05:41 Edit Quote

Put an anchor tag around the image and put the onclick on the anchor tag instead of the image itself, as so:

<a href="#" onclick="_lighten()"><img src="whatever.gif"/></a>

or:

<a href="javascript:_lighten()"><img src="whatever.gif"/></a>

- SK

lucy1988
Nervous Wreck (II) Inmate

From:
Insane since: Sep 2008

IP logged posted posted 10-23-2008 10:26 Edit Quote

World of Warcraft Powerleveling
Insider is reporting that the 's 'tendrils' are already working their way south into the lands of Azeroth! The expansion is soon upon us, and already we're seeing signs of the coming expansion. Agents of Northrend http://www.powerleveling2000.com
called Argent Healers have appeared in the Horde capital city of Orgrimmar and are most likely also making themselves known in the Alliance capital city of Stormwind. for this amazing disease-born world event!

Head to Booty Bay to get in on the fun! You'll be transformed into a zombie and can - at your choice - rush back to the city to be healed ... or spread your foul infection where you will! Just don't come near us with your plagued hands. Other WoW Insider Zombie Invasion resource



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu