Hi people !
I'm trying to do a popup using modalbox (http://www.wildbit.com/labs/modalbox/). The point is having a nice AJAX popup with some cool effects, rather than a simple JS popup.
The popup opens when the user clicks on a link, and it returns a page which will display some text according to the parameters sent in the url.
My url looks like something like this :
page.php?id=1
Then, the page.php is something like that :
PHP Code:
$getid = $_GET['id'];
$auteurname = mysql_result(mysql_query("SELECT auteur FROM bioauteurs WHERE ID='$getid'",$connection),0);
$auteurbio = mysql_result(mysql_query("SELECT bio FROM bioauteurs WHERE ID='$getid'",$connection),0);
echo "<h2 class=\"auteur\">".$auteurname."</h2>";
echo "<p class=\"biographie\">".$auteurbio."</p>";
My main problem is that my modalbox doesn't work at all. It opens, doesn't display any content, and content is then opened in another page.
Why is it so ? Is it not possible to pass php parameters in AJAX using a simple method ?
Here is what I did :
HTML Code:
<a href="page.php?id=1" title="Simple form" onclick="
Modalbox.show(this.href, {title: this.title, width: 600}); return false;
"> Test page</a>
I attached the modalbox scripts, if somebody wants to take a look.
Any help would be great. I've been working on this for two days, trying to find info on the net, and I couldn't grab anything that would work
Bookmarks