Results 1 to 15 of 15

Thread: Know-nothing-newbie question

Hybrid View

  1. #1
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802

    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

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    497

    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.
    end war
    stop greed

  3. #3
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802

    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    497

    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.
    end war
    stop greed

  5. #5
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802

    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

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    497

    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.
    end war
    stop greed

  7. #7
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090

    Re: Know-nothing-newbie question

    Men ni är båda svenska!!
    Have I helped you? Please Rate my posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width