if i have
customer
-cid
-name
-lasname
contact
-cid
-telephone
and i want to add telephone like 10 number how can i write the java for add textfield for add number and how can i put on database
thank
if i have
customer
-cid
-name
-lasname
contact
-cid
-telephone
and i want to add telephone like 10 number how can i write the java for add textfield for add number and how can i put on database
thank
Firstly, that's a one-to-many relationship: there's no way for one telephone number to belong to multiple customers. Secondly, what exactly are you talking about? You've posted this in the Javascript forum, then you're talking about Java, then you want to add a textbox? Do you have some form of Java serverside?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
something like this i mean i customer can have more than 1 phone number but i dont want to fix the number for each customerPHP Code:<div id="input">
<input type="text" name="telephone1">
</div>
<input type="button" value="เพิ่ม" onclick="add()">
<script>
var counter=1;
function add(){
counter+=1;
document.getElementById("input").innerHTML+="<br><input type='text' name='telephone"+counter+"'>";
}
</script>
Ah:Code:<script type="text/javascript"> function addTelephoneInput() { var inp = document.createElement("input"); inp.type = "text"; inp.name = "telephone"; // If using PHP, this has to be "telephone[]" due to PHP's limited capabilities. document.getElementById("input").appendChild(inp); } </script>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks