473,594 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onclick on option not working on IE or safari

I have a select box that uses onclick on each option tag.

This works fine in firefox, but not in IE or Safari.

I don't know if I should use onblur for each option.

I don't want to use onchange for the select, as I want any of the
options selected to be reacted to.

The user is selecting for one one of three dates (start of semester,
end of semester, use calendar). I could just put a blank option as the
default option, so that the other three options will fire onchange.

I am hoping that someone can help me to better understand how to
approach getting this to work properly.

Thanx.

Apr 12 '06 #1
3 6209
James Black said on 12/04/2006 12:34 PM AEST:
I have a select box that uses onclick on each option tag.

This works fine in firefox, but not in IE or Safari.

I don't know if I should use onblur for each option.


Don't do that. Put the onclick on the select and look at the selected
option - it may require additional work for a multiple select.
[...]
--
Rob
Group FAQ: <URL:http://www.jibbering.c om/FAQ>
Apr 12 '06 #2
I will try that in the morning.

I didn't think about putting the onclick on the select box. Thank you.

Thankfully it is just a single-select, so it shouldn't be too much
coding. :)

Apr 12 '06 #3
James Black said on 12/04/2006 12:42 PM AEST:
I will try that in the morning.

I didn't think about putting the onclick on the select box. Thank you.

Thankfully it is just a single-select, so it shouldn't be too much
coding. :)


You should also check how it behaves if keyboard navigation is used -
tab to select, up/down arrow to modify.
--
Rob
Group FAQ: <URL:http://www.jibbering.c om/FAQ>
Apr 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
10765
by: Jim Bond | last post by:
Hello, I have found myself in the position of having to manage & "hack" a web site built by someone else. I am trying to make a modification to the javascript code and have been unable to get this working. I admit that I am a total javascript beginner, but have read google & purchased the o'reilley javascript book. So far, all I've been able to achieve are numerous javascript errors! Currently, we have a drop-down box which triggers...
2
18556
by: RobG | last post by:
I am trying to dynamically add an onclick to an element, however I just can't get the syntax right. consider the following function: function doClick (evt,x) { // do things with evt and x } Which is called statically by: <button onclick="doClick(event,this);">Click me</button>
1
4449
by: Roger | last post by:
I am trying to capture the image coordinates when a user clicks on an image. My code is working in Firefox, Mozilla, Netscape, IE, and Opera, but fails under Konqueror (and I suspect Safari). The code below fails in Konqueror when the page is scrolled down; the coordinates are off by the scroll amount. My code in the html img tag: onClick="MLDot(event)" and the related statements in the MLDot function:
6
7163
by: Nx | last post by:
i've got it all working nicely in firefox, but whenever i test it in IE none of the onclick events are triggered. i'm using an xsl to transform an rss feed into a photogallery. when i try to use setAttribute FF and safari work, but IE stops working when i used addEventListener and attachEvent safari stops working and when i tried .onClick,none of them worked being fairly inexperienced (but learning fast), i figure i'm doing it
9
8551
by: whitgurley | last post by:
I've searched the web as well as I can for a solution to this problem but have found nothing and just don't know enough about JavaScript to figure out what's going. What I'm trying to do is convert this script: <a href="#" onclick="MM_goToURL('parent.frames','color2.html');return document.MM_returnValue">TEST</a> ....to something that I can use within a Flash movie, which as far as I can tell means that it needs to reside in the...
10
6658
by: NeoTubNinja | last post by:
I have a select statement with various numbers. Upon clicking on one of the options, you are sent to a page that puts the option value in a session and returns back to the previous page. When it gets back to the page it is supposed to write out a number of <div> tags based on the session variable. I don't know if its asp or IE, but regardless it works in firefox the way I want it to. The code that I'm using is: <option...
6
3041
by: dragze | last post by:
Hi, right i have a menu box wich allows the user to change what stylesheet the website uses. Now this all works just the way it shud in FF, but not in safari or IE, when u select ur option from the box in safari or IE it does nothing. I have tested the same method but with hyperlinks rather than the menu box, this works with all three browsers, just wont wrk on the menu box for some reason. For all i know there could be a simple explanation to...
20
3136
by: Charles | last post by:
Hello, On my web site, I have a <selectdrop-down menu that allows to show/ hide divs: http://tchernobyl.dreamhosters.com - The problem is that it doesn't work in IE7 (only tested in Opera and Firefox). However, if I include the onclick event in an <atag, it works fine in IE (but not within <optiontags). Next to the drop-down menu, I put a "test" link which works fine in IE7. Do you know what may be the cause? Here's the snippet:
2
2517
by: swethak | last post by:
Hi, i am getting the problem when i used the onclick event in option tag.It is working fine in mozilla .But it is not working IE. Here is my code <script>
0
7946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7876
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8251
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8003
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8234
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6654
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5408
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2385
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.