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 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    73
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Editing HTML inline

    HI All,

    I have a simple table that i would like to make editable..

    I have found many instances of code to make all types of data editable, but i can not find one that actually allows for the saving of the changed data...
    I have found some mySQL code, but this is just a straight HTML table that need to be updatable by the public/client..

    Any ideas?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,703
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    And how is that updated data stored?
    And how can you be sure that the public is using a JavaScript-capable web browser to edit the data?

  • #3
    Regular Coder
    Join Date
    Aug 2010
    Location
    Now Southern Oregon. I was born and had lived my life in Los Angeles until relocating last year (2010)
    Posts
    215
    Thanks
    52
    Thanked 1 Time in 1 Post

    saving changed data

    There are several ways, assuming user has javascript active you add form
    input type hidden fields and write the data changed to it, or form text fields
    that receive user data (if that is what you are doing). Then at some point the
    form has to be submitted. Saving the data is actually a server side process.

    You can use ajax or have the page submit to itself and use php in the page
    to look for GET of POST vars and do what is necessary on the server side.
    Data bases can be used if available, or create flat file (plain text) files that
    save data.

    I use php on the server side. But this off topic for this forum section as I can
    see.

  • #4
    New Coder
    Join Date
    Jul 2012
    Posts
    73
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by anotherJEK View Post

    I use php on the server side. But this off topic for this forum section as I can
    see.

    That's the route i am trying now.. since i've had little luck with JS (not a noob, but not an expert either) in this respect, i'm moving to PHP.. set up an sql db, and just pulling from that with a form at the bottom to add records..
    i will add an 'edit' button to the right of each row with an 'edit' button..

    seems the most legit way to go about this imho..

    on the other hand.. php/sql is harder to debug than js.. as i always have typos and missing ; LOL it never fails..

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,703
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Quote Originally Posted by stevenryals View Post
    That's the route i am trying now.. since i've had little luck with JS […], i'm moving to PHP..
    And that’s actually the first route you should go anyway. JavaScript should not be used as primary method for such kind of functionality, it should only be used to enhance the functionality of a site/form that is already working (e. g. through the use of server side code).


  •  

    Posting Permissions

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