I'd suggest .live() still. Or maybe you could try eval() those
JavaScript code after Ajax fetch and DOM manipulation complete
manually? btw, do you check the page source using `view page source'
or firebug's dom inspector? latter recommended.
On Apr 15, 3:56 pm, Snef sne...@gmail.com wrote:
2009/4/15 Snef sne...@gmail.com:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the javascript tags.
When 'inserting' the returned data into a div
2009/4/15 Snef sne...@gmail.com:
I already tried it with the $(document).ready(function(){.}). No
success. :(
And through $.getJSON()?
At night I can send you an string what is go through json into $(#foo).html();
András
--
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
--
The 'problem' using .live() is that i need to have all the scripts
loaded even when they are not used. I just wanted to have only the
scripts related to that form.
The check is either in 'view generated source' in FF and the dom
inspector.
I'm not sure about eval, sounds like evil ;)
A simple
Donny Kurnia schreef:
Snef wrote:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the javascript tags.
When 'inserting' the returned data
Well a tip to all. When having problems, first give your pc a nice
reboot ;)
Suddenly it is working :S Don;t know why, but it is.
Thanx for all support!
Snef schreef:
Donny Kurnia schreef:
Snef wrote:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a
2009/4/15 Snef sne...@gmail.com:
Well a tip to all. When having problems, first give your pc a nice
reboot ;)
Are you serious? :)
Which OS do you have?
Suddenly it is working :S Don;t know why, but it is.
O_o
--
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- Bízzál
I do not think it is due to $.ajax function. Even when using plain $
(#freediv).html(.) it won't work.
(and I don't need json yet).
András Csányi schreef:
2009/4/15 Snef sne...@gmail.com:
I already tried it with the $(document).ready(function(){.}). No
success. :(
And through
András Csányi schreef:
2009/4/15 Snef sne...@gmail.com:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the javascript tags.
When
Snef wrote:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the javascript tags.
When 'inserting' the returned data into a div on the screen, the
simple solution using your example that works
Create a js file "test.js" containing :
$('#freediv').html('h1 id="test"test/h1');
$("#test").click(function(){
alert("Bla");
});
I used an a tag in html to click to call the test.js file as
follows:
script type="text/_javascript_"
Snef wrote:
Donny Kurnia schreef:
Snef wrote:
When using $.ajax() i encounter some problems.
With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the javascript tags.
When 'inserting' the
12 matches
Mail list logo