Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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
 
Old March 9th, 2005, 07:30 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default hide the values shown in querystring in add bar

I have a page called 'logincheck.asp'

If a condition is met then a response.redirect is carried out as per code below:

<%
if rscheck.eof then

response.redirect "/mackenzie/asp/reg.asp?agencyid="&agencyid&"&agentid="&agentid&"& username="&username&"&password="&password&""

end if
%>

How do I hide the values shown in the querystring in the address bar? This is due to the fact the password is shown. All my forms use POST. I thought POST did NOT show the values and GET DID??

Picco

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old March 9th, 2005, 06:36 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;How do I hide the values shown in the querystring in the address bar
Not sure you can

;;;I thought POST did NOT show the values and GET DID??
Yes, you are correct. A response.redirect is very different from the posting of a form. What method you are using to send form variables doesnt have any relationship with response.redirect behaviours.

Solution 1..
Have you used hidden from variables before?
Forms are not just for getting user input. They can be completely hidden from the user, placed there to hold values and submitted via code rather than a submit button

Solution 2..
Dare I say it but you could use sesison variables. IMO use these sparingly and as a last resort - this would be a quick and nasty solution.

Where are these QS values comming from? If they are comming from a DB just get the unique identifyer, pass that in your QS then on the destination page pull the records again. If I was at your site and saw my UN and PW passed in a QS there is a good chance I wouldnt come back.



Wind is your friend
Matt
 
Old March 10th, 2005, 05:34 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

if rscheck.eof then
     response.redirect "/mackenzie/asp/reg.asp"
     response.write "<form name=form method=post action=reg.asp>"
     response.write "<input type=hidden name=agencyid value="&agencyid&">"
     response.write "<input type=hidden name=agentid value="&agentid&">"
     response.write "<input type=hidden name=username value="&username&">"
     response.write "<input type=hidden name=password value="&password&">"
     response.write "</form>"
end if

How do i submit this form though?

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
 
Old March 10th, 2005, 06:17 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

if rscheck.eof then
     session("crm_agencyid")=agencyid
     session("crm_agentid")=agentid
     session("crm_username")=username
     session("crm_password")=password
     response.redirect "/mackenzie/asp/reg.asp"
end if

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
 
Old March 10th, 2005, 09:09 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Crimpicco
Why you are using session variables ,it consume server resources,
Think about 100K users ,do you allow sessions for all those users.

Try this,

if rscheck.eof then
     response.write "<form name=form method=post action=reg.asp>"
     response.write "<input type=hidden name=agencyid value="&agencyid&">"
     response.write "<input type=hidden name=agentid value="&agentid&">"
     response.write "<input type=hidden name=username value="&username&">"
     response.write "<input type=hidden name=password value="&password&">"
     response.write "</form>"
     response.write "document.form.submit()"
end if

If you other alternative ,please do share :)


Cheers :)

vinod
 
Old March 10th, 2005, 09:12 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Sorry Crimpicco
before to response.write "document.form.submit()"

use
response.write "<script>"
response.write "document.form.submit()"
response.write "</script>"


Cheers :)

vinod
 
Old March 10th, 2005, 10:34 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

will this work, is Javascript not client-side and asp server-side? how can they go together? this is the problem i was having yesterday with another piece of code

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
 
Old March 10th, 2005, 10:35 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

"Think about 100K users ,do you allow sessions for all those users."
this process is only done ONCE per user, on first login


www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
 
Old March 10th, 2005, 06:52 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

crmpicco

There is another way to do this. Have another read of my post, in particular the last paragraph starting with:
"Where are these QS values comming from?"

BTW : That is a question

Wind is your friend
Matt
 
Old March 11th, 2005, 02:04 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Crimpicco
It's working fine

if rscheck.eof then
     response.write "<form name=form method=post action=reg.asp>"
     response.write "<input type=hidden name=agencyid value="&agencyid&">"
     response.write "<input type=hidden name=agentid value="&agentid&">"
     response.write "<input type=hidden name=username value="&username&">"
     response.write "<input type=hidden name=password value="&password&">"
     response.write "</form>"
   response.write "<script>"
response.write "document.form.submit()"
response.write "</script>"
end if

well below technique also work fine :) but one question to share
sesion object(crm_agencyid,crm_agentid,crm_username,crm_p assword) store on the server, more users more session objects ,consume server resources

session("crm_agencyid")=agencyid
     session("crm_agentid")=agentid
     session("crm_username")=username
     session("crm_password")=password


Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Task bar through vb6 code akhilesh_g Pro VB 6 6 December 28th, 2007 01:23 PM
hide the task bar when program run anchal C# 2 July 28th, 2006 12:14 PM
display querystring in address bar europhreak Classic ASP Basics 1 February 16th, 2006 01:43 PM
hide the values shown in querystring crmpicco HTML Code Clinic 5 March 10th, 2005 10:10 AM
hide the status bar of window at runtime yeetesh Pro VB 6 5 January 10th, 2005 02:38 PM





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