473,472 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to hide or encode the parameter while passing to a new window?

11 New Member
Hi,

In my webapplication i am opening new window by passing some parameters.i am passing password also as parameter.But i need to hide it or encode it.
how can i do this.Following is my code:


Expand|Select|Wrap|Line Numbers
  1. function getUrl(gsamName,deviceName,userName,passWord){   
  2. window.open("./viewMapToolScreen.html?com.smarts.autoAttachDM="+gsamName+"&class=com.smarts.webapps.SmWebMapApp&com.smarts.launch.class=UnitaryComputerSystem&com.smarts.launch.instance="+deviceName+"&com.smarts.map.showAllBusiness=1&com.smarts.userid="+userName+"&com.smarts.password="+passWord);   
  3. }   
  4.  
  5.  
  6. function validate_form()   
  7. {   
  8.         valid = true;   
  9.         if ( document.map_form.contract.selectedIndex == 0 )   
  10.         {   
  11.                 alert ( "Please select Contract Name" );   
  12.                 valid = false;   
  13.         }   
  14.  
  15.                 getUrl(document.map_form.gsamName.value,document.map_form.devicename.value,document.map_form.userName.value,document.map_form.passWord.value);   
  16.  
  17.        }   
  18. }   
  19.  
  20. <input type="hidden" name="passWord" value=<%=session.getAttribute("GSAM_PASSWORD")%>></input>   
  21.  <input type="submit" name="submit" value="Show Map" class="button" onclick = "validate_form();"/>  
  22. function getUrl(gsamName,deviceName,userName,passWord){
  23. window.open("./viewMapToolScreen.html?com.smarts.autoAttachDM="+gsamName+"&class=com.smarts.webapps.SmWebMapApp&com.smarts.launch.class=UnitaryComputerSystem&com.smarts.launch.instance="+deviceName+"&com.smarts.map.showAllBusiness=1&com.smarts.userid="+userName+"&com.smarts.password="+passWord);
  24. }
  25.  
  26.  
  27. function validate_form()
  28. {
  29.         valid = true;
  30.         if ( document.map_form.contract.selectedIndex == 0 )
  31.         {
  32.                 alert ( "Please select Contract Name" );
  33.                 valid = false;
  34.         }
  35.  
  36.                 getUrl(document.map_form.gsamName.value,document.map_form.devicename.value,document.map_form.userName.value,document.map_form.passWord.value);
  37.  
  38.        }
  39. }
  40.  
  41. <input type="hidden" name="passWord" value=<%=session.getAttribute("GSAM_PASSWORD")%>></input>
  42.  <input type="submit" name="submit" value="Show Map" class="button" onclick = "validate_form();"/>
  43.  
Regards,
rama
Jan 21 '11 #1
4 2851
Dormilich
8,658 Recognized Expert Moderator Expert
you can only obfuscate it. but anything generated/processed on the client side can be viewed by the user (though it may require more or less effort).
Jan 21 '11 #2
rkyakkala
11 New Member
Hi Dormilich,

Good to see your reply.
is there any chance for me to encode password like ****.
waiting for your suggestion.

regards,
rama
Jan 21 '11 #3
Dormilich
8,658 Recognized Expert Moderator Expert
you can "encode" your password like that in the HTML display, but the application receiving the password won’t be able to decode it from the URL string.

besides that, experienced hackers can go linewise through your JavaScript code and visualize any occuring variable content (including the raw password before "encoding") (depending on the intention of the user this is called either cracking or debugging)
Jan 21 '11 #4
Rabbit
12,516 Recognized Expert Moderator MVP
Here's the usual procedure.

1) Establish a secure connection using public key cryptography.

2) Encrypt the password or password hash using the public key.

3) Once authenticated, switch to private key cryptography for speedier transactions.

There's no need to reinvent the wheel. Use HTTPS, it's what it was made for.
Jan 21 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Ramesh | last post by:
Hai all, I am interested to know how the following can be done. I don't deal with HTML much and therefore would like to get help. The user should be able to see a link. Upon clicking the link...
1
by: carrionk | last post by:
Hi, I have created a Subform which SourceObject is a parameter query. This is the Query: Qry Name:80IsscomProduct SELECT * FROM Isscomp28 WHERE Like ;
0
by: KK | last post by:
Hi MCPP gurus' I have a small problem in parameter passing.This is my situation namespace Abc { public __gc class ClassAbc { public: String* Hello(String* str) {
0
by: Richard Buckshaw | last post by:
Mimick the older C/ pascal dll parameter passing convention? - VB Class Mod? Hello, I have been attempting to write a VB class that would expose its stuff to an older (ok, legacy application)...
4
by: Jon | last post by:
Hi, I am calling the function showpopupWindow(item) to open and write a popup window. When testing in IE6 locally the popup window displays my text in both the title and status bars but when...
1
by: vijay.gandhi | last post by:
Hello, I have created a function in C++/CLI which was exported as a .DLL to be used in VB .NET. I have been having some problems (I think it has to do with the right syntax) with parameter...
16
by: Theo R. | last post by:
Hi all, Does the C99 Standard explicitly mention the need for a stack for passing arguments or Is this platform specific? As an example, the ARM9 processor recommends Core Registers R0-R3 be...
5
by: goldtech | last post by:
Hi, I'm passing what I think is a string parameter to another Python program (spawn.py) - see the code snip below. But only the counter part gets printed to a log file via spawn.py. Yet the...
13
by: frakie | last post by:
Hi 'body, I'm experiencing difficulties on parameter passing. I wrote a library in last months, and now it crashes few times in a month because of errors in parameter passing: using gdb on the...
1
by: tarunkhatri | last post by:
Hi, I want to pass the parameter of employee_id to a page. My code is working fine and passing parameter to page but the problem is rather then the current parameter. It passed the parameter which...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.