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.
  • ZeldorBlat

    #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.
    And your PHP question is?

    Comment

    • anush

      #3
      Re: Ajax.Request

      On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gma il.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.
      >
      And your PHP question is?
      `id` has to be GETed into the PHP script which will delete the value
      from the DB

      Comment

      • ZeldorBlat

        #4
        Re: Ajax.Request

        On Feb 19, 12:33 pm, anush <anushshe...@gm ail.comwrote:
        On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gma il.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.
        >
        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.

        Comment

        • anush

          #5
          Re: Ajax.Request

          On Feb 19, 10:46 pm, ZeldorBlat <zeldorb...@gma il.comwrote:
          On Feb 19, 12:33 pm, anush <anushshe...@gm ail.comwrote:
          >
          >
          >
          On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gma il.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.
          >
          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.


          Thanks a lot
          -
          Anush

          Comment

          • ZeldorBlat

            #6
            Re: Ajax.Request

            On Feb 19, 1:16 pm, anush <anushshe...@gm ail.comwrote:
            On Feb 19, 10:46 pm, ZeldorBlat <zeldorb...@gma il.comwrote:
            >
            >
            >
            On Feb 19, 12:33 pm, anush <anushshe...@gm ail.comwrote:
            >
            On Feb 19, 10:30 pm, ZeldorBlat <zeldorb...@gma il.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.
            >
            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.
            >

            >
            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.

            Comment

            • rf

              #7
              Re: Downer On Prototype?


              "Rob" <ratkinson@tb s-ltd.co.ukwrote in message
              news:3187bbc5-eeef-4cec-870f-f4734cfef5bc@41 g2000hsc.google groups.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.javas cript and look for a thread "Prototype -
              Good/Bad/Why?".


              Comment

              Working...