Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post

    More Quote Problems

    I know the sticky is there but my concerns are not address. I want to write out "variablename" and I want the quotes

    I've used response.write "& variablename &" and response.write ' "& variablename &" ' and response.write " "& variablename &" " to no avail. Can someone please help.

    my output ranges from nothing at all, to quotes around variablename but not the value of variablename which I desire.

    I want as output "variablename" where variablename is actually the value of variablename.

    Thanks.
    I would rather be a lion for a day than a lamb that lives forever.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    OK, I figured it out but I chickened out and used assci characters. I used

    response.write Chr(34) & variablename & Chr(34) and I got the desired results but I would hope it is a simpler way.

    Thanks everybody.
    I would rather be a lion for a day than a lamb that lives forever.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    Maybe it doesn't work. I am trying to finish what I started from a post before and I am at this part where I am trying to get only the tables that aren't in focused to write.

    the code is as follows

    if NOT Rs ("TABLE_NAME") = "MSysAccessObjects" AND NOT Rs ("TABLE_NAME") = "MSysAccessXML" AND NOT Rs ("TABLE_NAME") = "MSysACEs" AND NOT Rs ("TABLE_NAME") = "MSysObjects" AND NOT Rs ("TABLE_NAME") = "MSysQueries" AND NOT Rs ("TABLE_NAME") = "MSysRelationships" AND NOT Rs ("TABLE_NAME") = Chr(34) & variablename & Chr(34) then

    but this doesn't do anything, nothing. It seems as though the last bit of code is being ignored. All help is appreciated, thanks.
    I would rather be a lion for a day than a lamb that lives forever.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In ASP to get quotes within a string you need only double them up:

    localvariable = "and"

    response.write " before """ & localvariable & """ after"

    would output

    before "and" after

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    thanks Ron, interestingly enough I figured that out already. I think my problem actual lies somewhere else. Thanks for your help, though.
    I would rather be a lion for a day than a lamb that lives forever.

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    your problem is you dont have to use double quotes at all!

    this should be the correct one:

    AND NOT Rs ("TABLE_NAME") = variablename then


    I assume variablename contains the table name.
    since it is a variable, you dont have to put quotes around it
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #7
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic Text Box Content with quotes in variable

    I have seen many posts that deal with quotes but this is killing me because I can't find the best solution....please help!

    I want to display the results from a database that have quotes both single (') and double (") what I get is an early terminated value in the html output


    <input type="text" name="txt1" size="50" maxlength = "50" value='<% =strDescription) %>' >

    Thanks in advance!

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use this:

    Code:
    <input type="text" name="txt1" size="50" maxlength = "50" value='<%=Server.HtmlEncode(strDescription)) %>' >

  • #9
    New Coder
    Join Date
    Jun 2002
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thanks Roy

    <input type="textarea" name="txt1" size="50" maxlength = "50" value='<% =Server.HTMLEncode(str1) %>' ></textarea>

    Works like a charm....

    Thanks again!


  •  

    Posting Permissions

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