PDA

View Full Version : Facebox trigger



c0mrade
11-10-2008, 01:44 PM
1) Script Title:
Facebox image and content viewer

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/facebox/index.htm

3) Describe problem:
As far as I saw this script only responds to <a click> .. is it possible to trigger facebox window from javascript or what I exactly need is something like on form submit. I have standard form in php with several input buttons and what I'd like to make is :

1. When form submitts(after submission is complete) to trigger facebox window with content inside like "do you want to continue adding records" if yes is pressed then leave the user on this page to continue adding records if No is clicked then redirect it to other window.

Thank you

ddadmin
11-11-2008, 12:03 AM
What you can do is embed a facebox link on your page as usual but that's hidden to begin with. Then when the time comes to automatically "click" on it, you'd call the code:


jQuery('a#faceboxlink[rel*=facebox]').facebox()

where #faceboxlink would be the facebox link with that ID. When to call the above depends on how the rest of your page is set up.

You may also want to look at this page, which shows how to integrate Facebox with another script, for some ideas: http://www.dynamicdrive.com/dynamicindex4/stepcarousel_suppliment4.htm