I’m getting a jquery error in the IE8 debugger but I’m not sure which function is causing it. I’ve seen a whole bunch of posts here that state that IE8 doesn’t support native trim(), but I’m not (I don’t think) using a native version (I inherited this code; it’s not something I wrote from scratch.)
Here’s the chunk that’s causing issues – it’s part of a click function:
greenlight = false;
link = $(this);
href = $(this).attr("href");
row = $(this).parent().parent();
if ($(":text", row).exists()) {
new_email = jQuery.trim($(":text", row).val());
//do stuff here
}
The error I’m getting in the debugger is on the line starting new_email; the error is “Object doesn’t support this property or method.”
Can anyone help me figure out 1) which property or method IE8 doesn’t support, and 2) what I can do to fix it? I’m in no way a jquery expert; I’m 99% server-side.
The code does work in Chrome, Safari, and Firefox.
Update:
Due to new information, I think you come accross an issue with IE where it will have a conflict when you have a variable and a element IDed with the same name it will cause conflicts and confusing error messages about functinality not exitsting. See this reference for a more detailed explanation. http://www.karlstanley.net/blog/?p=5
Original Answer:
If you are having problems debugging a single complex line split it into parts,