Actually found what I was looking for, it is here.
http://blog.kotowicz.net/2009/03/jquery-optiontree-demo.html
Thanks
On Sep 15, 8:50 am, Richard Walsh rwa...@datagroup.ca wrote:
I remember seeing a sample somewhere, now for the life of me when I
actually need to use it. I can't remember how
I just realized I may need to explain a little further.
I've got a table on the same page. Clicking on a record in that table
populates a small form on the page with the information from that
record. The text and check boxes are easy enough to populate, but
telling the select box which of it's
I'm not sure about the:
if($this.attr(textContent) == PublishTo)
part. It sounds very custom. Provided this conditional check is
working correctly, how about trying:
$this.attr(selected, selected) ;
to set the value.
Or if you can get the actual options value, you can set the value of
James,
Thanks for the response. I don't know why I didn't see it before, but
your comment about the conditional check got me thinking. I did try
$this.attr(selected, selected);
and that works just as well as my original, but the conditional is
where my problem was. FF understood the
Thanks a lot for your answers!
My solution with a bit of jQuery magic looks like this:
$(#wgt2 ).change(function() {
$(this).children(option:selected).each(function() {
var selectValue = $(this).val();
var selectText = $(this).text();
$(this).removeAttr('selected');
zenx wrote:
Hi,
I don't know how to change the selected item in a selectbox. I tried
this but it doesn't work as expected.
HTML code:
=
select id=id_cliente name=cliente size=1
option value= selected=selected-/option
option value=1First/option
option
I don't know how to change the selected item in a selectbox. I tried
this but it doesn't work as expected.
HTML code:
=
select id=id_cliente name=cliente size=1
option value= selected=selected-/option
option value=1First/option
option value=2Second/option
/select
Dan G. Switzer, II wrote:
I don't know how to change the selected item in a selectbox. I tried
this but it doesn't work as expected.
HTML code:
=
select id=id_cliente name=cliente size=1
option value= selected=selected-/option
option value=1First/option
option
Using my Field plug-in (http://jquery.com/plugins/project/field) you
could
do:
$(#id_cliente).setValue(2);
The big benefit to using my Field plug-in is that you can change the form
field from a select box to a checkbox or radio element and you would not
have to refactor code that
Klaus,
As Dan pointed out, his Field plugin is very adept at getting, setting
and otherwise manipulating data for field elements and Dan is adding
new capabilities regularly. The Form plugin is mostly geared at
providing ajax capabilities for the submit process. It also provides
methods for
Mike Alsup wrote:
Klaus,
As Dan pointed out, his Field plugin is very adept at getting, setting
and otherwise manipulating data for field elements and Dan is adding
new capabilities regularly. The Form plugin is mostly geared at
providing ajax capabilities for the submit process. It also
Klaus, Dan, thank you for your help. I tried both ways and they worked
correctly. I think I will use the Field plugin for many things in the
future.
Thank you!
On 17 jul, 18:37, Klaus Hartl [EMAIL PROTECTED] wrote:
Mike Alsup wrote:
Klaus,
As Dan pointed out, his Field plugin is very
12 matches
Mail list logo