'onclick' problem

M

Mel Smith

Hi:

The 'onclick' clause used in an <option> element of a <Select> Tag
seems to work perfectly in all browsers I've checked (i.e., Chrome, FF,
Opera, and Safari) *except* for IE7.

This onclick clause simply activates a js function when the particular
<option> is 'clicked'.

In IE7 nothing happens, and no error is shown

The other browsers work perfectly.

Any suggestions please ??

Thank you !

-Mel Smith
 
D

Denis McMahon

The 'onclick' clause used in an <option> element of a <Select> Tag
seems to work perfectly in all browsers I've checked (i.e., Chrome, FF,
Opera, and Safari) *except* for IE7.

This onclick clause simply activates a js function when the particular
<option> is 'clicked'.

In IE7 nothing happens, and no error is shown

The other browsers work perfectly.

Any suggestions please ??

1) Is the onclick handler not getting called, or is the onclick handler
called but the function breaking in ie? If you use
onclick='alert("clicked");' do you see the alert box?

2) comp.lang.javascript

Rgds

Denis McMahon
 
M

Mel Smith

Denis said:
1) Is the onclick handler not getting called, or is the onclick handler
called but the function breaking in ie? If you use
onclick='alert("clicked");' do you see the alert box?

No, the alert() box does not show up.
2) comp.lang.javascript

Yes, I'll re-post to the js group -- where I lurk and post stupid
questions a lot.

Thanks for the response.

(btw, I've never had a problem with the 'onclick' event before --- *only*
with the <option> element of the <select> box tag ???)

-Mel Smith.
 
M

Mike S

Hi:
The 'onclick' clause used in an<option> element of a<Select> Tag
seems to work perfectly in all browsers I've checked (i.e., Chrome, FF,
Opera, and Safari) *except* for IE7.
This onclick clause simply activates a js function when the particular
<option> is 'clicked'. In IE7 nothing happens, and no error is shown
The other browsers work perfectly. Any suggestions please ??
Thank you !
-Mel Smith

http://www.daniweb.com/forums/thread115562.html
 
N

Neredbojias

Denis said:


No, the alert() box does not show up.

Yes, I'll re-post to the js group -- where I lurk and post stupid
questions a lot.

Thanks for the response.

(btw, I've never had a problem with the 'onclick' event before ---
*only* with the <option> element of the <select> box tag ???)

It might be a peculiarity of ie7, but you could try "onmouseup".
 
M

Mel Smith

Neredbojias said:
It might be a peculiarity of ie7, but you could try "onmouseup".


I've carried on this post on the comp.lang.javascript ng, where I got
further help

The 'end' solution was to transfer the 'action' up to the <select>
element itself, and change the action clause to:

<select onchange="chkopt(this);" >
etc, etc
</select>


Thanks for the comment

-Mel Smith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top