Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > 'onclick' problem

Reply
Thread Tools

'onclick' problem

 
 
Mel Smith
Guest
Posts: n/a
 
      09-15-2010
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






--
Mel Smith


 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      09-15-2010
On 15/09/10 20:45, Mel Smith wrote:

> 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
 
Reply With Quote
 
 
 
 
Mel Smith
Guest
Posts: n/a
 
      09-15-2010
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.



 
Reply With Quote
 
Mike S
Guest
Posts: n/a
 
      09-15-2010
On 9/15/2010 12:45 PM, Mel Smith wrote:
> 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
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      09-16-2010
On 15 Sep 2010, "Mel Smith" <(E-Mail Removed)> wrote:

> 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 ???)


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

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
Mel Smith
Guest
Posts: n/a
 
      09-16-2010
Neredbojias said:
>> (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".



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


 
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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments