views:

12

answers:

0

Hi, I am using Jquery to create dynamic links based on user input. I have a set of elements in my ajax loaded div that looks like this

<div class="mxcell">
<input type="text" size="40" class="input_name" value="">
<a href="#" target="_blank" class="dyn_link">
<img src="http://127.0.0.1/images/arrow_right.gif"&gt;
</a>
</div>

Now in Jquery I write

$(function(){
$("#right").delegate(".input_name", "change", function(){
var dyn_link = $(this).val()
$(this).parent().find("a").attr("href", "http://www.example.com/"+ dyn_link +".html");
});
});

This works fine in Chrome/Firefox, but not in Internet Explorer.

Any ideas?

IE debugger pointed to Jquery line 69 character 15. Wouldn't know to investigate it further.

UPDATE:

I solved the above by using focusOut() instead of change()

But am not still sure whether there is a better solution