Jump to content

Why does this not work..?


Zane

Recommended Posts

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"

 

 

Link to comment
https://forums.phpfreaks.com/topic/258122-why-does-this-not-work/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.