PHP Classes

Lightbox

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Lightbox  >  (Un) Subscribe thread alerts  
Subject:Lightbox
Summary:Lightbox on submit
Messages:4
Author:James
Date:2007-12-19 21:27:35
Update:2007-12-22 04:42:57
 

  1. Lightbox   Reply   Report abuse  
Picture of James James - 2007-12-19 21:27:36
It would be very beneficial and slick if a lightbox could be shown on submit.

-Only show lightbox if javascript validation is passed.
-Define path to content(image, swf, or html) to show in the lightbox.
-Define if lightbox is modal.

I have been trying to implement this using a few other solutions, but havnt been able to make it work very well.

Has anybody else implemented a lightbox with this class and if so can you post your solution?

  2. Re: Lightbox   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-20 02:01:56 - In reply to message 1 from James
I am not sure what you want to use the light box for. Do you want to display the form in the light box? Do you want to exhibit the light box with a message during form submission?

You can use the pseudo-event ONSUBMITTING to define Javascript code to be executed after the form is validated, right before the form is submitted to the server.

  3. Re: Lightbox   Reply   Report abuse  
Picture of James James - 2007-12-20 04:26:30 - In reply to message 2 from Manuel Lemos
On submit there may delayed processing time. In my case I'm making SOAP calls to outside webservices and see up to a 10-12 second delay at times. I have no control over the speed of the services and must use them.

I thought a neat and possibly 'new school' solution would be to display a modal lightbox with a flash progress meter or other content informing the user that things are in progress. It would also prevent the user from submitting the form again.

I got the lightbox form solution at creativeruin.com working with your great forms validation class, although am running into problems with the lightbox showing when the form doesnt pass the javascript validation. Also, after testing different browsers discovered the creativeruin lightbox solution crashes IE7.

I use your class with all my forms and thought I'd mention the lightbox as a possible new feature. My benefits of the lightbox would be to provide feedback to the user after submitting a form that will have delayed or long processing time. Another would be to display a form within a lightbox after submitting another form.

  4. Re: Lightbox   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-12-22 04:42:57 - In reply to message 3 from James
I think you can create a new plug-in that does nothing except calling the class Connect function associate the ONSUBMITTING event with an action implemented by your plug-in class that in practice would generate the necessary to make your light box appear and do whatever you want to prevent the user to submit the form again.

If you want to give progress about actions executed on the server, you may want to check the AJAX form submit plug-in as it allows you to do exactly that.