|
-
Jan 27th, 2005, 04:44 AM
#1
Fanatic Member
Re: Know-nothing-newbie question
You could use the isempty(request.querystring("realname") function
Or Len(request.querystring("realname"))>1
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer
-
Jan 27th, 2005, 07:06 AM
#2
Thread Starter
Hyperactive Member
Re: Know-nothing-newbie question
I think you misunderstood. If the querystring was empty I had to assign a character to the variable so that it would not cause problems on the form.
If I had left it empty or even assigned a space character, the value = <% sVariable %> statement seemed to render the text <% sVariable %> null, so that the text assigned to the textbox via the value= was whatever followed <%...%> on the command line.
-
Jan 27th, 2005, 10:48 AM
#3
Fanatic Member
Re: Know-nothing-newbie question
I'm sorry I missunderstood you. It must be my lacking English skills. And to be honest I'm still not sure I understand.
Are you saying that if sVariable == "" or sVariable == " " the value would actually be sVariable?
You would litteraly see the text sVariable in the input field?
It probably doesn't matter but you should have quotes around the value. So the line would look something like this:
HTML Code:
<input name="realname" type="text" value="<% =sName %>" />
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer
-
Jan 27th, 2005, 10:53 AM
#4
Thread Starter
Hyperactive Member
Re: Know-nothing-newbie question
Ok, sorry I did not explain what I meant by the form being funky.
When sName is empty (i.e. sName = "" or sName = NULL or sName = " "), this statement:
<input name="realname" type="text" value=<% =sName %> id="realname" size="30">
Inserts id="realname" or parts of that string into the textbox.
-
Jan 27th, 2005, 12:18 PM
#5
Fanatic Member
Re: Know-nothing-newbie question
Ohh, that could very much be because you don't have any quotes around the value.
Try looking at the source of the page from the webbrowser (i.e. after it has passed through the webserver) and see if you spot any oddities
Never argue with fools, they will only drag you down to their level, and beat you with experience.
Q: How do you tell an experienced hacker from a novice?
A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer
-
Jan 27th, 2005, 01:02 PM
#6
Thread Starter
Hyperactive Member
Re: Know-nothing-newbie question
I'll try the quotes. Thanks Tobbe. And you're English is not bad at all. You should hear my Swedish.
-
Jan 27th, 2005, 01:42 PM
#7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|