Can someone post some code to dynamically add/remove a textfield by a button next to it.
Ihave tried but for some reason it does not post to the email when used in an asp email application
Printable View
Can someone post some code to dynamically add/remove a textfield by a button next to it.
Ihave tried but for some reason it does not post to the email when used in an asp email application
How about something like this?
****************************************************
<html>
<head>
<script language="VBScript">
Sub Hide
Dim MyForm
Set MyForm = document.form1
If (MyForm.textbx.style.display="none")Then
MyForm.textbx.style.display="inline"
Else
MyForm.textbx.style.display="none"
End If
End Sub
</script>
</head>
<body>
<form name="form1">
<input type="text" name="textbx">
<button name="Visible" onClick="Hide">Visible?</button>
</form>
</body>
</html>
In Client Side?Quote:
Originally posted by Mindbounce
Can someone post some code to dynamically add/remove a textfield by a button next to it.
Ihave tried but for some reason it does not post to the email when used in an asp email application
Also explain what you are trying to do then we will be able to advice better.
japshire, he wants to Create/Remove text field, also VBScript in client side should be avoided, as it only works in IE.
Well I have this form that has many input fields per item. Each Item they have to specify the size in this field. Sometimes they dont need these items but sometimes they need more fields to one item so therefore they need to add another field.
Does that make sense.
Let me know
My question was whether you are trying to do this in Client Side (e.g Using JavaScript or Server Side using ASP)?Quote:
Originally posted by Mindbounce
Well I have this form that has many input fields per item. Each Item they have to specify the size in this field. Sometimes they dont need these items but sometimes they need more fields to one item so therefore they need to add another field.
Does that make sense.
Let me know
Anyhow if you are doing it in server side it should be quite simile. Just use if statement to figure when you need those extra field and just use response.write "<input type=textbox>" inside a loop.
Doing this in client side might be a little bit harder.
Hope this helps.