Thanx to all for the suggestions. a way out to do this is to refer to the
values  of such textboxes by tracing bac k to the form element; i.e; using,
document.forms[0].elements[index].value, incase the input box is the first
element in the form.

Now, I have another issue. The problem is regarding a table.
If I have a table as below:
<TABLE Width =700>
<TR>
<TD Width =200></TD>
<TD Width =500></TD>
</TR>
</TABLE>

I have a form with 2 input boxes. When I fill in data into these text boxes
and submit, the columns in the above table are populated with the value.
However, if the value of the text box contains data like "aaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb". The
length of the data overrides the column width. So, I wish to break such
lengthy words into shorter ones by spacing it between. To do this, I  want
to check if the length of the string has exceeded the width of the column.
How do I convert the string length into pixcels? Is it possible?

Thanx,
Divya.




----- Original Message -----
From: Vinay K V Menon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 04, 2000 2:05 AM
Subject: Re: A javascript question.....please help


> Try this out!
>
> <HTML>
> <HEAD>
> <SCRIPT LANGUAGE="Javascript">
>         function showValue(){
>                 alert (document.form1["abc.txt"].value);
>                 return true;
>         }
> </SCRIPT>
> </HEAD>
>
> <FORM Name="form1">
> <INPUT TYPE=Text Name="abc.txt">
> <INPUT TYPE=Button Name=testbutton onClick="showValue()">
> </FORM>
>
> </HTML>
>
> - V.M.
>
> If it is to be, it is upto me.
>
>
>
> > -----Original Message-----
> > From: [Vinod Govindan] [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 04, 2000 10:52 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: A javascript question.....please help
> >
> > I dont think you can use a dot in a name and if you try to access the
> > element as document.<formname>.abc.txt.value
> >
> > javascript will assume it to be two diffrenet object "abc" and "txt" and
> > will give an error. I thinkthe best solution would be to eliminate the
> > dot.
> > cause there is no escape character for a "dot" Atleast not that i know
of.
> >
> >
> >
> >
> >
> >                     Divya M A
> >                     <divya_ma@TRIGENT        To:
> > [EMAIL PROTECTED]
> >                     .COM>                    cc:
> >                     Sent by: A               Subject:     A javascript
> > question.....please help
> >                     mailing list
> >                     about Java Server
> >                     Pages
> >                     specification and
> >                     reference
> >                     <JSP-INTEREST@JAV
> >                     A.SUN.COM>
> >
> >
> >                     05/04/00 04:41 AM
> >                     Please respond to
> >                     A mailing list
> >                     about Java Server
> >                     Pages
> >                     specification and
> >                     reference
> >
> >
> >
> >
> >
> >    I have an input box in a form with the name having a dot in it,;i.e;
a
> > name like "abc.txt". I want to read the value of this input box in a
> > javascript function. How do I do it?
> > Thanx in advance,
> > Divya.
> >
> >
==========================================================================
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
==========================================================================
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to