Dropdown reset issues with IE7 works fine on FireFox and Chrome - javascript

Hello Stackoverflow I have a simple form validation logic that doesn't seem to work on IE7 for some reason.
Basically I have two dropdown boxes and an input box. When the first dropdown box state changes the other dropdown and inputbox clears.
Current this logic seem to work on FF, Chrome but not IE7. Also the clearing of the input box works as expected on IE as well.
$('#names').change(function(){
$('#rate').val("0");
$('#amount').val("");
});
Any helps would be greatly appreciated.

It seems IE requires you to add the null value in order to change it to the first element.
<option>--</option>
To
<option value="0">--</option>
Fixed the issue :)

Related

jquery autocomplete combox not working in IE

I am using autocomplete combo-box plugin in my form this work fine in all the browser except IE.
this code I am using
When I focus or type it populate option but when I select it does not set selected option in input box. this works fine in other browser firefox and chrome.
Please help me if I missed anything here.

Innerhtml not retaining selected options for Selectbox and Radio in Mozilla and Chrome but works fine in IE

I have an application with several tabs, each of them having couple of fields. The last tab is Preview tab wherein I would like to show all the controls from all tabs in grayed color in uneditable mode. To do that, I am taking innerhtml of all tabs and showing the same in Preview tab.
While this logic works fine for Text fields, Select fields and Radio fields are not retaining their selected options in Mozilla and Chrome. It works as expected in IE 7, 8 and 9 too.
Any clue on this?
Try using the clone() method to make a copy of it instead of using the innerHTML property.
Example in JSFiddle: http://jsfiddle.net/jLB5s/

IE javascript / jquery issue

I am trying to get these 2 select drop downs to work which basically rely on each other for out of stock. The idea is that out of stock combination would be disabled from the user selection. This works fine in all browsers except IE.
I found a script for IE which basically adds disabled class and does an alert pop up and then resets the select dropdown.
Here is a demo: http://jsbin.com/osipe5/2
In that, please select size as 1X. As you can see everything works perfectly. We are good. Now select size 2X. In the color dropdown "White" has the disabled class. That is not correct. The issue is somewhere with ieLessThan8OptionDisable()
Any help is much appreciated.
Thanks
I'm guessing the problem is this line in ieLessThan8OptionDisable():
this.blur();
Change it to $(this).blur();. But seriously, please stop writing browser-specific code with jQuery.
Since you're running into a common IE pre-8 bug, you might want to see this question.

Next button + Javascript form manipulation result in problem on iPhone

I have got a form with 2 dropdown lists on a simple HTML page. Depending on the value selected in the first dropdown list, a Javascript event handler(using the onChange event) changes the options of the second dropdown list.
When selecting a value in the first box and touching the second box in the browser window everything works fine, but when I use the "next" button provided by the dropdown-list-thing of Mobile Safari, only the rendered list changes, but the dropdown-list-thing shows still the old values. How can I fix this?
thanks in advance
Edit:
I've since discovered this is indeed a bug in Mobile Safari. The HTML is updated but the picker view that is loaded up does not update it's values from when it first opens.

Select items runs fine in Chrome et al but not on Android G-1 browser?

This little web page runs fine on my desktop but when selecting the area with a G-1 Android device (select box that says statewide..) the data refreshed with the requested data in the table but the text in the select box does not change,,, the other select boxes (month and year) work fine.. Fwiw the data is still rough and so is the gadget...
I've rebooted and restarted the g-1 to no avail..
http://dl.dropbox.com/u/4303088/gadgetdraftok.html
The broader question, i guess, here is how to debug a web page on any android browser? we don't have a firebug equivalent..
Further I confirmed the same bug in the Moto Cliq browser (also old still a 1.5) very strange every once in a while the G-1 operates correctly, but I can't figure out how to get it to do it, just that every once in a while the select shows in the window when selected and the data refreshes..
I have verified that this seems to be a verified bug in the early browsers... so now I'm trying to figure a work around, I added setFocus on the select box but it is ignored on the Android G-1
****New info****
I actually used this test tool from W3schools try-it site and it demonstrates the non-behavior in just a few lines..
http://www.w3schools.com/js/tryit.asp?filename=tryjs_focus i.e. it works fine on desktop but does not give focus when on phone.. anyone have a work around idea? ( I figured setFocus would be my silver bullet but sadly no)
I have three select boxes on the app so I need to display the selected info...as the selection is served.. not just initialization. FWIW the behavior seems to be on select boxes that have the selection dynamically loaded,, when I finish all three boxes will need dynamic loading now only the area box is dynamic, year/month are coded and so work.
What doesn't work properly are the items that contain spaces in them, e.g. Lee County.
Fixed the issue, A) spelled areas right in set a focus routine called at end of data refresh, (at one point I had it as area vs. areas) this forces the select to update the value and I went ahead and used the value of the select in the table head to provide "back-up visual confirmation that the area is elected.. works fine now ! :-)
http://dl.dropbox.com/u/4303088/gadgetdraftok3.html
So the main deal seems to be if you want to show the value, set the focus... I think, even though that is not required on the desktop.

Categories

Resources