I’m trying to open a jquery modal dialog box when the user clicks on a link. I’d like to then load an external php file into the dialog box. I’m using this jquery:
$(document).ready(function() {
$('#register').dialog({
title: 'Register for LifeStor',
resizable: true,
autoOpen:false,
modal: true,
hide: 'fade',
width:350,
height:275,
});//end dialog
$('#reg_link').click (function() {
open: (function(e) {
$('#register').load ('register.php');
});
});
});
and this html:
<div id="register"></div>
which is set to display:none in the .css file.
Further on, inside a form, the link is called:
<td><font size="2">Not registered? <a href="#" name="reg_link">Sign-Up!</a></td>
(I’ll be changing the table to divs).
I don’t get any errors with this code, but nothing happens when I click the link. I got most of the above from other stack overflow posts. Am I missing something? Is the table html interfering?
Regards…
In your link
you have
name="reg_link"that should beid="reg_link"instead, i.e.So it’ll work with following code
To make it a dialog you can use
Just an example.