By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Ajax.Request

P: n/a
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request

So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.

I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.
Feb 19 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Feb 19, 12:21 pm, anush <anushshe...@gmail.comwrote:
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request

So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.

I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.
And your PHP question is?
Feb 19 '08 #2

P: n/a
On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:21 pm, anush <anushshe...@gmail.comwrote:
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request
So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.
I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.

And your PHP question is?
`id` has to be GETed into the PHP script which will delete the value
from the DB
Feb 19 '08 #3

P: n/a
On Feb 19, 12:33 pm, anush <anushshe...@gmail.comwrote:
On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:21 pm, anush <anushshe...@gmail.comwrote:
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request
So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.
I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.
And your PHP question is?

`id` has to be GETed into the PHP script which will delete the value
from the DB
Then provide the code that doesn't work so we at least have a chance
at solving your problem.
Feb 19 '08 #4

P: n/a
On Feb 19, 10:46 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:33 pm, anush <anushshe...@gmail.comwrote:
On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:21 pm, anush <anushshe...@gmail.comwrote:
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request
So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.
I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.
And your PHP question is?
`id` has to be GETed into the PHP script which will delete the value
from the DB

Then provide the code that doesn't work so we at least have a chance
at solving your problem.
http://www.pastebin.ca/910012

Thanks a lot
-
Anush
Feb 19 '08 #5

P: n/a
On Feb 19, 1:16 pm, anush <anushshe...@gmail.comwrote:
On Feb 19, 10:46 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:33 pm, anush <anushshe...@gmail.comwrote:
On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gmail.comwrote:
On Feb 19, 12:21 pm, anush <anushshe...@gmail.comwrote:
Hi,
I am using prototype.js to save data into MySQL using Ajax.Request
So i am grabbing the id and if the id<0 , I am adding it as a new
data, otherwise I am just updating it. Similarly I am checking if the
id>0, and then delete that row.
I have been able to add new data successfully but update and delete
function are just not working. When I look into the value of the
`id` , it displays as "undefined". Could anyone please tell me how to
proceed. The rest of the parameters are getting grabbed.
And your PHP question is?
`id` has to be GETed into the PHP script which will delete the value
from the DB
Then provide the code that doesn't work so we at least have a chance
at solving your problem.

http://www.pastebin.ca/910012

Thanks a lot
-
Anush
When I said provide the code that doesn't work I meant to only provide
the code that doesn't work -- not all the code that may or may not
work. Include the /smallest piece of code that illustrates the
problem you're having./ While doing that there's a good chance you'll
find the problem yourself.
Feb 19 '08 #6

P: n/a
rf

"Rob" <ra*******@tbs-ltd.co.ukwrote in message
news:31**********************************@41g2000h sc.googlegroups.com...

Tony, I'm intrigued to know why people have such a downer on Prototype
- this isn't the first time I've read comments like this.

Go over to comp.lang.javascript and look for a thread "Prototype -
Good/Bad/Why?".
Feb 20 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.