Well, I never got it working quite right. in FF it was never a
problem, but IE just refused to behave! I ended up trying prototype
expecting the exact same problem - scripts would not load/execute/
insert into DOM. To my surprise, everything worked out great using
the Ajax.Request(url,{method:g
I now have an example site up at:
http://www.ohchem.com/jsexample
it works fine in FF, IE6 gives strange behavior. First load gives
different results to subesquent loads, and the data is never actually
posted in IE6 like it is in FF!
Any clues??
> $('div#content').children('script').html();
alert($('div#content').children('script').html()); says "Null".
I changed the ajax request to:
$('#content').load(this.href); //used to load html + script in post 6
this thread
and again under FF & Safari, the loaded script executes when
requ
Try html() rather than text():
$('div#content').children('script').html();
Karl Rudd
On 5/2/07, Dave <[EMAIL PROTECTED]> wrote:
So I haven't really made any progress, but my javascript works great
in FF. Some debugging alerts are telling me that the script is loaded
under FF but not in I
So I haven't really made any progress, but my javascript works great
in FF. Some debugging alerts are telling me that the script is loaded
under FF but not in IE 6.
$('div#content').children('script').text() returns the script code in
the
Karl
I really appreciate the responses. I'm not new to "programming" but I
am very much a noob where javascript is concerned. What I'm now
looking for is an explicit example of how to do what I'm trying. The
code in this group helps, but it seems to be either confusing or
slightly off target.
Ah! In that case you can pull your Javascript form submit code into a
function and then call that function in the callback of the ajax
load. Whenever new content is added to the DOM, we need to re-bind
events so they recognize the new DOM elements. Actually, there are
other ways to do this,
I think I now realize what my problem is. I have a structure where
php loads a header and footer. The central content div is updated via
ajax. This is where the javascript resides so a $(document).ready may
not actually be triggered since the http headers etc aren't being sent
on ajax update. T
Karl
I've tried:
$(document).ready(function(){
$('#fname').bind("submit", function() {
myfunc('param1','param2','param3');
return false;
});
});
and
$(document).ready(function(){
$('#buttonid).click(function() {
myfunc('param1','param2','param3')
Hi Dave,
I think you should be attaching the event to the form submit. Also,
jQuery makes unobtrusive JavaScript really easy, so instead of
attaching a handler in the HTML, you can put it in a separate file.
Try something like this:
$(document).ready(function() {
$('#fname').submit(func
10 matches
Mail list logo