[pmwiki-users] New recipe, PopupIFrame, for creating modal dialog on page with arbitrary url source
John Rigdon
jrigdon at researchonline.net
Mon May 30 18:29:47 CDT 2016
Here's a bit of javascript I use on my web sites. It has the advantage of
not being recognized as a pop-up by the pop-up blockers and can be sized
and positioned.
Put this bit in the head of your page.
<script>
// JavaScript popup window function
function basicPopup(url) {
popupWindow =
window.open(url,'popUpWindow','height=560,width=560,left=600,top=50,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=yes,directories=no,
status=no')
}
</script>
For PMWiki, this can be put in the body of your edit page with
(:html:)
and
(:htmlend:)
surrounding it. Then add the 'addhtml' recipe to your config file.
For regular HTML pages, put it in the head of the page.
Then when you call a url to appear as a popup use this:
<a href="url_here.html" onclick="basicPopup(this.href);return false">
This works fine on Chrome, IE and Firefox. Mobile devices and Safari
display the page as a new page.
YOu can see it working on my Words R Us Site.
www.wordsrus.info
Click on Words R Us For Business about half way down the page.
John Rigdon
www.wordsrus.info
On Mon, May 30, 2016 4:50 pm, Christopher Cox wrote:
> http://www.pmwiki.org/wiki/Cookbook/PopupIFrame
>
>
> I need a way to popup some content on my website inside of a floating
> modal dialog and did not want to be restricted in any way. This allowed
> me to pull in some cgi content, but of course can be used to popup any
> content including foreign content.
>
> Anyway, enjoy!!
>
On Mon, May 30, 2016 4:50 pm, Christopher Cox wrote:
> http://www.pmwiki.org/wiki/Cookbook/PopupIFrame
>
>
> I need a way to popup some content on my website inside of a floating
> modal dialog and did not want to be restricted in any way. This allowed
> me to pull in some cgi content, but of course can be used to popup any
> content including foreign content.
>
> Anyway, enjoy!!
>
>
>
> _______________________________________________
> pmwiki-users mailing list pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
More information about the pmwiki-users
mailing list