1

Desired Operation : User will fill out the html form and when press the submit button then I want to validate the user type and if it is guest then it should show a fancybox(popup) screen to sign up for that user because I dont want to save values with guest user. The code I have mentioned in the question is fine but HOW CAN I ACTIVATE THE FANCYBOX SCREEN AFTER VALIDATING THE USER.

I am trying

if($_SESSION['FIRST_NAME']=="Guest")
{
// here I want the code to show the signup.php page
print '<a id="loginframe" href="Signup.php">Sign Up here</a>';
}

How would I activate the fancybox screen coz I dont want to show the link but the activated fancybox firectly with the signup.php iframe. (fancybox is working fine)

Bilal
  • 265
  • 8
  • 20

1 Answers1

0

If possible, I suggest that you avoid using iframes in this particular case.

What I would do is use AJAX to submit the form. That way, the page will not be reloaded and you'll have a js callback function where you can trigger Fancybox. (Jquery.ajax, jQuery Form)

Here is how you can programatically trigger Fancybox:

How to programatically trigger fancybox with an inline div?

I hope this helps.

Community
  • 1
  • 1
LBridge
  • 2,135
  • 5
  • 21
  • 32