Click to See Complete Forum and Search --> : Pass parameters to a new URL


bbeat
08-09-2004, 08:02 AM
Hello,

I'm trying to write a script that would allow me to keep some parameters with different URL. Let say I have a default.htm page with 2 boxes where you can put your name and password. This page exists in different laguages with names like this: defaultse.htm, defaultde.htm, defaultfr.htm for instance. Each country has a specific extention. Currently if a user enters a name and password and then decides to change language, the url changes but the name/password fields remain blank and need to be reentered.
How could I make this work?

Thanks!

Here is what I've put:
<form name="jump">
<select name="menu" OnChange="createUrl();"
value="GO">
<option value="en">English</option>
<option value="fr">Français</option>
<option value="sp">Español</option>
<option value="de">Deutch</option>
<option value="se">Svenska</option>
</select></form>

function createUrl()
{
location.href='http://test/default'+jump.menu[jump.menu.selectedIndex].value+'.htm?Name='+name+'&Pin='+pin;
}

BillyRay
08-09-2004, 08:42 AM
Coding aspect aside, don't you think that this would be very insecure? If a user has entered their details, and then decides to change their language, their password will be displayed in cleartext in the address bar for anyone who happens to be looking at their screen to see.

Personally, I would play it safe and force the user to enter their details (at very least their password) again.

Hope this helps,
Dan

bbeat
08-09-2004, 09:41 AM
Hi,

I must agree to your remark!
I'll remove the pin from the URL.
Any idea concenring the way to achieve that?

Thx!!!

BillyRay
08-09-2004, 10:40 AM
I'll remove the pin from the URL. Any idea concenring the way to achieve that?

Surely just don't add it in to start with?

Dan

bbeat
08-09-2004, 10:58 AM
I did not mean how to hide the pin code but to transfert the paramters to another URL.

Pittimann
08-09-2004, 11:00 AM
Hi!

Due to the fact, that your login stuff is absolutely js dependant, I would suggest to disable the name and password fields as well as the select, notifying the user, that the language has to be selected first. When the user selects the language, the rest of the fields will be enabled and you should not worry any longer, if a French user wants to change his/her nationality afterwards.

Not that it would be of any importance: 'Deutch' is missing an 's'; we have this funny 'sch' in our language. ;)

Cheers - Pit

BillyRay
08-09-2004, 11:01 AM
I did not mean how to hide the pin code but to transfert the paramters to another URL.

But don't you already have that functionality in your "createUrl" function?

Dan

bbeat
08-10-2004, 09:48 AM
Hi,

Thanks everyone, I've found a solution to my problem.

Bbeat.