FYI,
with something like this:
hotelement = "hotelement"+hotcount;
hotspot = Builder.node('div', { id:'hotspot'+hotcount,
className:'hotspot', style:''+divstyle }, [
Builder.node('select', {id:hotelement, onChange:hotspotlink}, [
Builder.node('option',{value:'textfield',
selected:''},"textfield"),
Builder.node('option',{value:'textarea'},"textarea "),
Builder.node('option',{value:'dropdown'},"dropdown "),
Builder.node('option',{value:'checkbox'},"checkbox "),
Builder.node('option',{value:'number'},"number"),
Builder.node('option',{value:'date'},"date"),
Builder.node('option',{value:'time'},"time")
])
]);
$('column_container').appendChild( hotspot );
$(hotelement).selectedIndex = 1;
the
$(hotelement).selectedIndex = 1;
fixes the problem 2 3835
sicapitan wrote:
<snip>
Builder.node('option',{value:'textfield', selected:''},"textfield"),
Because you are not including the code for the objects/method/functions
being used here it is impossible to tell what these 'parameters' are
intended for, but it seems likely that whether - selected - is destined
to be an element property or an attribute (unlikely given the poor
support on IE) the value of an empty string would be a useful value to
be using. If the intention is to set a - selected - property of the
element then because the empty string type-converts to boolean false
when assigned to a boolean element value the result would be an option
that was _not_ selected, and the only value for a selected attribute is
the string "selected".
<snip>
$(hotelement).selectedIndex = 1;
the
$(hotelement).selectedIndex = 1;
fixes the problem
What problem? Not by any chance the problem that you expect the second
option to be selected and that is not the case without the explicit
assignment to the selectedIndex?
Richard.
i made a mistake, selected:'selected'
its a bug in FF apparently, mentioned elsewhere, setting the index
fixes it
problem was no option was selected, and it would jump to the last, as
the builder code would write selected='selected' with no defaults to a
blank value.
cheers
r
Richard Cornford wrote:
sicapitan wrote:
<snip>
Builder.node('option',{value:'textfield', selected:''},"textfield"),
Because you are not including the code for the objects/method/functions
being used here it is impossible to tell what these 'parameters' are
intended for, but it seems likely that whether - selected - is destined
to be an element property or an attribute (unlikely given the poor
support on IE) the value of an empty string would be a useful value to
be using. If the intention is to set a - selected - property of the
element then because the empty string type-converts to boolean false
when assigned to a boolean element value the result would be an option
that was _not_ selected, and the only value for a selected attribute is
the string "selected".
<snip>
$(hotelement).selectedIndex = 1;
the
$(hotelement).selectedIndex = 1;
fixes the problem
What problem? Not by any chance the problem that you expect the second
option to be selected and that is not the case without the explicit
assignment to the selectedIndex?
Richard.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: paradox |
last post by:
How can I go about having a TreeNode selected when I right click? I
tried using the Click event, but the event does not pass in the node
that was clicked.
Currently you have to left click a node...
|
by: Bill |
last post by:
Hi All,
I've populated a treeview with a few nodes, setting the '.TAG' property
for each node
When the user clicks on a node, how do I retrieve the value of the
'.TAG'. (also in which event...
|
by: Chris Ashley |
last post by:
I'm trying to use a treeview control for navigation in an app. How do I
determine which node has been selected? I can't use the text property
because some nodes have the same name, and the index...
|
by: Sam |
last post by:
Hi,
I'd like to get the selected node when the user select a node in my
treeview. I know how to get the selected node, what I don't know is how
to detect that the user has selected a new node.
...
|
by: kt |
last post by:
How do you go about this. Can some point me in the right direction. Thanks in
advance.
|
by: Antonio |
last post by:
Hi,
I would like to have my TreeNode to call window.close(); without posting
back, how can I do that? At the same time, I prefer to have a SelectAction
property that allows my TreeNode to appear...
|
by: Claire |
last post by:
I've a treeview control containing a root node with several children on a
windows form.
I select a node with a left mouse button click.
I then select one of the other nodes with right mouse click...
|
by: Tom |
last post by:
Hey,
I have a treeview control which i am reading and writing slots to (Its a
player manager for Delta Force Black Hawk Down).
At the moment, every 100ms it reads through the games memory to...
|
by: =?Utf-8?B?TWFyaw==?= |
last post by:
In Visual Basic 2008 how do I programmatically set a node to selected?
For example, my treeview has several nodes with dates, and I want set one
of the dates as selected because it happens to...
|
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
| |