Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-11-2012, 04:38 PM   PM User | #1
stevenryals
New Coder

 
Join Date: Jul 2012
Posts: 60
Thanks: 4
Thanked 0 Times in 0 Posts
stevenryals is an unknown quantity at this point
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?
stevenryals is offline   Reply With Quote
Old 10-11-2012, 05:56 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,614
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-11-2012, 06:52 PM   PM User | #3
anotherJEK
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: 152
Thanks: 41
Thanked 1 Time in 1 Post
anotherJEK is an unknown quantity at this point
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.
anotherJEK is offline   Reply With Quote
Old 10-11-2012, 07:45 PM   PM User | #4
stevenryals
New Coder

 
Join Date: Jul 2012
Posts: 60
Thanks: 4
Thanked 0 Times in 0 Posts
stevenryals is an unknown quantity at this point
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..
stevenryals is offline   Reply With Quote
Old 10-11-2012, 10:32 PM   PM User | #5
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,614
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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).
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:53 AM.


Advertisement
Log in to turn off these ads.