views:

26

answers:

1

Hi,

I am trying to save data into a variable like so (so i can keep track of what was posted to jquery)

$(document).ajaxSuccess (function product(a, b, s) {
    document.write('url: ' + s.data);
});

I am using flexigridlink text and the above code is printing out the correct data, but preventing flexigrid to load, and hanging the page. So I get a white page with the posted url printed out. I also get "failed to load source" in firebug.

i am wondering is it a similar problem to this? link text

Ive been trying for 3 days now to work out how to get the posted data from this script, so any ideas would be much appreciated :)

Cheers

Ke

+1  A: 

if you do this

document.write('any thing'); // it will display white screen with string passes

in spite of doing document.write do something like this

<div id="target"></div>
jQuery('#target').append(s.data)

Iam not very sure this your requirement or not. Please provide more code if you are looking for some thing else.

Praveen Prasad
oh my gosh thanku thanku thanku, u solved my problems, much respect! it seems i cannot do document.write. any idea why this is, is it because its inside a function, or due to the same thing from the link i gave?
Ke
document is a property of window, document holds the dom(HTML), when you do document.write() it clears the current DOM and prints whatever data passed to it. thats why ur page became white.
Praveen Prasad