0

here is the code what i am trying

<script>
 var output = "<table id='e' border><tr><td><input type='text' id=/"t"/></td><td><input type='text' id=/"t1/"></td><td><input type='text1' id=/"t2"/></td><td><input type='text1' id=/"t3"/></td><button onclick=del('"+ divId +"')>delete</button></td></tr></table>";

</script>

<body>
<form method=post action="t.php">
<input type="text" id= ??(from script...)
</body>

what shell i do in order to send parameters from script to form one by one in text field? is there any possibilty?

2
  • You want to get text from input text, right? But when you do what? At the end you write in input text? Commented Jan 16, 2014 at 17:43
  • yes. excatly i want to send text and place in text Commented Jan 16, 2014 at 17:47

2 Answers 2

1

In php:

<?php 
if($_POST['submit'])
{
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    //Here you have the text in php variables. You can do whatever you want with them
}
?>

<form method="post" enctype="multipart/form-data" name="form">
    Username: <input type="text" name="user" required>
    Password: <input type="password" name="pass" required>
</form>
Sign up to request clarification or add additional context in comments.

Comments

1

Yes, you can get value from input text:

<input type="text" id"yourIDinput" onchange="YouFunctionJavaScript()"/>

<script>
 function YouFunctionJavaScript(){
  var textInput = $("#yourIDinput").val(); // Here you get value
  alert(textInput); // 

}
</script>

It is?

11 Comments

i dont know about jquery. whether <input type="text" id"yourIDinput" onchange="YouFunctionJavaScript()"/> will work for my function if i create in script?
Yes, you only do what you want in script
is it possible <input type="text" name=/t/ value="2" > ?
the name input is invalid. If you use value="2", when you open your page in browser, the input comes with value 2
so this will not work <input type="text" name"yourIDinput" onchange="YouFunctionJavaScript()"/>? so for instance i wish to send value from form to php then what should i do?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.