Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Ajax question
- From: tedd at sperling.com (tedd)
- Subject: [Javascript] Ajax question
- Date: Sat Dec 30 14:28:12 2006
At 11:39 AM -0800 12/30/06, Paul Novitski wrote: >At 12/30/2006 09:24 AM, tedd wrote: >>I realize that ajax is used to circumvent full page refreshes, but >>what if you want to refresh the page AND use ajax at the same time? > > >Tedd, > >I suspect that your problem is indicated by your use of the >expression "at the same time." Which do you want to occur first, >the page refresh or the ajax request? Obviously the page refresh >must come first, otherwise the ajax-delivered content will be >obliterated by the page refresh. > >I suggest you explore this path: reload the page with a querystring >that indicates the desired ajax request, then after page load have >javascript collect the desired content. Something along the lines >of http://example.com/testpage.html?ajax=rock > >Regards, >Paul Paul: I see and have considered the timing difference. I should have said "I want to use ajax to send a variable and then refresh the current page, or a redirect to any other page." I don't want to use the form http://example.com/testpage.html?ajax=rock I have no problem receiving the variable I want so there's no need for me to include that variable in the url. I want to use ajax in the manner of: <a href="javascript:sndReq('rock');" >Rock </a> You see, I can send "rock" that way via ajax with no problems. What I can't do is via a single click refresh this page, or direct the browser to another page, via a href or whatever. I know this is hard to understand, but just simply consider this -- if the user clicks (The CLICK) this anchor -- <a href="javascript:sndReq('rock');" >Rock </a> -- everything works. Now, how do I redirect the browser to another page from the same user click (The CLICK)? Thanks. tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com
- Follow-Ups:
- [Javascript] Ajax question
- From: Paul Novitski
- [Javascript] Ajax question
- From: Mike Dougherty
- [Javascript] Ajax question
- References:
- [Javascript] Ajax question
- From: tedd
- [Javascript] Ajax question
- From: Paul Novitski
- [Javascript] Ajax question
- Prev by Date: [Javascript] Ajax question
- Next by Date: [Javascript] Ajax question
- Previous by thread: [Javascript] Ajax question
- Next by thread: [Javascript] Ajax question
- Index(es):