javascript - Ajax in Tinybox 2 -


i have tinybox 2 popup opening when clicking 'register'. user has choose if he/she wants register user or performer. i'd show different registration page each, first asking it, handling ajax best. can done, shown here, in 5th example. here current code:

<!doctype html> <html> <head> <title>regisztrációs típus kiválasztása</title> <meta charset="utf-8"/> <link rel="stylesheet" type="text/css" href="../css/soon.css"/> <script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script> </head> <body> <div id="teljes"> <h1>miként szeretnél regisztrálni?</h1> <div id="felhasznalo"> <a href="#felhaszlano_regisztracio" id="felireg">felhasználóként</a> </div> <div id="eloado"> <a href="../php/register_performer.php">előadóként</a> </div> </div> <script type="text/javascript"> $('#felireg').click(function() { $.get("../php/register.php"); }); </script> </body> </html> 

thanks!

if understand correctly, want make ajax call registration file named "register.php" , show in tinybox

$('#felireg').click(function() { tiny.box.show({ url:'../php/register.php',width:300,height:150 }) }); 

this should work.

//edit : assuming file returns html:

$('#felireg').click(function() { $.get("../php/register.php", function(data) { tiny.box.fill(data); }); }); 

this should update current tinybox


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -