Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 29th, 2005, 04:04 PM
Posts: n/a
Default best method for passing variables

   I'm hoping someone can help me out with this. I have a VBScript webpage. The page takes 2 fields of input and calls another web page.
The new(second) web page inserts the fields into a database. Once that is finished, I want to call another page (third page) passing the two fields as input parameters. Sound simple? Here's the catch...the second web page does not display any HTML fields and the user doesn't want any.
   The user wants a seamless method of inputting data to the pages in succession.
   I've tried response.redirect but that doesn't pass parameters. I have no experience with creating cookies nor of Query String.
   Any suggestions?

Reply With Quote
  #2 (permalink)  
Old March 29th, 2005, 04:55 PM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Response.redirect can pass the values if you put them into the url as variables.

Let’s say that the 1st value is T5T, and the second is 543. If the redirect is to http:// www . otherpage.com/page1.asp, make the href be http:// www . otherpage.asp/page1.htm?val_1=T5T&val_2=543. (Spaces were added to those address to keep them from automatically being converted to hyperlinks by wrox.com...)

Then at the server take the values from the Request.Query string, and put them into hidden controls, which then can be accessible to the script on that page.

Even if the pages are .htm URLs (instead of .asp), the variables will be in the location.href once the page is loaded. (The variables will be visible in the address bar.)
Reply With Quote
  #3 (permalink)  
Old March 29th, 2005, 05:26 PM
Posts: n/a

This is probably due to my inexperience.

I had coded the redirect like this:


Also, I would be passing a password which really shouldn't be in the URL. Is there any other way to accomplish this?

I should have clarified this earlier....I apologize for the oversight.

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding value and passing to method gantait XSLT 2 February 20th, 2007 04:45 AM
Passing variables karlirvin Beginning PHP 3 December 9th, 2005 04:37 PM
Passing variables karlirvin PHP How-To 4 December 2nd, 2005 08:02 PM
Passing variables acko ASP.NET 1.x and 2.0 Application Design 1 December 23rd, 2003 09:40 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.