Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.URLEncode Question

Status
Not open for further replies.

stfarm

Programmer
May 31, 2001
179
CA
Maybe I am going the wrong direction, but here is what I am trying to do, and maybe you could advice me how to go about it.

I would like to encode or scrample an url string, and I also would like them to be NOT visible in the status bar.

For example:
I would like "txt=Correctional&Key=5636" to be encoded, I was experimeting with it, but could not get it to work.

Could somebode please help me out. Thank you.

Steve
 
why not use post method???

Known is handfull, Unknown is worldfull
 
I think you may have URLEncode a bit mixed on it's usage.

The URLEncode encodes per url rules or in short takes certain characters and sets them to the rules that would apply while passing them through a url to be interpruted correctly

as in a space = +

If you are looking to encode in such a way the user will not easily recognize the true meaning of the querystring, building your own function to convert to a unique char set would be the best way.

vbkris has the best suggestion though IMHO also.

If you submit the values via a POST method (which can be done dynamically) instead of a querystring pass, then the values will not be visible and secure.

___________________________________________________________________

The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
 
o.k guys i will give a workaround.

u can use post and still open a new window with something like this:
Code:
function popupwin()
{
 document.Form.method="post"
 document.Form.action="popupwindow"
 document.form.target="_blank"

 //after this code revert back
 document.Form.method="post"
 document.Form.action="normal page"
 document.form.target="_self"
 //u dont do this ur normal submit itself will open in a new window
}


now in ur popu window u can refer all variables using post method...

Known is handfull, Unknown is worldfull
 
If you're going to resort to Javascript, there's a much, much easier way to hide the link (I understand that vbkris' code is designed to allow for posted anchors).
Code:
<a href="[URL unfurl="true"]http://www.url.com"[/URL] onMouseOver="status='';return true">LinkTextHere</a>

If you don't want to use JavaScript you can effectively obscure the URL using a form of URLEncoding. You'd just work through your string character by character, creating a new string by replacing each old character with this:
Code:
"%" & Hex(Asc(YourCharHere))
The resulting link will look like %68%74%74%70%%3A%2F%sF etc., but clicking it will still work. I'm pretty sure it will show up as the string of hex in the status bar of most/all browsers, but I haven't tested it. It's possible that the " part has to be unencoded, not sure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top