Ajax.Request

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anush

    Ajax.Request

    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.
  • David Mark

    #2
    Re: Ajax.Request

    On Feb 19, 12:21 pm, anush <anushshe...@gm ail.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.
    Proceed by posting some code, but don't expect too much if the problem
    is specific to Prototype. That's one of the many pitfalls of using
    such a library.

    Comment

    • dhtml

      #3
      Re: Ajax.Request

      On Feb 19, 11:59 am, David Mark <dmark.cins...@ gmail.comwrote:
      On Feb 19, 12:21 pm, anush <anushshe...@gm ail.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.
      >
      Proceed by posting some code, but don't expect too much if the problem
      is specific to Prototype. That's one of the many pitfalls of using
      such a library.
      And let the flame fest begin...

      Comment

      • anush

        #4
        Re: Ajax.Request

        On Feb 20, 1:49 am, dhtml <dhtmlkitc...@g mail.comwrote:
        On Feb 19, 11:59 am, David Mark <dmark.cins...@ gmail.comwrote:
        >
        >
        >
        On Feb 19, 12:21 pm, anush <anushshe...@gm ail.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.
        >
        Proceed by posting some code, but don't expect too much if the problem
        is specific to Prototype. That's one of the many pitfalls of using
        such a library.
        >
        And let the flame fest begin...

        Here is the code



        Comment

        • kangax

          #5
          Re: Ajax.Request

          On Feb 19, 7:37 pm, anush <anushshe...@gm ail.comwrote:
          On Feb 20, 1:49 am, dhtml <dhtmlkitc...@g mail.comwrote:
          >
          >
          >
          On Feb 19, 11:59 am, David Mark <dmark.cins...@ gmail.comwrote:
          >
          On Feb 19, 12:21 pm, anush <anushshe...@gm ail.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.
          >
          Proceed by posting some code, but don't expect too much if the problem
          is specific to Prototype. That's one of the many pitfalls of using
          such a library.
          >
          And let the flame fest begin...
          >
          Here is the code
          >
          http://www.pastebin.ca/910012
          This problem is more likely to be solved if you post over at

          Comment

          Working...