How to Open C5 Modal Windows

Permalink 1 user found helpful
Hey everyone i figure this little snippet would be helpful,

<?php defined('C5_EXECUTE') or die(_("Access Denied."));
<script type="text/javascript">
<!--Change Sewin1 to what you want along with the title and href-->
function sewin1() {
      title: 'View Temp Files',
      href: "<?php echo REL_DIR_FILES_TOOLS_PACKAGES.'/package/viewtmp'?>",
      width: '85%',
      modal: false,
      height: '75%' 

to activate it all you need is

<form action="javascript:sewin1();"><input type="submit" name="view" value="View" /></form>

this is a way to do it in a form. you would change sewin1 to whatever you changed above.

to see it inaction see:


View Replies: View Best Answer
RadiantWeb replied on at Permalink Reply
do you have an example link of this so people can see what you are talking about?

Mnkras replied on at Permalink Reply
not yet ill
make one :)
Mnkras replied on at Permalink Reply
Here ya go:

unfortunately the header has to be loaded, i was to lazy to figure out which one i needed so i just loaded them all :P
invision replied on at Permalink Reply
Can you make these links available again (for the modal window example)?

Trying to view your example, and I'm getting blocked.
ScottC replied on at Permalink Best Answer Reply

I refer to this every few days.
Mnkras replied on at Permalink Reply
yea, andrew's was better, so i removed mine :P
fastcrash replied on at Permalink Reply
how can we use modal for message info, same as javascript onload.

example : after user add comment and submit, there is a modal confirm that success or not.

in old day i use javascript onload body tag, but in jquery i dont know how?

i try example in andrew link up there, but there is no modal popup?
can we make it onload?