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.
Related
I currently have an app which has 2 buttons that must both be disabled when either is clicked. Initially, I had decided to use ng-disabled, however, to my amazement it is not compatible with ie8.
I have been scouring the web for a solution but am unable to find one. Any help would be greatly appreciated. If you need more information on my problem do not hesitate to ask.
Thanks in advance.
Update: I have decided to try use doucumentById to set the buttons to disabled but still no luck. Clicking the first button will disable the first button, it should disable both, and clicking the second disables both buttons, as it should.
I have a standard HTML form with CSS styling.
Everything works fine however when testing on an iPad (both iOS7 and 8) it is very slow (approx 1-2 seconds) to respond to key presses on the native keyboard when trying to enter text in to the form fields.
I tried removing elements from the page to work out what is causing this issue and it appears to be the select boxes. Especially the 'Nationality' field which has in excess of 100 selectable values.
I tried this on other peoples' live form and the same problem appeared so I believe this is an iPad/iOS issue.
Has anyone uncounted this and do you know a workaround?
Kind regards,
F.Y.I This was an iPad/iOS issue that was fixed in iOS 8.1.3
I have a question that is a little outside my realm. I'm a newbie to jquery and javascript. I run a forum on ProBoards, and when the forum runs out of its allocation for attachments (pictures the users can post) I have to manually go through the attachment list and check every single checkbox one by one, then I am able to click a delete button to delete every attachment I've checked. Checking the thousands of boxes one by one takes forever. There is no implemented "check all", and there are thousands of checkboxes.
In the code, every single checkbox has the name ids[]:
<input type="checkbox" value="1494" name="ids[]"></input>
So I should be able to target them by the name "ids[]" I would think. The value is different for each one. The name is the same for all. But the question is... what code would I use and where would I put it in Firebug or Inspector? I'm sadly too much of a noob to be able to figure out what I would do.
I have Firebug for Firefox, and in that I have the add-on jQuerify, so I can force jQuery into the code if that helps create the simplest solution.
Basically I'm looking for a way to add some code to automatically check every single one of these boxes (or add a button that will allow me to do so if that is the only way), and I must be able to do it from Firebug or the Inspector in Firefox (or even in Chrome would be fine). I don't think I am able to modify the code (permanently) of this specific administrative page of my forum, so I need to be able to do it from the Inspector/Firebug. I'd like something I can just copy and paste into there to save myself 45 minutes to an hour of clicking thousands of checkboxes one by one.
Any solutions?
Use like this,
$("input:checkbox").attr('checked','checked');
You should be able to use the following in the console:
$('[name="ids[]"]').prop('checked',true)
Using Inspector Console F12 you can get all checkbox and check them
$('input:checkbox').prop('checked', 'checked');
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 :)
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.