The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Textbox issue, text entered in textbox should be displayed in confirm() command
Abhijith
post Aug 12 2007, 02:44 PM
Post #1





Group: Members
Posts: 2
Joined: 12-August 07
Member No.: 3,545



Here's the code

QUOTE

<BODY>
<script LANGUAGE="JavaScript">
<!--
function myclick(){
confirm("Do you want to Submit"+ 'lname');
alert("Submitted");}
//-->
</SCRIPT>
First Name:
<INPUT TYPE="text" NAME="fname"><br>
Last Name:
<INPUT TYPE="text" NAME="lname"><br>
<INPUT TYPE="submit" value="Submit" onclick=myclick()>
</BODY>


In the confirm function I want to display both the First name and Last name... please help!!!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Abhijith
post Aug 12 2007, 03:09 PM
Post #2





Group: Members
Posts: 2
Joined: 12-August 07
Member No.: 3,545



found the answer smile.gif

QUOTE

<script LANGUAGE="JavaScript">
<!--
function myclick(){
confirm("Do you want to Submit "+ (document.myform.fname.value)+" "+(document.myform.lname.value));
alert("Submitted");}
//-->
</SCRIPT>
<FORM Name="myform" METHOD=POST ACTION="">
First Name:
<INPUT TYPE="text" Name="fname"><br>
Last Name:
<INPUT TYPE="text" Name="lname"><br>
<INPUT TYPE="submit" value="Submit" onclick=myclick()>
</FORM>


Thanks anyways!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st July 2014 - 04:38 PM