Solved

How to retrieve values from a textbox

Posted on 2000-05-03
4
161 Views
Last Modified: 2010-04-09
  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 get the value of this input box in a javascript function. How do I do it?
Thanx in advance,
Divya.
0
Comment
Question by:divya234
4 Comments
 
LVL 1

Expert Comment

by:anyanicky
ID: 2776055
document.myform.element(0).value
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 2780315
you can try this:

document.myform["abc.txt"].value

(I believe this will work)

CJ
0
 

Expert Comment

by:dmatsch
ID: 2781888
Don't expect much of anything without some points...
0
 

Accepted Solution

by:
QBMaster earned 0 total points
ID: 2782059
I'd answer the question even tho there are no points...
it's not a hard question :)
so i'll just answer it right now.



<HTML>
 <HEAD>
  <SCRIPT LANGUAGE="Javascript">
   function GetText()
   {
      var Text=document.Form1.elements["Text.Box"].value;
      alert(Text);
   }
  </SCRIPT>
 </HEAD>
 <BODY>
  <FORM NAME="Form1" ONSUBMIT="GetText();">
   <INPUT TYPE="TEXT" NAME="Text.Box" LENGTH="20">
  </FORM>
 </BODY>
</HTML>


enter the text you want in the box and press Enter.
and it will display a message box with the text from the box in the message box window.

; )
i don't need points to help people.
i just do it cause i can ; )


Willard
AKA QBMaSteR

http://www.arbie.com/
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now