Send data to another page

N

Noozer

Just wondering what the simplest way to send data from one webpage to
another.

I have a page with some VB script. Once the script is done it needs to send
the resulting values to an ASP page.

<script language="vbscript>
sub DoIt()
strName = "Some Name"
strPhone ="(123) 456-7890"
strNotes = "A string that could be very long. 1000+ characters"
'How to send above variables to "do.asp"
end sub
</script>

I could load the values into hidden form fields and retrieve them on the ASP
page. I could use Cookies to transfer the values. Both of these seem a bit
complicated for a simple function. Is there any other way that I could send
these values to the "do.asp" page?
 
A

Andy Dingley

I have a page with some VB script. Once the script is done it needs to send
the resulting values to an ASP page.
<script language="vbscript>

Where does this script execute ? On the client ?
Then use <form> and a POST method.

(and don't use VBScript on clients - it has cooties)

If it runs on the server, then you have more options.
Response.Transfer() is often the best way.
 
H

Hywel Jenkins

Just wondering what the simplest way to send data from one webpage to
another.

I have a page with some VB script. Once the script is done it needs to send
the resulting values to an ASP page.

<script language="vbscript>
sub DoIt()
strName = "Some Name"
strPhone ="(123) 456-7890"
strNotes = "A string that could be very long. 1000+ characters"
'How to send above variables to "do.asp"
end sub
</script>

I could load the values into hidden form fields and retrieve them on the ASP
page. I could use Cookies to transfer the values. Both of these seem a bit
complicated for a simple function. Is there any other way that I could send
these values to the "do.asp" page?

VBScript - bad idea. What do you think Mozilla will do with that?
Anyway, look for the VBScript equivalent of document.location.href.
 
S

SpaceGirl

Noozer said:
Just wondering what the simplest way to send data from one webpage to
another.

I have a page with some VB script. Once the script is done it needs to send
the resulting values to an ASP page.

<script language="vbscript>
sub DoIt()
strName = "Some Name"
strPhone ="(123) 456-7890"
strNotes = "A string that could be very long. 1000+ characters"
'How to send above variables to "do.asp"
end sub
</script>

I could load the values into hidden form fields and retrieve them on the ASP
page. I could use Cookies to transfer the values. Both of these seem a bit
complicated for a simple function. Is there any other way that I could send
these values to the "do.asp" page?

Never, ever EVER use vbscript for client side scripting out on the
Internet. Only works in Internet Explorer and there are millions of
people who dont use that now. In excess of 10% of people are using
non-Microsoft browsers, and vbscript will be ignored. If you HAVE to use
scripting, use JavaScript - all major browsers support it.
 
N

Noozer

SpaceGirl said:
Never, ever EVER use vbscript for client side scripting out on the
Internet. Only works in Internet Explorer and there are millions of
people who dont use that now. In excess of 10% of people are using
non-Microsoft browsers, and vbscript will be ignored. If you HAVE to use
scripting, use JavaScript - all major browsers support it.

This is for our intranet and all clients are running IE. This script is
running on the client machine.

I am moving to Javascript, but I know VBscript better so it will take time
to transition over.

If it were Javascript, would my question really be any different though?
 
S

SpaceGirl

Noozer said:
This is for our intranet and all clients are running IE. This script is
running on the client machine.

I am moving to Javascript, but I know VBscript better so it will take time
to transition over.

If it were Javascript, would my question really be any different though?

The best way is to do it via a form post to an ASP script to be honest,
seeing as you are already using that platform. We do that when we need
to move data from one page to another (and where session variables
aren't viable).
 
A

Adrienne

Just wondering what the simplest way to send data from one webpage to
another.

I have a page with some VB script. Once the script is done it needs to
send the resulting values to an ASP page.

<script language="vbscript>
sub DoIt()
strName = "Some Name"
strPhone ="(123) 456-7890"
strNotes = "A string that could be very long. 1000+ characters"
'How to send above variables to "do.asp"
end sub
</script>

I could load the values into hidden form fields and retrieve them on
the ASP page. I could use Cookies to transfer the values. Both of these
seem a bit complicated for a simple function. Is there any other way
that I could send these values to the "do.asp" page?

There are four collections available in ASP:
1. Form collection
2. Querystring collection
3. Cookie collection
4. Server variables collection

In your case, I would use the form collection, because the querystring
collection is limited in length. The session collection might be as well
as it is in fact a cookie, I'm not sure. By the way, don't get lazy and
not explicitly state which collection, you can get in trouble later on with
that.
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top