Posting to 2 different files

K

Kavi

I was hoping any javascript and asp gurus may help me with this
problem, o.k well here it is....

i have a form, which has a user and password, that a user enters

when i want to submit this form....

i would like to submit it to 2 two different files.

so file1.asp would have user and password....and file2.asp would have
user and password.

i would like two different windows to open, if possible. so the user
can work on both windows at once.

window 1 = file1.asp
window 2 = file2.asp
 
E

Evertjan.

Kavi wrote on 22 apr 2006 in comp.lang.javascript:
I was hoping any javascript and asp gurus may help me with this
problem, o.k well here it is....

i have a form, which has a user and password, that a user enters

when i want to submit this form....

i would like to submit it to 2 two different files.

so file1.asp would have user and password....and file2.asp would have
user and password.

i would like two different windows to open, if possible. so the user
can work on both windows at once.

window 1 = file1.asp
window 2 = file2.asp

[Serverside does not know about windows, or FF tab windows or popups.
Servers only "serve" file output on request,
so cannot initiate a second file.]

Try:

Submit to file1,
put the user/pw data in [serverside ASP] session variables,
have that file1 by clientside script code open
a [popup] second window with file2.

Done, except:
Beware of popup blockers and clientside script switch-off and
cros-browser incompatibilities.

==============

Never "give" a password to clientside html or code.
Restriction of access should be handled on the server.

"work .. at once", in the litteral sense(!),
is impossible for to-day's users and for to-day's browsers.
The use of keyboard and mouse input is given to one window at a time.
;-)
 
B

Bart Van der Donck

Evertjan. said:
[...]
[Serverside does not know about windows, or FF tab windows or popups.
Servers only "serve" file output on request,
so cannot initiate a second file.]
[...]

Misconception. Web servers have no problem to deliver more than 1 file
as a response to a single http request. It's the browser that may not
support it.

#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
use CGI qw/:push -nph/;
$| = 1;
print multipart_init(-boundary=>'----here we go!');
foreach (0 .. 4) {
print multipart_start(-type=>'text/plain'),
"The current time is ",scalar(localtime),"\n";
if ($_ < 4) {
print multipart_end;
} else {
print multipart_final;
}
sleep 1;
}

Nowadays browsers don't support this so-called 'server push' download
technology anymore. I believe the last one was Netscape 4. Email
clients still use this principle for sending attachments, though.
 
E

Evertjan.

Bart Van der Donck wrote on 22 apr 2006 in comp.lang.javascript:
Evertjan. said:
[...]
[Serverside does not know about windows, or FF tab windows or popups.
Servers only "serve" file output on request,
so cannot initiate a second file.]
[...]

Misconception. Web servers have no problem to deliver more than 1 file
as a response to a single http request. It's the browser that may not
support it.

I wouldn't call that a "server", Bart,
though you could certainly argue that.

A server [The name comes from 'servus' slave] is to serve what is asked.
I wouldn't frequent a restaurant where the waiter unasked pushes food into
my mouth, calling it "server push technique".

Nor would I like a browser opening a new window on order of the server,
without my prior asking to do that. That would be the ultimate popup craze.
Like the new Philips TV-chip patent-application denying zapping or sound
control during the commercial?
 
K

Kavi

wow!
This is my first time using the google groups, i wasn't not expected a
reply so soon, and so many. Thanks i will have to use this more often
;-).

and well this seems to work for me. Also i am aware of the implications
using the user and password, i was only unsing it as an example ;-)

form.action = "[the url]"
form.target = "_self"
form.submit()
form.action = [another url]"
form.target = "new"
form.submit()

thanks for you quick replies
 
E

Evertjan.

Kavi wrote on 24 apr 2006 in comp.lang.javascript:
This is my first time using the google groups, i wasn't not expected a
reply so soon, and so many. Thanks i will have to use this more often
;-).

This NG is NOT a google group but a Usenet group.

You are only using GG as a entry portal, and Usenet is much older than
Google and even than the web.

If you plan to frequent usenet a better way is to use a dedicated
news reader instead, like most of us do.
 
T

Thomas 'PointedEars' Lahn

Kavi said:
wow!
This is my first time using the google groups, i wasn't not expected a
reply so soon, and so many. Thanks i will have to use this more often
;-).

You are participating in Usenet via the Google Groups NNTP-to-HTTP
interface. Other people, including me, use newsreaders instead.

and well this seems to work for me. Also i am aware of the implications
using the user and password, i was only unsing it as an example ;-)

form.action = "[the url]"
form.target = "_self"
form.submit()
form.action = [another url]"
form.target = "new"
form.submit()

That would only work reliably if `form' was a reference to an object which
global execution context was different, i.e. in another frame or window
than the global execution context of the code.


PointedEars
 
R

Randy Webb

Evertjan. said the following on 4/24/2006 4:44 AM:
Kavi wrote on 24 apr 2006 in comp.lang.javascript:


This NG is NOT a google group but a Usenet group.

You are only using GG as a entry portal, and Usenet is much older than
Google and even than the web.

Usenet older than the web or the internet? The two words have become
synonymous but they aren't the same thing in a historical sense. Usenet
is older than the WWW but it is not older than the Internet.

And no, Al Gore didn't invent the Internet.
 
E

Evertjan.

Randy Webb wrote on 24 apr 2006 in comp.lang.javascript:
Usenet older than the web or the internet? The two words have become
synonymous

I certainly do not agree here.
but they aren't the same thing in a historical sense. Usenet
is older than the WWW but it is not older than the Internet.

You ever use "older" in a non-historical sense?

Off course: in a prehistorical sense.

Did I write Webb, per chance?
And no, Al Gore didn't invent the Internet.

Who is that? The Arab name giver of Algoritm?

Everyone knows the internet was not invented,
it always was there to be discovered.

The speed increase from the time of the Babylonian Responsa
to the present backbones will be the laughing stock of the future.

I am certain you will find a definition disputing my claim.
 
L

Lasse Reichstein Nielsen

Randy Webb said:
Usenet is older than the WWW but it is not older than the
Internet.

That's a matter of definitions.

From <URL:http://en.wikipedia.org/wiki/Internet>:
"The first TCP/IP wide area network was operational by 1 January 1983"
.... "(This date is held by some to be technically that of the birth
of the Internet.)"

From <URL:http://en.wikipedia.org/wiki/Usenet>:
"It was established in 1980 following experiments the previous year,
over a decade before the World Wide Web was introduced and the general
public was admitted to the Internet."

Depending on what you define as Usenet and as the Internet, Usenet
predates the internet by three years.

In the beginning, Usenet was transferred between the US and Australia
by airmail of magnetic tapes. No internet required :)

/L
 
E

Evertjan.

Lasse Reichstein Nielsen wrote on 24 apr 2006 in comp.lang.javascript:
That's a matter of definitions.

From <URL:http://en.wikipedia.org/wiki/Internet>:
"The first TCP/IP wide area network was operational by 1 January 1983"
... "(This date is held by some to be technically that of the birth
of the Internet.)"

From <URL:http://en.wikipedia.org/wiki/Usenet>:
"It was established in 1980 following experiments the previous year,
over a decade before the World Wide Web was introduced and the general
public was admitted to the Internet."

Depending on what you define as Usenet and as the Internet, Usenet
predates the internet by three years.

In the beginning, Usenet was transferred between the US and Australia
by airmail of magnetic tapes. No internet required :)

[Look mama no hands!]

Nice compilation, Lasse.
 
R

Randy Webb

Evertjan. said the following on 4/24/2006 10:43 AM:
Randy Webb wrote on 24 apr 2006 in comp.lang.javascript:


I certainly do not agree here.

It is true that they are not truly synonymous but in the web world they
have become virtually synonymous as new people do not understand the
difference.

"I need an Internet connection to get on the Web to search for my thing
on the Internet".
You ever use "older" in a non-historical sense?

Off course: in a prehistorical sense.

Did I write Webb, per chance?

Yes, right above :)
Who is that? The Arab name giver of Algoritm?

Close :)
Everyone knows the internet was not invented,
it always was there to be discovered.

Maybe, could be a good subject of conversation.
The speed increase from the time of the Babylonian Responsa
to the present backbones will be the laughing stock of the future.

I am certain you will find a definition disputing my claim.

I wasn't trying to dispute your claim, per se, but was merely conversing
about something. My apologies if you took it differently.
 
R

Randy Webb

Lasse Reichstein Nielsen said the following on 4/24/2006 11:41 AM:
That's a matter of definitions.

Very true. And, when you consider the beginning of each.
From <URL:http://en.wikipedia.org/wiki/Internet>:
"The first TCP/IP wide area network was operational by 1 January 1983"
.... "(This date is held by some to be technically that of the birth
of the Internet.)"

Depends on how you define what the Internet is. If you define it as a
method of a Wide Area Network (The term wasn't used then) for networked
computers to communicate (not necessarily by TCP/IP though), then it is
older than that. Giving TCP/IP creation the "birth of the Internet"
makes the Internet younger.

It all got started by the US Military in the late 40's early 50's though
as a way to communicate in the event of a nuclear disaster/war. That
network is what lead to the Internet.
From <URL:http://en.wikipedia.org/wiki/Usenet>:
"It was established in 1980 following experiments the previous year,
over a decade before the World Wide Web was introduced and the general
public was admitted to the Internet."

That definition holds what was said to start with where the WWW and
Internet are separate but now they have become almost synonymous terms.

"Browse the Web"
"Browse the Internet"

Or:

"Search the Web"
"Search the Internet"

Semantics but an interesting conversation and nothing more :)
Depending on what you define as Usenet and as the Internet, Usenet
predates the internet by three years.

True, but if you define it as the WAN it was started as, the Internet is
over twice as old as Usenet.
In the beginning, Usenet was transferred between the US and Australia
by airmail of magnetic tapes. No internet required :)

Yup, slow days they were. Although my first use of Usenet wasn't until
1988 or so but it was still slow.
 
E

Evertjan.

Randy Webb wrote on 24 apr 2006 in comp.lang.javascript:
Yup, slow days they were. Although my first use of Usenet wasn't until
1988 or so but it was still slow.

Our emails to our family in Jakarta till around 1995 were sent from here
[with local dial-in] to Exxon in L.A., and then 'rerouted' by private cable
to their Indonesian bureau, where they were printed out,
making the last leg on foot or by car.

Global coverage of Internet, now taken for granted, was still a thing of
the future, while Gopher was ending it's usefulness.

Defining the Internet by it's coverage makes it a young development.
 

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

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top