www.webdeveloper.com
Results 1 to 5 of 5

Thread: Problem with apostrophies

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Posts
    58

    Problem with apostrophies

    I have an issue where I pull values from a database. The values have apostrophe's in them but when they are displayed on the page the string stops at the apostrophe (i.e. today's is displayed as today).

    How can I get the entire string to be displayed?

    Here is where I am displaying the string:

    Code:
    Code:
    <h1 class='tabletitle'><%=rs("FloorName")%>&nbsp;(<%=dspLayoutName%>)</h1>
    Thanks for your help.

  2. #2
    Join Date
    Jun 2012
    Posts
    58
    I have been able to trace the issue to this line of code:
    Code:
    <option value='<%=rs("LayoutName")%>'><%=rs("LayoutName")%></option>
    The problem is in the "value" section of the option tag. The text displayed is fine.

    Here is what I get:
    Code:
    <OPTION value=Mona Layout? Test s>Mona's Test Layout</OPTION>
    I don't know where the question mark (?) comes from nor why the text is all jumbled up. The bold text is what I want the value to look like.

    Any help would be very appreciated.
    Thanks.

  3. #3
    Join Date
    Jan 2008
    Location
    Florida
    Posts
    1,227
    Just assign your record value once.

    <%
    strLayoutName = rs("LayoutName")
    %>

    <OPTION value="<%=strLayoutName%>"><%=strLayoutName%></OPTION>

  4. #4
    Join Date
    Jun 2012
    Posts
    58
    Thanks for your reply. I finally got the result that I needed. I think it was the double quotes that you used because I had tried using the variable like you suggested.

  5. #5
    Join Date
    Oct 2012
    Posts
    47
    There are plenty of sites that deal with the use of the apostrophe in English, but a lot of people just want a quick answer to a question that arises in the context of their work. The following examples illustrate the correct use of the questions that arise often, and apply to British English, American English, Australian English, New Zealand English.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles