Simple question

D

DL

I have a server side page that would submit a form with id of "txt" to
itself for further process. And I would also like to reload the its
opener when it is closed by a user BUT NOT when the page is submitted
to itself.

What I tried to do is to determine if a form is submitted for the
parent reload trigger, please see the BODY tag part below. However
it's not working as expected, how come?

Thanks.

The page's HTML looks like this:

<html>
<body onunload="if (!document.forms['txt'].submit() && window.opener
&& !window.opener.closed {window.opener.location.reload(); }>

<form id="txt"....>
....
</form>
</body>
</html>
 
E

Evertjan.

DL wrote on 04 jun 2010 in comp.lang.javascript:
I have a server side page

A server side page is not much use to the user of a browser, meseems.

In other words, serverside there are streams to the client, often,
but not necassarily, based on a serverside file.

Server side "pages" do not exist.
that would submit a form with id of "txt"

But if there were server side pages they would not be able to submit
anything, if you mean submitting a form, or it would be a server.xmlhttp
doing a post request.
to itself for further process.

so a server.xmlhttp post request to it's own stream?
And I would also like to reload the its opener

An opener of a server side page, what is that?
when it is closed by a user BUT NOT when the page is submitted
to itself.

Such server side pages do not have a user, meseems.
What I tried to do is to determine if a form is submitted for the
parent reload trigger, please see the BODY tag part below. However
it's not working as expected, how come?

Thanks.

The page's HTML looks like this:

<html>
<body onunload="if (!document.forms['txt'].submit() && window.opener
&& !window.opener.closed {window.opener.location.reload(); }>

You cannot execute clientside javascript serverside.
<form id="txt"....>
...
</form>
</body>
</html>

I hope I misunderstood your reasoning and you mean a browser page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top