I'm using KDE on Linux, with Konqueror as the testing browser for this
project. I've recently upgraded, so I realize some of the bugs I'm dealing
with may or may not be my program, and could also result from me being less
than perfect in my preliminary coding on test pages.
I had an <OPTION> element, 10 lines in size. Previously I used:
onclick="fillFields()"
and when I clicked on a line in the <OPTION> element, the data was
transferred into an input box below. Now when I try the same thing,
nothing happens. I even replaced the original with:
onclick="alert('got click')"
and there was no response. I replaced "onclick" with "onselect", but it
made no difference.
Does this sound like a programming problem, events <OPTION> elements aren't
supposed to respond to, or a bug in the newer version of the browser?
The original HTML code is:
<select size="10" name="selectFilterFields" onselect="fillFields()"
style="font-family: monospace;">
And the new code is:
<select size="10" name="selectFilterFields" style="font-family: monospace;"
onclick="alert('Selected!')">
but neither version works. Am I doing something wrong?
Thanks!
Hal 6 16786
I didn't realize I used <OPTION> instead of <SELECT> in the title and post.
s/<OPTION>/<SELECT>/g.
Oops...
Hal Vaughan wrote: I'm using KDE on Linux, with Konqueror as the testing browser for this project. I've recently upgraded, so I realize some of the bugs I'm dealing with may or may not be my program, and could also result from me being less than perfect in my preliminary coding on test pages.
I had an <OPTION> element, 10 lines in size. Previously I used:
onclick="fillFields()"
and when I clicked on a line in the <OPTION> element, the data was transferred into an input box below. Now when I try the same thing, nothing happens. I even replaced the original with:
onclick="alert('got click')"
and there was no response. I replaced "onclick" with "onselect", but it made no difference.
Does this sound like a programming problem, events <OPTION> elements aren't supposed to respond to, or a bug in the newer version of the browser?
The original HTML code is:
<select size="10" name="selectFilterFields" onselect="fillFields()" style="font-family: monospace;">
And the new code is:
<select size="10" name="selectFilterFields" style="font-family: monospace;" onclick="alert('Selected!')">
but neither version works. Am I doing something wrong?
Thanks!
Hal
Ivo wrote: onfocus
Thanks, but it doesn't work either (I just tried it). Absolutely NO
response with onfocus.
Is this more likely a browser issue than my programming? (Shouldn't
onclick, onselect, and onfocus all work in this case?)
Hal
Hal Vaughan wrote: Ivo wrote:
onfocus
Thanks, but it doesn't work either (I just tried it). Absolutely NO response with onfocus.
onchange?
--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.
On Tue, 17 Feb 2004 06:35:55 GMT, Hal Vaughan <ha*@thresholddigital.com>
wrote:
[snip] I had an <OPTION> [edit: SELECT] element, 10 lines in size. Previously I used:
onclick="fillFields()"
and when I clicked on a line in the <OPTION> [edit: SELECT] element, the data was transferred into an input box below. Now when I try the same thing, nothing happens. I even replaced the original with:
onclick="alert('got click')"
and there was no response. I replaced "onclick" with "onselect", but it made no difference.
The onselect event is used when text is selected in an INPUT or TEXTAREA
element, not when you select from a SELECT element.
I just posted a solution to someone else's problem ("Calculated fields")
which uses the onchange event on SELECT elements to update an INPUT, and
it works in Opera, Mozilla, Netscape and IE (all WinXP). If onchange
doesn't work for you, in similar usage, Konqueror is broken. However, if
<select ... onclick="alert('a')">
doesn't display 'a' on-click, it is equally broken.
Mike
--
Michael Winter M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Hal Vaughan <ha*@thresholddigital.com> wrote in
news:fDiYb.48346$uV3.100005@attbi_s51: I'm using KDE on Linux, with Konqueror as the testing browser for this project. I've recently upgraded, so I realize some of the bugs I'm dealing with may or may not be my program, and could also result from me being less than perfect in my preliminary coding on test pages.
I had an <OPTION> element, 10 lines in size. Previously I used:
onclick="fillFields()"
and when I clicked on a line in the <OPTION> element, the data was transferred into an input box below. Now when I try the same thing, nothing happens. I even replaced the original with:
onclick="alert('got click')"
and there was no response. I replaced "onclick" with "onselect", but it made no difference.
Have you run your HTML through a validator? If not, do so and fix any
errors that it points up. It's often the case that new versions of
browsers change the way they deal with invalid HTML, often causing
something that "worked" in a previous version to fail in the new version.
Plainly what's going on is that Konqueror isn't paying any attention to
your action attributes (since your "alert" example is plainly correct
Javascript); the reason may be that its parser is getting out of sync due
to some invalid HTML. Come to think of it, make sure you haven't
inadvertently disabled Javascript in the browser as well. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andrea |
last post by:
Hi,
I'm trying to emulate part of our client-server application as a web
site so customers can use it, and I'm stuck when it comes to
re-ordering items in a list.
Basically we have a list of...
|
by: Ang Talunin |
last post by:
Hey,
I wondering if it's possible to retrieve all the <option>-fields from a
<select> when posting a <form> to a php file
Example:
I've got a form like this:
<form action = phpfile.php...
|
by: LC's No-Spam Newsreading account |
last post by:
I have a form arranged in a table (you can see an example in the page
http://cosmos.mi.iasf.cnr.it/~lssadmin/Website/LSS/Help/query.html)
The table is on three columns but has a structure like...
|
by: Craig Keightley |
last post by:
How do I retrive the Name of the item in a select box
I have the following form
<select name="select">
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option...
|
by: @sh |
last post by:
Hi guys,
As far as I understand it, there is no possible way to add an
OnSelect/Onchange to an actual <option> within a select tag (to perhaps jump
to a page or run a DOM command), is this still...
|
by: Chris Fink |
last post by:
Does anyone know it is possible to include a small image(.gif .jpeg)
within a <SELECT><option> so that the user would see the option text as
well as a little image(icon) in the option? I know this...
|
by: joseph.lindley |
last post by:
Forgive me for I am a bit of a web-dev novice - but I'm not doing too
bad.
I'm currently working with a bit of javascript to dynamically add
<option>s into a select box. My code currently works...
|
by: frey |
last post by:
i tried to create a dropdown menu and use the option as a control to
change content inside another text area
the code is like this:
<select name="xxxx"><option onclick="changeunitprice(29.87)"...
|
by: The Natural Philosopher |
last post by:
This is a nasty one and I can't see my way out of it.
I have a bunch of select statements in a form, and each select statement
has an onchange="do_something(this)" in it, and this works...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
| |