help!

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Apr 2008
Posts: 1
Reputation: tmt000 is an unknown quantity at this point 
Solved Threads: 0
tmt000 tmt000 is offline Offline
Newbie Poster

help!

 
0
  #1
Apr 4th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,238
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 490
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: help!

 
0
  #2
Apr 4th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,635
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 469
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: help!

 
0
  #3
Apr 6th, 2008
> 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.
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC