Search code examples
ajaxautosuggestspry

Ajax locally testing


I'm new to this Ajax thing. I wanted to try this
http://labs.adobe.com/technologies/spry/samples/data_region/SuggestSample.html
neat little Autosuggest form. The form doesn't work when i save it locally.
Below there is a list of what i've done and used so far :

  • Firefox -> save pages as ..(index.html)
  • new folder ( test23 )
  • also saved the products.xml
  • opened index.html
  • change this line : var dsProducts = new Spry.Data.XMLDataSet("../../demos/products/products.xml", "/products/product", { sortOnLoad: "name" })
  • into : var dsProducts = new Spry.Data.XMLDataSet("products.xml", "/products/product", { sortOnLoad: "name" })
  • test failed :(

Can anyone help me out ?


Solution

  • I just tried for like three minutes and got it to work at the first try (without images). you have to remember to get all the scripts and actually point to them in the main html file.

    Don't forget the script tags on lines 41 through 43.

    Kris

    -- additions:

    I tested on my Mac's local filesystem without any server using Safari as my browser. I have since deleted the files but could easily do it again and put the files up for download.