Topic: What's violated with this post-ajax call? Pages that link to <a href="" title="Pages that link to Topic: What&amp;#039;s violated with this post-ajax call?" rel="nofollow" >Topic: What&#039;s violated with this post-ajax call?\

Author Thread
Neurotic (0) Inmate
Newly admitted

Insane since: Jun 2008

IP logged posted posted 06-15-2008 17:40 Edit Quote

After an AJAX call to the server,
I wish to display the echoed results
in a pop up window.

Here's the segment handling the echo:

if (http.readyState == 4) {
results = http.responseText.split(",");'sessionwindow.html','sessscr','height=300,width=350');
var tmp = sesswin.document;
tmp.write('<html><head><title>Session Report</title>');
if (window.focus) {tmp.focus()}

Why won't this work?
Why is the "tmp = ..." line of code giving me a "undefined value" error?

Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 06-15-2008 18:23 Edit Quote

Although the page you opens has a relative path and therefore does not throw a security exception when trying to access it, I wouldn't be surprised if its document were READONLY and possibily not exposed to JS.

What if you don't specify a URL in the ? Also since you're going the Ajax road, why using a popup window anyway instead of updating an element in the current page ?

Obsessive-Compulsive (I) Inmate

Insane since: Jun 2008

IP logged posted posted 06-15-2008 18:50 Edit Quote

Thanks for responding poi.

I removed the URL spec but I still come up with a
"sesswin is null" for the line that reads:
var tmp = sesswin.document;

In answer to your question,
I want to display a page with a session's results
once a session has been completed.

I initially thought to go to a new page,
but I could not send to it the parameters I received from the ajax's echo.

So now I think to display the echoed results via a pop up window.

The pop-up window code works when an event handler on the page is
clicked, but for some reason that I haven't figured out yet,
the croaks if invoked on an ajax's echo.

Post Reply
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
Your Text:
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu