Solved

How to retrieve values from a textbox

Posted on 2000-05-03
4
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML5 storage and web apps 11 49
Validating Date Part2 2 27
CSS for <center> 14 35
Why is my $_POST not going to results page 10 40
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

733 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