location.reload() problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tinks
    New Member
    • Dec 2010
    • 5

    location.reload() problem

    hi,

    i have a problem with location.reload ();

    because i need to reload my page without clicking a button so
    everytime i get a reply from server (using ajax) i call
    location.reload ();

    in one of my codes, i was calling:

    fill() --->this fills my form from data in db.

    and then, the other call that i have, calls:

    location.reload ();
    fill(xmlRespons e);

    the first call does not have a prblem but when i call a function with
    location.reload () previously, it gives out an error saying that
    the fill(xmlRespons e) is not defined.

    what are the rules necessary when calling location.reload ?

    im stuck please help. thanks a lot.
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    Why would you reload the page if you're using Ajax?

    The whole purpose behind using Ajax is to avoid the full reloading of a page.

    I think you should read up on the power of using Ajax.

    If I understand you properly, your logic should be:
    1- Button click
    2- Make Ajax call
    2a- Results return
    3- Populate form
    x- No page reloading; acts like desktop app

    Comment

    Working...