0

I have two textboxes and when I enter values in them, I want them to be displayed on the screen(not in a pop up window)...plz help me out!!!!

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by digwnews
0

How this?

<?php
if($_POST['box1'])
{
echo $_POST['box1']."<br>".$_POST['box2'];
}
else
{
echo '<form method="post" action="">
<textarea name="box1"></textarea>
<textarea name="box2"></textarea>
<input type="submit" value="check">
</form>';
}
?>

Edited by digwnews: n/a

0

How this?

<?php
if($_POST['box1'])
{
echo $_POST['box1']."<br>".$_POST['box2'];
}
else
{
echo '<form method="post" action="">
<textarea name="box1"></textarea>
<textarea name="box2"></textarea>
<input type="submit" value="check">
</form>';
}
?>

-------------------------Thnx for the reply...actually I am designing a form in html and implementing in javascript...I am sorry that I have posted in the wrong section...can you help me out?

0

In javascript with jquery framework(example for one textbox):

<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
  $("#btn").click(function () {
  $('#text').text($('#txt').val());
 
	});
  });
  </script>
  </head>
  <body>
<textarea id="txt">txt</textarea>
  <div id="text">txt</div><br />
  <button id="btn">Go!</button>
  </body>
  </html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.