By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,230 Members | 2,436 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,230 IT Pros & Developers. It's quick & easy.

Loading Page from javascript function

P: 29
Hi,
can anyone solve my problem?
i want to load or refresh the page from javascript function?how to do it?
i.e., on click of anchor tag i am calling javascript function and after some manipulation i want to load same page.
thanks
a.prabhu
Jun 26 '07 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
Hi,
can anyone solve my problem?
i want to load or refresh the page from javascript function?how to do it?
i.e., on click of anchor tag i am calling javascript function and after some manipulation i want to load same page.
thanks
a.prabhu
Moved to Javascript forum .
Jun 26 '07 #2

gits
Expert Mod 5K+
P: 5,352
hi ...

i guess the 'some manipulation' means you want to adapt the page itself with new data that are retrieved from the server depending on the users input ... so 'onclick' that you mentioned ... you may do an ajax call, retrieve the new data and adapt the page to your needs with the new data ...

have a look at: http://www.w3schools.com/ajax/default.asp

kind regards ...
Jun 26 '07 #3

P: 21
to just reload:
Expand|Select|Wrap|Line Numbers
  1. onclick="window.location.reload()"
to change the page:
Expand|Select|Wrap|Line Numbers
  1. onclick="window.location = 'http://www.google.com/'"
but to reload just part of the document, use AJAX like in the last post :)
Jun 27 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.