tags:

views:

49

answers:

2

I am wanting to redirect a page on click, and then load specified content into on of those pages div.

How do I go about doing this?

For example:

<div id="redirect">Click here to go to new page</div>

When the new page loads, there will be a div with id = content that needs to have content automatically loaded via ajax based on data sent from the redirect id on the previous page.

A: 

Something like this:

$(function(){
 $('#redirect').click(function(){
   window.location = 'your_page.php?id=' + id_here;
 });
});

On the next page you can load data anyway you want based on the id query string value.

Sarfraz
+1  A: 

How about good old HTML?

<div><a href="page.ext?id=1">Click here to go to new page</a></div>

Then, use some server-side technology to render the desired content on page.ext.

Ionuț G. Stan
The problem is that I'm working with an already developed system, and the way it works is through loading divs with ajax calls.
kylex