Zane Posted March 2, 2012 Share Posted March 2, 2012 Can anyone tell me why this doesn't work in IE? Other than the fact that it is IE $("#wrapper tr").live('click', function() { var link = $(this).find("input").attr('value'); alert(link); //window.open(link); }); When I run this in FF, the alert says "NOLINK", like I have hardcoded into the input When I use IE, of course, it fails to work... and the alert says "undefined" Quote Link to comment Share on other sites More sharing options...
Zane Posted March 2, 2012 Author Share Posted March 2, 2012 When I take the attr() part away, then FF and IE work the same way. I get an alert of object : Object in each browser I have also tried the val() function, I get the same results. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted March 2, 2012 Share Posted March 2, 2012 Well, either way, the .val() method should always be used to get a value from an element. So you are saying that $(this).find("input").val() does not work either? If not, a couple of questions I have just for some additional info: 1. What version of IE are you using to test this? 2. What version of jquery? 3. Can you please post the snippet of code that this script is meant to grab the value from. 4. Would there by chance be any conflicting code? 5. Are there any errors present before reaching this script? IE is known to stop parsing script if there is an error present. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.