I'm not familiar with the Admintasia template. If #AP_PONum is in the DOM when you bind the event handler, then you shouldn't need live. It's only one element, so there shouldn't be a performance hit either if you just use bind. The only reason .bind() wouldn't work is if #AP_PONum isn't in the DOM when you call it (or if you later remove #AP_PONum and then add an element with id="AP_PONum" later).

Given those caveats, this should work:

$("#AP_PONum").bind("change", function(){
        ap_po = $(this).val();
        $("#content-box")
.load("webapps/finished_jewelry/PurReq/display/ dsp_addPurchaseRequest.cfm?poNum="+ap_po);
});

If that still doesn't work for you, we'd be able to help more effectively if we could see if a test page somewhere.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 14, 2009, at 9:41 AM, Scott Stewart wrote:

"working" and "supported" are two different animals

This is true...

Back to my particular anomaly...

I just replaced the "live" call with a "bind" call, and now there's nothing
in Firefox either..

I'm using the Admintasia template
(http://www.admintasia.com). Because of the way this is set up (or the way that I'm calling things) I've had to use the live function to get things to
work.

I think I'm right in assuming that the "live" function keeps the Ajax events
alive...

So is there a way to get around this? I can always add a submit button to
every dropdown I'm using but that would kind of defeat the purpose.

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Monday, December 14, 2009 9:10 AM
To: jQuery (English)
Subject: [jQuery] Re: load() function and IE8

"But if it's not supported then why would it work in Firefox? "

"working" and "supported" are two different animals

And it works because the "change" event does bubble events the way
that works with ".live()", and, no surprise here, IE doesn't bubble
events the way that works with ".live()".... but apparently some way
around IE's shortcomings is in place for 1.4's implementation of ".live
()"


On Dec 14, 8:56 am, "Scott Stewart" <sstwebwo...@bellsouth.net> wrote:
Thanks Karl,

But if it's not supported then why would it work in Firefox?
Secondly, would the bind method be a workaround?

Thanks

sas

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery- e...@googlegroups.com] On

Behalf Of Karl Swedberg
Sent: Monday, December 14, 2009 12:33 AM
To: jQuery (English)
Subject: [jQuery] Re: load() function and IE8

Hi Scott,

Take a look at the documentation for the .live() method:

"Currently not supported: blur, focus, mouseenter, mouseleave, change,
submit"

http://docs.jquery.com/Events/live#typefn

The change event doesn't bubble in IE, so it doesn't work with .live
(). jQuery 1.4 is going to provide a workaround for that, but as of
1.3.2, it's not supported.

On Dec 10, 5:02 pm, Scott Stewart <sstwebwo...@bellsouth.net> wrote:
I fat fingered the last one so...

I have this piece of code

$("#AP_PONum").live("change", function(){
   ap_po = $("option:selected",this).val();
$("#content-box").load("webapps/finished_jewelry/PurReq/display/
dsp_addPurchaseRequest.cfm?poNum="+ap_po);

});

which works like a champ in firefox.

it's called from a drop down grabs the ColdFusion template and load it
in a div called content-box.

This does nothing in IE8, no error, no load, no love.. nothing

any ideas on how to work around this?


Reply via email to