Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Simple question

Reply
Thread Tools

Simple question

 
 
DL
Guest
Posts: n/a
 
      06-04-2010

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>

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      06-04-2010
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz, a simple answer to a simple question about IP addresses MeekiMoo Computer Support 0 07-28-2009 08:10 AM
Simple region code question... simple answer?? joseph.greer@gmail.com DVD Video 7 01-26-2007 09:07 PM
Simple Question - Simple Answer? Daniel Frey XML 4 01-12-2005 04:25 PM
Re: Simple Simple question!!! Kevin Spencer ASP .Net 0 06-25-2004 05:25 PM
Re: Simple Simple question!!! ashelley@inlandkwpp.com ASP .Net 0 06-25-2004 04:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57