terms of service popup

samoht 26 Feb, 2009
Hey guy's here I am with another question 😀

How can I put a popup link on my form for users to read the terms of service without leaving the form?

GreyHead 26 Feb, 2009
Hi samoht,

Just did this
$doc =& JFactory::getDocument();
$script = "window.addEvent('domready', function() {
	$$('a.modal').each(function(el) {
		el.addEvent('click', function(e) {
			new Event(e).stop();
. . .
<div>Please read the <a rel="{handler: 'iframe', size: {x: 600, y: 400}}"
  href=" . path to file . . ./tandc.php"
  class="modal">Terms and Conditions</a> carefully, they tell you what you need
  to do before and during your training.</div>

This uses the Squeezebox that comes with Joomla and is set up to load an external file. See the SqueezeBox (or ThickBox) docs for moe info.

samoht 27 Feb, 2009
very cool!

Bob can you help me with this path a little more? . path to file . . ./tandc.php

when you say /.. path to file .../
does this mean the whole relative path to the article?
samoht 27 Feb, 2009
To be more specific,

I have my whole site showing up in my box instead of just the article.
samoht 27 Feb, 2009
Hey Bob,

Thanks again for the timely and awesome help!

I figured out away by just linking to an external file instead of a article inside the site. -

Thanks again!!

Also, just a note if any newbies read this thread - when you use the SqueezeBox - code found in the Doc's - make sure the code is Kosher! some of the tags may not be formatted exactly correct ( e.g. ? > instead of ?>).
GreyHead 27 Feb, 2009
Hi samoht,

Sorry, I missed a bit out. Yes that was a link to an external file. You can use a site page and get the content without the template framework by adding &tmpl=component to the url.

samoht 27 Feb, 2009

however, I tried this and noticed that it will not include any external CSS
So the link to an external page worked better for me.

Still, this is a very elegant solution - Thanks again for the help!
This topic is locked and no more replies can be posted.