View Full Version : Ajax Tabs Content - Response.Redirect

09-24-2006, 03:04 PM
1) Script Title: Ajax Tabs Content Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I've read the forum post about creating links inside the Ajax content pages, so they open in the Ajax div (<a href="javascript:linkjax('test.htm', 'ajaxcontentarea', 0)">), which is perfect. However, what I'd also like to do, is to do the same but through an ASP Response.Redirect. Is this possible at all? Thanks for your time, in advance.

09-24-2006, 06:24 PM
An asp Response.Redirect is only useful before a page starts to load. It would have no effect inside of a loaded page, which is what the Ajax Tabs 'top' page is. Once the top page loaded, it makes no difference what you do with asp unless you are loading a page into a frame or iframe - not what this script does.

09-24-2006, 06:45 PM
So it's not possible?

The reason I ask is that I'm using an email form, which, once submitted, uses a Response.Redirect to send the user to a thank you page. I'd like this thank you page to be within the Ajax tabs, as this is what my site is based around.

09-25-2006, 01:30 AM
You could have Ajax tabs load a new external content page instead of using an R.R but, an R.R would redirect the entire page.

If you are already using asp, there are probably similar looking asp type interfaces that would be able to utilize the R.R in a way that looks like what you are after. In fact, if your form were inside of an iframe - say if the page's content that gets loaded into the tab already has an iframe on it with the form inside that, it could work.

But, I don't think you or very many people realize what Ajax does. It does not load a page into the tab or wherever. It loads the HTML content of that page into an element on the existing top page. For all intents and purposes, it is still just one page.

Furthermore, this all involves the use of javascript. Javascript is a client side language. It exposes your process to the hacking and unreliability that goes with any client side language.