vkdixit
03-23-2009, 07:44 AM
Hi all,
I want to fetch the input box value which is dynamically added on asp page using javascript/jquery....
Code is:
<html>
<script src="../Contacts/cmailer/include/jquery.js" type="text/javascript"></script>
<SCRIPT LANGUAGE="JavaScript">
function addphone()
{
$("div#addnewtagP").before('<form autocomplete="off"><input type="text" id="suggest_addtag" /> <select name="select_phone"><option>select one</option><option>Home</option><option>Work</option><option>Other</option></select></form>');
}
function addemail()
{
$("div#addnewtagE").before('<form autocomplete="off"><input type="text" id="suggest_addtag" /> <select name="select_phone"><option>select one</option><option>Home</option><option>Work</option><option>Other</option></select></form>');
}
</SCRIPT>
<body>
<form>
<div id="addnewtagP"><a href="javascript:addphone()">Add another</a></div><br>
<div id="addnewtagE"><a href="javascript:addemail()">Add another</a></div><br>
</form>
</body>
</html>
but in this code all the text box have same value, how can i differ one from another....
plese help
I want to fetch the input box value which is dynamically added on asp page using javascript/jquery....
Code is:
<html>
<script src="../Contacts/cmailer/include/jquery.js" type="text/javascript"></script>
<SCRIPT LANGUAGE="JavaScript">
function addphone()
{
$("div#addnewtagP").before('<form autocomplete="off"><input type="text" id="suggest_addtag" /> <select name="select_phone"><option>select one</option><option>Home</option><option>Work</option><option>Other</option></select></form>');
}
function addemail()
{
$("div#addnewtagE").before('<form autocomplete="off"><input type="text" id="suggest_addtag" /> <select name="select_phone"><option>select one</option><option>Home</option><option>Work</option><option>Other</option></select></form>');
}
</SCRIPT>
<body>
<form>
<div id="addnewtagP"><a href="javascript:addphone()">Add another</a></div><br>
<div id="addnewtagE"><a href="javascript:addemail()">Add another</a></div><br>
</form>
</body>
</html>
but in this code all the text box have same value, how can i differ one from another....
plese help