how to get value from a php page called by using ajax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshrasm
    Contributor
    • Nov 2007
    • 254

    #1

    how to get value from a php page called by using ajax

    Hi

    i have a page "newlaunching.p hp" page on which image is displayed and when user clicks one of thumbnail its larger image comes to this page(newlaunchi ng.php) from "getimage.php"p age using ajax and it is working fine! now i want to get the "id" of the larger image from "getimage.p hp so that i could pass this value to "ADD to CART" button for which the product will be added to cart. By default on "ADD to CART" button by default's image id comes. I tried to pass the id using images name attribute then tried to retrieve it using $_POST['name']; method but it is not working then i tried a hidden input box and passed id to its value attribute and used if(isset('produ ctid')); here productid is the name of hidden input box. but it also did not worked.

    how could i do this please suggest !
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    I think you need to explain it properly.

    Comment

    • mukeshrasm
      Contributor
      • Nov 2007
      • 254

      #3
      Originally posted by hsriat
      I think you need to explain it properly.
      Thanks! Please visit Devotion Supreme: Concious. though in this page when you will click any thumbnail image its larger will come to the that area and I want the id of that product should pass on the
      Add to Cart button. currently swaping is done using simple javascript but I have done it locally to swap images using AJAX. so how will I pass the id of the product to Add to Cart button when any thumbnail is clicked.

      Comment

      • mukeshrasm
        Contributor
        • Nov 2007
        • 254

        #4
        Originally posted by hsriat
        I think you need to explain it properly.
        Thanks! Please visit Devotion Supreme: Concious. though in this page when you will click any thumbnail image its larger will come to the that area and I want the id of that product should pass on the
        Add to Cart button. currently swaping is done using simple javascript but I have done it locally to swap images using AJAX. so how will I pass the id of the product to Add to Cart button when any thumbnail is clicked.

        Comment

        Working...