Solved

Retrieving values of a text box

Posted on 2000-05-03
1
759 Views
Last Modified: 2008-03-06
  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
1 Comment
 
LVL 1

Accepted Solution

by:
clim1219 earned 75 total points
Comment Utility
divya234,

at first i have a hard time how to find a solution for your problem but now i am proud to tell you that i got it.

just copy and past the code below.
i am using an IE browser i don't know if it works with netscape.



<HTML>
<HEAD>
<script>

function showValue()
{
sValue = document.all["abc.txt"].value ;
alert( sValue ) ;
}

</script>
</HEAD>
<BODY>

<P>Name: <INPUT name="abc.txt"></P>
<P><INPUT name="btnClick" type=button value="Click Me" onClick="showValue()"></P>

</BODY>
</HTML>
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 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

17 Experts available now in Live!

Get 1:1 Help Now