option

Is this a IE8 or jQuery's bug?

<option> doesn't respond click/contextmenu events in IE8? Here is all the code to verify it locally: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-type" content="...

How to check which <option> is actually clicked?

$('select').bind('click contextmenu',function(ev){ }) ev.target is always a select,not option. How can I know which one is now being clicked? Don't tell me to do this: $('option').bind('click contextmenu',function(ev){ }) Because it's not supported in IE8,and you can test it yourself! EDIT It should also support right click,wh...

How to convert X => Option[R] to PartialFunction[X,R]

As long as we have a PartialFunction[X,R] it's very easy to convert it to a function returning Option[R], e.g. def pfToOptf[X, R](f: PartialFunction[X,R])(x: X) = if (f.isDefinedAt(x)) Some(f(x)) else None However, what if the task is opposite: suppose I have a function f getting X as an argument and returning Option[R] as a r...

how to make sure select option text align in the center in IE?

select,option{text-align:center;} works in FF, but not in IE(at least 8.0), how could I make sure that the text align in the center for IE8.0? Thanks!!! ...

login - change form action based on selection?

I have this script on a mafia game where i have 4 worlds/servers I have index.php where i want to login directly to one of the servers by selecting it from a option I have this code and i need to change form action <form action="/ro1/index.php?action=login" method="post"> <input id="user" name="user" class="text" type="text" value="Na...

Detect when a specific <option> is selected with jQuery

Hi, I have the following drop-down menu: <select name='type' id='type'> <option id='trade_buy' value='1' selected='selected'>Buy</option> <option id='trade_buy_max' value='1'>Buy max</option> <option id='trade_sell' value='2'>Sell</option> <option id='trade_sell_max' value='2'>Sell max</option> </select> I'd like jQue...

How to restrict refresh option?

Hi, There is a problem. I don't want that people would be able to refresh one page on my site. How can I do it? ...

using href links inside <option> tag

I have the following html code: <select name="forma"> <option value="Home">Home</option> <option value="Contact">Contact</option> <option value="Sitemap">Sitemap</option> </select> how can i make Home, Contact and Sitemap values as links? i used the following code an as i expected it didnt work, <select name="forma"> <option value="H...

jQuery return the first match in a select list

I want to select the first option in a select list which matches a certain value, currently the last match is selected, like so: jQuery('.edit-item').click(function(){ var id = jQuery(this).attr('id'); var assignee = jQuery('#assignee-'+id).text(); jQuery('#edit-form-'+id+' select[name=item[responsible]]').val(assignee); re...

How to save the text file without dialogue box in actiondcript 3?

Hi, i want to save the text file without dialogue box and store the given particular path in flash actionscript 3.0 or 2.0. if anyone know above issue,let me know ...

Simple way to select chosen option in <select> from the value given by $_POST?

How can i add the selected="selected" bit to the option in an HTML <select> input from the sent $_POST data without an if statement within each option? ...

Selenium: Get current value from drop-down menu

Hi there. I'm trying to find a simple Selenium call to grab the current option from a select drop-down list. I'm aware there are calls which grab all the values in a list but I wish to know which option is currently selected. Apologies if this is trivial but google and Selenium IDE didn't help me. Thanks. ...

Decimal validation + PHP ?

How to do decimal number validation in PHP? :) (The decimal point is optional) it should accept ... 0 , 1 , 2 , 0.123 , 0.2 , 12.34 etc. ...

Combined grammar ANTLR option filter

I have a combined grammar (lexer and parser on the same file). How do I set the filter = true to the lexer? Thanks ...

Oracle Option Keyword

I would like to ask if anybody has any knows how to use the OPTION keyword. I have encountered this on an old C source code that I have been reading. OPTION SELECT ROWID FROM TABLE_1 WHERE PRODUCT_CODE = ANY(SELECT PRODUCT_CODE FROM PRODUCT_TABLE WHERE PRODUCT_GROUP='value a') FOR UPDATE NOWAIT; SELECT ROWID FROM TABLE_2 WHERE PRODUCT_...

Option in italics

Is there any cross-browser way to italicize select options? With the following CSS and HTML, FireFox shows the second option in italics, but not the third. None of the options are italicized in IE 7 or Safari. <style> option.bravo { font-style: italic; } </style> <select> <option>Alpha</option> <option class="bravo">Bravo...

How to setup a Zend_Form_Element_Select with multiple params at OPTION tags

Hi. I am creating a Zend Form to allow the user to change the current Locale from a list saved in my DB. I would like to know how to add more attribs to the option list. $obj_locales_select = new Zend_Form_Element_Select('sel_locale'); $obj_locales_select->setLabel('form-params-language-changelocale-sel_locale-label'); $obj_locales_sele...

WebBrowser control HTMLDocument automate selecting option drop-down

I'm trying to automate in a WinForm using a WebBrowser control to navigate and pull report info from a website. You can enter values in textboxes and invoke the click events for buttons and links, but I have not figured out how select a option drop-down .... in a automated way. Anybody recommend how to select a item from a drop-down, giv...

An HTMLInputElement gets clicked, and an HTMLOptionElement gets...

I'm am trying to write vba code to fill out web-forms and click buttons for me. I am looping through the various option tags on the page to select the one I want. When I reach it, I want to select it, but I'm not sure of the syntax. Dim htmlO As HTMLOptionElement For Each htmlO In Object.getElementByTagName("option") If Trim(htmlO.v...

How do I create an F# mutable option type?

I need to create a mutable option<T> type in F#. I've tried writing let x = ref None and subsequently writing x := Some(z) but it doesn't work. Help! ...