Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Closed Points: 25 Time: 06:24 - Sep 27, 2007
shashi.programmer
i have create a row in which 4 colum two of them is drop down one is date and last one is browse a file to upload. now i need that when i click a button this should add new row with same controls. <table> <tr> <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">HSP</font></td> <td> <select name="hname"> <option value="">HSP</option> </select> </td> <td> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Report Type: </font></td> <td> <select name="rname1"> <option value="">Report Type</option> </select> </td> <td> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Date of Report: </font></td> <td> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Upload File: </font></td> <td><input name="uploaded" type="file" /></td> <td><input name="add" type="submit" value="Add New Record" /></td> </tr> </table> on click over add new record button the complete table should be created in second row thanks & regards Shashidhar Kumar
Categories:
Add Categories
When adding more than one category, separate them with commas.
jgivoni
Date:: Oct 19, 2007
Time:: 11:42
You could try something like this: Change the first lines to: <table> <tr id="record"> ... Change the button to: <input name="add" type="button" value="Add New Record" onclick="addNewRecord()"/> Add this javascript function somewhere: function addNewRecord() { var record = document.getElementById("record"); var no = record.childNodes.length; var newRecord = record.cloneNode(true); newRecord.id = "record" + no; newRecord.value = ""; newRecord.name = "uploaded" + no; record.parentNode.appendChild(newRecord); }
Date:: Oct 29, 2007
Time:: 23:35
not sufficient
Time:: 23:36
i have done it
Date:: Oct 30, 2007
Time:: 01:57
What? You need more help? If so please specify.
internisti007
Date:: Dec 13, 2007
Time:: 21:22
It's cool. Btw,how delete record with on click
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Date:: Sep 03, 2009
Time:: 04:02
<?php /*********************************************** * Snippet Name : Multiple File Uploader * * Scripted By : Shashidhar Kumar * * Website : http://www.shashionline.in * * Email : shashi@shashionline.in * * License : GPL (General Public License) * ***********************************************/ $working_folder = $_SERVER['DOCUMENT_ROOT']."/upload/"; if(IsSet($_POST["submit"])) : $xx = 0; while($_POST["TOTAL_FILE"] >= $xx) : @$fileName[$xx] = $_FILES['theFile']['name'][$xx]; @$tmpName[$xx] = $_FILES['theFile']['tmp_name'][$xx]; @$fileSize[$xx] = $_FILES['theFile']['size'][$xx]; @$fileType[$xx] = $_FILES['theFile']['type'][$xx]; move_uploaded_file ($tmpName[$xx], $working_folder.$fileName[$xx]); $xx++; endwhile; print "Upload successful"; endif; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t... <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript"> <!-- function add_more_upload() { var new_total = Math.round(document.Uploader.TOTAL_FILE.value) + 1; document.getElementById('attach_' + document.Uploader.TOTAL_FILE.value).innerHTML = "<input type='file' size='60' name='theFile[" + new_total + "]' /></p><p id='attach_" + new_total + "'>"; document.Uploader.TOTAL_FILE.value++; } --> </script> </head> <body> <form action="upload.php" name="Uploader" method="post" ENCTYPE="multipart/form-data"> File to Upload: <p id='attach'><input type="file" size="60" name="theFile[0]" /></p> <p id='attach_0'></p> <input type="hidden" name="MAX_FILE_SIZE" value="500000" /> <input type="hidden" name="TOTAL_FILE" value="0" /><br /> <input type="submit" name="submit" value="Upload" /> <input type='button' value='Upload More' onClick="add_more_upload()" /> </form> </body> </html>
Click here to see the Answer Discussion that preceded this tutorial.
Login to rate this tutorial: Good | Bad
Questions
Hi is there a way to retrieve the loop count in XSLT
how do repair this problem: every times i opened my laptop it will suddenly n...
How i get the hp pavilion dv6-3054tx laptop bottom base assembly as a sparepa...
I don't have AOL browser but privacy scan shows hundreds of files/cookies fro...
wireless keyboard has stopped working
need validation controller for textbox in java
You have 100 characters to use
Rank
Expert
Points
1.
10279
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software