...

View Full Version : How can I make a javascript that requires a username in a form



XTGeminiman
08-20-2005, 07:00 PM
I want my javascript to connect to a cookie called username and check to see if that word is included in a form (file).

So if my username is XTGeminiman and the file I'm uploading is xtgeminimanbluepic.jpg it will pass but if the usernames not at the beginning of the string it doesn't submit

A1ien51
08-21-2005, 06:02 AM
You should not be using JavaScript for this since i is not secure.

If you want to do this, you will have to include this user list on the page in a format that JavaScript can understand. (Most likely an array) You then would have to compare that info. Again the names woulf be in plain text so anyone could use any of tha names listed.

Eric

XTGeminiman
08-21-2005, 06:34 AM
damn, i thought javascript could request cookies. I guess I'll just use a server side language instead.

iota
08-21-2005, 08:29 AM
damn, i thought javascript could request cookies. I guess I'll just use a server side language instead.

Server side cookie calling is more secure.
Gmail knows if you open different gmail accounts at the same time.
That's what cookie thing.

iota
08-24-2005, 10:30 AM
damn, i thought javascript could request cookies. I guess I'll just use a server side language instead.

yeah but the visitors delete cookies in browsers, then what'll you do ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum