I'm using the simplemodal Jquery API. just like the "Contact Form" modal sample in this link http://www.ericmmartin.com/projects/simplemodal-demos/
but I need to add another button or anchor tag like signup button from within the contact.php page and that button would open another php page content like signup.php. I have tried something like this see the link below: http://at5024-lumooc.lakeheadu.ca/contact/
but the link does not open any dialog after... I'm new to this so I need some help please.... this is the code I changed to the "Contact Form" demo in the contact.php file I added this at the end of the ".contact-content" div
Open new Modalyou can see that clearly on the open dialog. and on the contact.js
under the on show function I added this.
$("#signup").click(function (e) { e.preventDefault(); alert("The .... URL." + $(this).attr("href")); $.modal.close(); $.modal(" I'm testing here"); });
I can see the alert once the anchor is clicked and the current modal does close but I can't open a new modal. I have tried the last line with other ways like.
$(" I'm testing here").modal();
and
contact.init();
but no luck....
any idea any one... Thanks ahead...
This could be an order-of-operations issue, i.e. the modal closes after you try opening it. I'd suggest moving the line $.modal(" I'm testing here");
into a function, and adding a call to it in the modal's onClose
event.