RE: Full string not displayed (solved)

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Mon, 20 Mar 2000 12:31:32 CST
 To:  cshull(at)shscares.org
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
when the value of any HTML attribute omits the quotes, the browser cannot 
know where one attribute ends and the next attribute begins. therefore, it 
ends the value at the first white space. consider if the string in question 
actually contained an name=value pair, you wouldn't want it effecting your 
HTML now would you? - Cyanide_7

>
>I figured it out.
>
><input type='text'> value=" & rs(ca) & " size=10 name='ca" & i & "'>
>needed a set of single quotes around the retrieved record thusly:
><input type='text'> value='" & rs(ca) & "' size=10 name='ca" & i & "'>
>
>Anyone know why it causes a difference in results? (I do realize the value
>of "value" is supposed to be in quotes in correct HTML)
>
>Thanks.
>__________________________________
>Conrad Shull
>Information Technology Associate
>Learning Resources Center
>Susquehanna Health System
>www.shscares.org
>cshull(at)shscares.org
>webmaster(at)shscares.org
>570.321.2266
>
> > -----Original Message-----
> > From: Shull, Conrad
> > Sent: Monday, March 20, 2000 8:35 AM
> > To: 'hwg-languages(at)hwg.org'
> > Subject: Full string not displayed when retrieved from DB
> >
> >
> > I have a form that populates text boxes with data previously
> > entered via SQL
> > on an Access DB using ASP.
> >
> > The purpose of the form is to edit the previously entered
> > data.  It works
> > fine, except that it displays, in the text boxes, only that
> > text up to the
> > first space character.  For example, if the Client, "Smith
> > Company" was
> > initially entered into the DB, only "Smith" is displayed in
> > the text box. In
> > the actual database, the full string is present.
> >
> > In the following VBScript, "ca" means "Client A", "dm" means
> > "days in the
> > month" and "i" is appended to "ca" to indicate "Client A" on
> > a particular
> > day of the month. I skipped including the rest of the SQL and record
> > retrieval lines (they work fine) and included only the "While
> > Not rs.EOF"
> > line to indicate that this script does go through all the records.
> >
> >
> > While Not rs.EOF
> >
> > Dim ca
> > for i = 1 to dm
> > i = Cstr(i)
> > ca = "ca" & i
> > if Trim(rs(ca)) <> "" then
> > Response.Write "<tr><td align='center'><input type='text'
> > value=" & rs(ca) &
> > " size=10 name='ca" & i & "'></td></tr>"
> > else Response.Write "<tr><td align='center'><input
> > type='text' value=''
> > size=10 name='ca" & i & "'></td></tr>"
> > end if
> > next
> >
> > __________________________________
> > Conrad Shull
> > Information Technology Associate
> > Learning Resources Center
> > Susquehanna Health System
> > www.shscares.org
> > cshull(at)shscares.org
> > webmaster(at)shscares.org
> > 570.321.2266
> >

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA