| | |
help!
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 1
Reputation:
Solved Threads: 0
Dear All,
Here's what I'm interested in doing but can't get working.
In my webpage, the user can visualize some information
from the database and eventually choose to edit it. (All
this is done with AJAX). When the user clicks on "edit" the
appropriate <DIV> section is refreshed such that the aforementioned
information appears in a text input and can now be modified
by the user.
What I would like to do next, is to take this modified information,
associate it with a new variable and send it to the database to
replace the old information - this is done after clicking a "save" button.
(Again done with AJAX). However I'm having difficulties with this as
I do not know how to associate the new information from the text
input to a new variable. Perhaps there is a more intelligent way?
Any ideas are welcome!
Best from Brussels,
TMT000
Here's what I'm interested in doing but can't get working.
In my webpage, the user can visualize some information
from the database and eventually choose to edit it. (All
this is done with AJAX). When the user clicks on "edit" the
appropriate <DIV> section is refreshed such that the aforementioned
information appears in a text input and can now be modified
by the user.
What I would like to do next, is to take this modified information,
associate it with a new variable and send it to the database to
replace the old information - this is done after clicking a "save" button.
(Again done with AJAX). However I'm having difficulties with this as
I do not know how to associate the new information from the text
input to a new variable. Perhaps there is a more intelligent way?
Any ideas are welcome!
Best from Brussels,
TMT000
Please post your code so we may have look at it
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
> What I would like to do next, is to take this modified information,
> associate it with a new variable and send it to the database to
> replace the old information - this is done after clicking a "save" button.
> (Again done with AJAX). However I'm having difficulties with this as
> I do not know how to associate the new information from the text
> input to a new variable. Perhaps there is a more intelligent way?
You would definitely need some method of identifying which row of your database be updated. If you are allowing your users to edit the content they posted, sending the user information along with the post id (a value which uniquely identifies your post) would do the job though you would need to do some security checks at the server side concerning whether the user editing the post is really the one who is logged in.
Once you have the required meta information, all you would require to do is to read the data from the text area and send it using Ajax.
> associate it with a new variable and send it to the database to
> replace the old information - this is done after clicking a "save" button.
> (Again done with AJAX). However I'm having difficulties with this as
> I do not know how to associate the new information from the text
> input to a new variable. Perhaps there is a more intelligent way?
You would definitely need some method of identifying which row of your database be updated. If you are allowing your users to edit the content they posted, sending the user information along with the post id (a value which uniquely identifies your post) would do the job though you would need to do some security checks at the server side concerning whether the user editing the post is really the one who is logged in.
Once you have the required meta information, all you would require to do is to read the data from the text area and send it using Ajax.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: need some help new to javascript
- Next Thread: Need help in javascript and modal window
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array blackjack browser captcha captchaformproblem cart child class close codes date debugger decimal dependent developer disablefirebug dom editor element embed engine enter events explorer ext file firefox flash focus form forms frameworks game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsf jsp jump libcurl listbox maps marquee masterpage math media menu mp4 object onerror onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post programming prototype rated redirect safari scale scriptlets scroll search security size software star starrating stars stretch synchronous toggle tweet unicode variables web webservice window \n






