Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Retrieving values of a text box

Posted on 2000-05-03
1
Medium Priority
?
768 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 225 total points
ID: 2775924
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
Suggested Courses

926 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