Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:26 PM
dekern
Guest
 
Posts: n/a
Default Set default TextArea text dynamically using returned ResultSet value

I have been trying to set the default text value of a TextArea element
for about a day now without any luck.

Similar to the code used to set the Text field below I would like to
use the returned (for lack of a better term) value in a TextArea
element ie. {TITLE}.
this works:
<input readonly="true" value="{TITLE}" name="titleedit"
size="50"
maxlength="255" class="detaileditentry">

But of course there is no "value" attribute for a TextArea element.
I've tried embedding a "value" between the
<textarea...>{DESCRIPTION}</textarea> but that gives me the string
literal.

I've tried using JavaScript to set the
document.input.descriptionedit.value value but this has to be done at
the "onload" point and of course the {DESCRIPTION} has no value at
that point until a LOAD_REQUEST is made (after the onload call).

Again, this is something I want to set at load time and therefore
can't use the "onclick" or similar event to set this value.

Does anyone know a trick to setting this type of element in this
manner?

Thanks,
Dave Kern
  #2  
Old July 20th, 2005, 05:26 PM
Steve Pugh
Guest
 
Posts: n/a
Default Re: Set default TextArea text dynamically using returned ResultSet value

dekern@tallysystems.com (dekern) wrote:
[color=blue]
>I have been trying to set the default text value of a TextArea element
>for about a day now without any luck.[/color]

In HTML terms that is easy.
[color=blue]
>I've tried embedding a "value" between the
><textarea...>{DESCRIPTION}</textarea> but that gives me the string
>literal.[/color]

What do you mean by 'string literal'?
The above should display {DESCRIPTION} in the textarea, isn't that
what you want?

I think you need to explain exactly what you want.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
  #3  
Old July 20th, 2005, 05:26 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: Set default TextArea text dynamically using returned ResultSetvalue



dekern wrote:
[color=blue]
> I have been trying to set the default text value of a TextArea element
> for about a day now without any luck.
>
> Similar to the code used to set the Text field below I would like to
> use the returned (for lack of a better term) value in a TextArea
> element ie. {TITLE}.
> this works:
> <input readonly="true" value="{TITLE}" name="titleedit"
> size="50"
> maxlength="255" class="detaileditentry">
>
> But of course there is no "value" attribute for a TextArea element.
> I've tried embedding a "value" between the
> <textarea...>{DESCRIPTION}</textarea> but that gives me the string
> literal.
>
> I've tried using JavaScript to set the
> document.input.descriptionedit.value value but this has to be done at
> the "onload" point and of course the {DESCRIPTION} has no value at
> that point until a LOAD_REQUEST is made (after the onload call).
>
> Again, this is something I want to set at load time and therefore
> can't use the "onclick" or similar event to set this value.
>
> Does anyone know a trick to setting this type of element in this
> manner?[/color]

Your subject line talking about a "ResultSet" and the syntax
value="{TITLE}"
suggest you are using some data binding feature that is not part of
HTML. Maybe you can elaborate where that ResultSet comes from and
where/how you expect the TITLE replacement to happen, on the server or
on the client.

--

Martin Honnen
http://JavaScript.FAQTs.com/

  #4  
Old July 20th, 2005, 05:26 PM
dekern
Guest
 
Posts: n/a
Default Re: Set default TextArea text dynamically using returned ResultSet value

Martin Honnen <mahotrash@yahoo.de> wrote in message news:<3f9e8877$1@olaf.komtel.net>...[color=blue]
> dekern wrote:
>[color=green]
> > I have been trying to set the default text value of a TextArea element
> > for about a day now without any luck.
> >
> > Similar to the code used to set the Text field below I would like to
> > use the returned (for lack of a better term) value in a TextArea
> > element ie. {TITLE}.
> > this works:
> > <input readonly="true" value="{TITLE}" name="titleedit"
> > size="50"
> > maxlength="255" class="detaileditentry">
> >
> > But of course there is no "value" attribute for a TextArea element.
> > I've tried embedding a "value" between the
> > <textarea...>{DESCRIPTION}</textarea> but that gives me the string
> > literal.
> >
> > I've tried using JavaScript to set the
> > document.input.descriptionedit.value value but this has to be done at
> > the "onload" point and of course the {DESCRIPTION} has no value at
> > that point until a LOAD_REQUEST is made (after the onload call).
> >
> > Again, this is something I want to set at load time and therefore
> > can't use the "onclick" or similar event to set this value.
> >
> > Does anyone know a trick to setting this type of element in this
> > manner?[/color]
>
> Your subject line talking about a "ResultSet" and the syntax
> value="{TITLE}"
> suggest you are using some data binding feature that is not part of
> HTML. Maybe you can elaborate where that ResultSet comes from and
> where/how you expect the TITLE replacement to happen, on the server or
> on the client.[/color]

I use JDBC ODBC to retrieve record sets from a database. I then
"push" the data into an XSL file for display purposes. Inside the XSL
I have a template defined that displays the returned record
information. Often this information is static and displayed in a
TABLE.

In cases where I am simply trying to display data I use syntax like
such:

<xsl:for-each select="/Report/DeviceList/Device">
<xsl:if test="SYSTEMDESCRIPTION">
<TD class="datadata">
<SPAN>
<xsl:value-of select="SYSTEMDESCRIPTION"/>
</SPAN>
</TD>
</xsl:if>
</xsl:for-each>

where SYSTEMDESCRIPTION is a column returned in the ResultSet of the
database query.

What is different here is that I am trying to access the value of the
DESCRIPTION column of a returned record and seed it into the TextArea
element so a user can modify the text.

As you can tell my HTML/XSL is very weak and perhaps I have posted to
the wrong group - if so, sorry and could someone point me to a group
that could possibly answer my question

Dave
  #5  
Old July 20th, 2005, 05:26 PM
dekern
Guest
 
Posts: n/a
Default Re: Set default TextArea text dynamically using returned ResultSet value

dekern@tallysystems.com (dekern) wrote in message news:<5f752fd4.0310281057.7eef1174@posting.google. com>...[color=blue]
> Martin Honnen <mahotrash@yahoo.de> wrote in message news:<3f9e8877$1@olaf.komtel.net>...[color=green]
> > dekern wrote:
> >[color=darkred]
> > > I have been trying to set the default text value of a TextArea element
> > > for about a day now without any luck.
> > >
> > > Similar to the code used to set the Text field below I would like to
> > > use the returned (for lack of a better term) value in a TextArea
> > > element ie. {TITLE}.
> > > this works:
> > > <input readonly="true" value="{TITLE}" name="titleedit"
> > > size="50"
> > > maxlength="255" class="detaileditentry">
> > >
> > > But of course there is no "value" attribute for a TextArea element.
> > > I've tried embedding a "value" between the
> > > <textarea...>{DESCRIPTION}</textarea> but that gives me the string
> > > literal.
> > >
> > > I've tried using JavaScript to set the
> > > document.input.descriptionedit.value value but this has to be done at
> > > the "onload" point and of course the {DESCRIPTION} has no value at
> > > that point until a LOAD_REQUEST is made (after the onload call).
> > >
> > > Again, this is something I want to set at load time and therefore
> > > can't use the "onclick" or similar event to set this value.
> > >
> > > Does anyone know a trick to setting this type of element in this
> > > manner?[/color]
> >
> > Your subject line talking about a "ResultSet" and the syntax
> > value="{TITLE}"
> > suggest you are using some data binding feature that is not part of
> > HTML. Maybe you can elaborate where that ResultSet comes from and
> > where/how you expect the TITLE replacement to happen, on the server or
> > on the client.[/color]
>
> I use JDBC ODBC to retrieve record sets from a database. I then
> "push" the data into an XSL file for display purposes. Inside the XSL
> I have a template defined that displays the returned record
> information. Often this information is static and displayed in a
> TABLE.
>
> In cases where I am simply trying to display data I use syntax like
> such:
>
> <xsl:for-each select="/Report/DeviceList/Device">
> <xsl:if test="SYSTEMDESCRIPTION">
> <TD class="datadata">
> <SPAN>
> <xsl:value-of select="SYSTEMDESCRIPTION"/>
> </SPAN>
> </TD>
> </xsl:if>
> </xsl:for-each>
>
> where SYSTEMDESCRIPTION is a column returned in the ResultSet of the
> database query.
>
> What is different here is that I am trying to access the value of the
> DESCRIPTION column of a returned record and seed it into the TextArea
> element so a user can modify the text.
>
> As you can tell my HTML/XSL is very weak and perhaps I have posted to
> the wrong group - if so, sorry and could someone point me to a group
> that could possibly answer my question
>
> Dave[/color]

I figured it out - the above code does work in the
<textarea><xsl:value-of select="SYSTEMDESCRIPTION"/></textarea>
format, as long as you spell the tag correctly!

Thanks for any and all posts.
Dave Kern
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles