[SOLVED] Open Terms in iframe?

14 years 3 weeks ago #128302 by larrypitts
[SOLVED] Open Terms in iframe? was created by larrypitts
Is there any way to get the Terms and Conditions link to open in an iframe (similar to how AEC does it) rather than open in a new window. Even a new window thT opens in a smaller scrollable size (as with the Invoice Preview that is available once the user is registered with CB) would be preferable.
Anyone?

Post edited by: krileon, at: 2010/03/30 18:20

Please Log in to join the conversation.

14 years 2 weeks ago #128484 by krileon
Replied by krileon on topic Re:Open Terms in iframe?
You'd need a new CB plugin which utilizes CB triggers to edit the registration form using jQuery (CB provides a full library of jQuery plugins at your disposal) to alter how the URL functions. Sorry, but such feature is not available out of the box. It's also possible to search and find within comprofiler.html.php the code used for the terms and conditions url and edit to your needs.

Post edited by: krileon, at: 2010/03/29 16:35


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 2 weeks ago #128566 by larrypitts
Replied by larrypitts on topic Re:Open Terms in iframe?
Thanks. Found a solution to open the terms in a smaller popup window, but be aware I am a newbie at code! However, this worked for me:

// Add the following script to the head section:

function myWindow(){
window.open('YOUR URL', 'myWin', 'toolbar=no, directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, width=740, height=500, left=100, top=200'); event.preventDefault();
}

// NB: Change the configuration (eg height, width, etc) to suit. The event.preventDefault() code is there to prevent the registration page also going to your link.

// Open the comprofiler.html.php and find the line that reads:

. sprintf(_UE_TOC_LINK,"<a href='".cbSef(htmlspecialchars($ueConfig))."' target='_BLANK'> ","</a>") . '</label>'

and change target='_BLANK' to onClick='myWindow()'
// Note the single (not double) quotes.

As I said, I am no expert, but that worked for me. It may help someone else.

Post edited by: larrypitts, at: 2010/03/30 01:04

Please Log in to join the conversation.

14 years 2 weeks ago #128570 by larrypitts
Replied by larrypitts on topic Re:Open Terms in iframe?
ooops! Spoke too soon.
Discovered that event.preventDefault() doesn't work in Firefox. If anyone knows how I fix the script it would be appreciated.

Please Log in to join the conversation.

14 years 2 weeks ago #128579 by larrypitts
Replied by larrypitts on topic Re:Open Terms in iframe?
Think I found the solution. In head section, changed to

function myWindow(){
window.open('YOUR URL', 'myWin', 'toolbar=no, directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, width=740, height=500, left=100, top=200');
}

and in comprofiler.html.php, changed line to:

. sprintf(_UE_TOC_LINK,"<a href='".cbSef(htmlspecialchars($ueConfig))."' onClick='myWindow(); return false;'> ","</a>") . '</label>'

I THINK that works! Now works for me in FF, anyway.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.209 seconds

Facebook Twitter LinkedIn