Don't close when clicking next to the frame

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Don't close when clicking next to the frame

Dudeeeeeeee
Hello,

I use the option 'iframe' to display a page.

The page has a form with a lot of fields, and I don't want people to get frustrated when they click in the black area (next to the frame) and it closes.

So how can I disable this? I only want to use the close button (the button right at the bottom)
Reply | Threaded
Open this post in threaded view
|

Re: Don't close when clicking next to the frame

Wizzud
See the 'modal' option in the documentation!
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Don't close when clicking next to the frame

Ethernium57
The response to 'see documentation' isn't even slightly helpful. First of all, the link provided in that response doesn't even go to the proper page that mentions 'modal'. Second, the documentation is quite vague in that it doesn't provide an example. Hence, the forum.

That being said, you can enable 'modal' on the init of shadowbox:
  Shadowbox.init({modal:true});

However, this effects all shadowbox links on the page. If you want to specifically target some for modal, and others for non-modal display from the same page, my initial instinct was to try rel="shadowbox;modal=true;"  ... that doesn't work.

This is how to target a specific link for modal display:
rel="shadowbox;options={modal:true;}"  

Reply | Threaded
Open this post in threaded view
|

Re: Don't close when clicking next to the frame

Wizzud
@Ethernium57
Firstly, in the 18 months since the original post, both the product and the documentation have changed - the documentation in particular has been re-structured. A huge hint here would be that the url in the link does not match the link's actual destination? If the link were clicked 18 months ago, then the information it then pointed to may have been more applicable/relevant - to the original question asked - than it appears to be now.
Secondly, while not being perfect (my opinion only), the current documentation does provide an example of how to apply options (in general) to the Shadowbox.init() call. It even indicates how to apply options in markup on a per-link basis.

To me personally...
Ethernium57 wrote
A good rule to go by when posting is that your response is probably only truly helpful if you put some thought and effort into it.
Perhaps one might consider following one's own advice?
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Don't close when clicking next to the frame

dgaletar
Hey Wizz! For those of us that do not have a dog in this fight, would you mind updating the link? You see, we have a form that needs to open "over" a page. We want them to be able to see the info on the page, but not gave access to it.

We accomplished this by opening the form up in a shadowbox. The problem is, we can't figure out how to keep them from being able to close the shadowbox, thus gaining access to the information on the page below.

The code we used to open the shadowbox is:

<script> window.onload = function(){ // open a welcome message as soon as the window loads Shadowbox.open({ content: '<iframe src="../parts/reg3.php" rel="shadowbox;options={modal:false;}></iframe>', player: "html", title: "", height: 600, width: 800 }); }; </script>
**(I actually added the "rel="shadowbox;options={modal:false;}" after reading this forum, but it didn't work.)

The link to the site itself is: http://www.thebusinessmatch.com/. Scroll down and click on the "See a Sample Now" button under "Micro-Businesses" (on the far left).

Or, to go directly to the page, go to: http://www.thebusinessmatch.com/sample.php.

As always, any and all help would be GREATLY appreciated!!

Thanks,

DG