Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding fields dynamically and insert their values in MySQL database

    Hello I am new in Javascripting and web database.
    I want a code for adding dynamic combobox and texts into my form (for saving page space).
    To get a little more in depth. Basically, I want the ability to add several form elements, lets say three text boxes, eg: text1, text2, text3. There is a javascript button entitled something like "add a new row", which upon execution, will append another row onto the table (or div if you will), holding another set up text boxes.
    further after making this issue i want to insert their selection values into my database( i Use PHP and MySQL). How is that can be achieved.
    please help me on this since i am new hired and i don't want to fail on my first assignment.

    Regards to everyone.

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,827
    Thanks
    21
    Thanked 157 Times in 148 Posts
    They hired you to program and you don;t know how?

    start with this: http://www.w3schools.com/js/tryit.as...able_insertrow

    except that your table cells would contain textboxes in the innerHTML, I guess....

    i want to insert their selection values into my database( i Use PHP and MySQL).
    you'll have to add a submit button to your form to submit the values to your PHP script, so that you can add them to MySQL....or you can use some AJAX to do this to avoid the page refresh...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding fields dynamically and insert their values in MySQL database

    Thank you 4 ur kind reply,
    I actually a web designer i make several static sites with some of dynamic sites but it doesn't include a long applications that might need for adding same field(e.g like if i request for adding customer experiences he might have only one or many experiences) that is why i want the facility of adding more fields when needed. and i am totally new in JS and i wounder how can i grap the new added fields (since i include the JS file that make the addition) and post it to MySQL.
    Regards..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •