2

How can make a link within a facebox window that redirects it to another page without breaking out?

I tried using an iframe which worked nicely... except the initial content I want to display in the facebox is a simple message and a link. I then want the link to redirect to a page if clicked.

As iframes require a src there is no where on the page I can write the message. My only thought was to generate a src for the iframe that passed the message as a parameter on a url to a php page that echoed the message (quite an ugly solution).

Is there a better way?

JimBo
  • 313
  • 2
  • 4
  • 8

1 Answers1

2

Well, you could use ajax to simply replace the contents of the facebox.

$("#mylink_id").click(function() {
    $("#content_id").load($(this).attr('href'));
    return false;
});
dale
  • 760
  • 5
  • 11