Hello,
Been trying to fix this for a while now. I have loads of Dojo Filtering Select elements in my form. I need them to have a blank option which should be selected by default. Here is an example (of a normal <select> structure) that I want to emulate:
<select>
<option value="">-</option>
<option value="foo">Bar</option>
</s...
hi,
I am having an issue with parsing XML with JQuery when there is a node with an option node
<preferences><dashboard>
<report id="si_pg_vw" order="0">
<header>
<data>
<option type="reportname" value="Page View"/>
</data>
</header>
</report>
the following code in firebug returns no children
$reportElement.find("...
I have a page with 5 select's that all have a class name 'ct'. I need to remove the option with a value of 'X' from each select while running an onclick event. My code is:
$(".ct").each(function() {
$(this).find('X').remove();
});
Where am I going wrong?
Thanks,
Chris
...
When I attempt to add an option to a select the option I'm trying to append ends up appended to the first option instead of the select itself.
$(".ct [value='']").each(function() {
$(this).append($("<option></option>").attr("value", "Reset").text("Reset"));
});
Help?
...
example:
<select>
<option value='1'>hello me<option>
<option value='2'>hello world</option>
</select>
how can I access a TEXT not VALUE from select box
so I can display HELLO ME or HELLO WORLD instead of 1 & 2.
...
Hi,
I have a page that contains 20 select's with a class name of '.ct'. I need a selector that determines if a select exists that contains 3 or more options.
Thanks,
Chris
...
Hey,
I have a select options form fields setup like below:
<select name="options[]" multiple="multiple">
<option value="1" selected="selected">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
</select>
The user can select multiple options, but I woul...
I often find myself with an Option[T] for some type T and wish to test the value of the option against some value. For example:
val opt = Some("oxbow")
if (opt.isDefined && opt.get == "lakes")
//do something
The following code is equivalent and removes the requirement to test the existence of the value of the option
if (opt.map(_...
For Internet Explorer only it seems that the target (srcElement) of clicks,mousedowns,mouseups,mouseovers,etc on <select /> elements will not be tied to the <option /> element.
Given the following HTML:
<select id="madness">
<option value="1">One</option>
<option value="2">Two</option>
<option value="2">Three</option>
</sele...
Hi I am exploring ways to implement something Visitor Patterns alike without all the decorating visit methods. Sofar I found out I could use Option Strict Off in VB.NET but it has some side effects. I have a set of Shape classes that inherit from a baseclass Shape. Assume we have the following class that Accept's shapes:
Public Class Sh...
The <select> has a width of 60px,
but the content of <option> is longer than that.
Which is hidden in IE6.
How to fix that?
...
My select list is called dropListBuilding. The folliowng code seems to not work:
for (var i = 0; i < buildings.length; i++) {
var val = buildings[i];
var text = buildings[i];
alert("value of builing at: " + i.toString() + " is: " + val);
$("#dropListBuilding").addOption(val, text, false);
}
This line dies: $("#dr...
I need to return values, and when someone asks for a value, tell them one of three things:
Here is the value
There is no value
We have no information on this value (unknown)
case 2 is subtly different than case 3. Example:
val radio = car.radioType
we know the value: return the radio type, say "pioneer"
b. there is no value: re...
Hi everyone,
I am currently developing a Struts (1.3.10) application and I'm trying to show in a combo box a set of data. Every single option(row) is a String created by the union of 3 different Strings.
My question is if it's possible to tabulate that information in every option from the combo box, to show the information like the exa...
Is this an opportunity to make things a bit more efficient (for the prorammer): I find it gets a bit tiresome having to wrap things in Some, e.g. Some(5). What about something like this:
implicit def T2OptionT( x : T) : Option[T] = if ( x == null ) None else Some(x)
...
If I have something like a List[Option[A]] and I want to convert this into a List[A], the standard way is to use flatMap:
scala> val l = List(Some("Hello"), None, Some("World"))
l: List[Option[java.lang.String]] = List(Some(Hello), None, Some(World))
scala> l.flatMap( o => o)
res0: List[java.lang.String] = List(Hello, World)
Now o =>...
hello, I'm trying to get the selected option via jQuery everytime I change it, and eventually the value attribute, buy I always have problems with js!!
HTML
<select>
<option value="us">United States</option>
<option value="gb">United Kingdom</option>
<option value="de" selected="selected">Germany</option>
<option value="fr">France<...
Hey all,
I'm attempting to repopulate a drop down menu. I'm making an ajax call to retrieve myList. When I have the new list, I remove all the options from the select element and insert the new values (about 100 options). This works great on later versions of IE and Firefox; the refresh is almost instant. However, on IE6, these oper...
Is it possible to write a generalised orElse method from Option that takes a variable number of arguments? That is, instead of:
lazy val o1 = { println("foo"); None }
lazy val o2 = { println("bar"); Some("bar") }
lazy val o3 = { println("baz"); Some("baz") }
// ...
o1 orElse o2 orElse o3 // orElse ...
You could use:
orElse(o1, o2, o...
So I'm having a crossbrowser javascript issue.
I've got a <select> dom element that has some descendent <option> element with selected=true.
In Firefox, I can just do select_elt.value to get the value of the selected option, but this seems not to work in IE6 (which I need to support).
I tried to iterate through the select_elt.getEleme...