Help - Search - Members - Calendar
Full Version: Textbox issue
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Abhijith
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!!!
Abhijith
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!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.