Home arrow Ondersteuning arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Creating popups linked from answers (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Re:Creating popups linked from answers
#15363
adewaal (User)
Fresh Lemon
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
[done] Creating popups linked from answers 4 Months, 3 Weeks ago Karma: 0  
I would like to create javascript popup windows that are linked to some of my answers, but I don't know in which file's header I must add the javascript so that it is accessible on any page.
Thanks
 
Logged Logged  
 
Last Edit: 2008/07/08 10:13 By Mazi.
  The administrator has disabled public write access.
#15375
gmaddockgreene (User)
Senior Lime
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
Re:Creating popups linked from answers 4 Months, 3 Weeks ago Karma: 0  
 
Logged Logged  
 
Gary

"To see a world in a grain of sand"
  The administrator has disabled public write access.
#15402
adewaal (User)
Fresh Lemon
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Re:Creating popups linked from answers 4 Months, 3 Weeks ago Karma: 0  
Thanks for this, I have added this in the head of my template's startpage.pstpl:

<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string'
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes';
return false;
}
//-->
</SCRIPT>


and in the body of my privacy.pstpl file I added:

<A HREF="www.mysurveyaddress/privacy.htm"
onClick="return popup(this, 'privacy'">Privacy</A>

and it works well, creating a pop-up.

However, when I added the same popup call on my question pages it does not give a pop-up, but simply opens a new window. Why does this happen? The SCRIPT code still appears to be in the head of my question template.
Thanks so much for any help.

PS: Subsequently I have tried the wysiwyg editor's own popup link function but it also does not work, it just opens a new window.
 
Logged Logged  
 
Last Edit: 2008/07/01 10:40 By Mazi.
  The administrator has disabled public write access.
#15680
Mazi (Moderator)
Moderator Lime
Posts: 3262
graph
User Offline Click here to see the profile of this user
Re:Creating popups linked from answers 4 Months, 2 Weeks ago Karma: 25  
Did you switch of the XSS filter?

$filterxsshtml = false;//$filterxsshtml
Enables filtering of suspicious html tags in
survey, group, questions and answer texts in the administration interface
Only set this to false if you absolutely trust the users
you created for the administration of LimeSurvey
and if you want to allow these users to be able to use Javascript
etc.
 
Logged Logged  
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support -> Contact.
  The administrator has disabled public write access.
#15694
adewaal (User)
Fresh Lemon
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Re:Creating popups linked from answers 4 Months, 2 Weeks ago Karma: 0  
Thanks it worked. Without making this "false" setting limesurvey's popup link function is disabled. Is this supposed to be the case?
 
Logged Logged  
  The administrator has disabled public write access.
#15703
Mazi (Moderator)
Moderator Lime
Posts: 3262
graph
User Offline Click here to see the profile of this user
Re:Creating popups linked from answers 4 Months, 2 Weeks ago Karma: 25  
adewaal wrote:
Thanks it worked. Without making this "false" setting limesurvey's popup link function is disabled. Is this supposed to be the case?You're welcome! If our hints have been helpful and you enjoy LimeSurvey please consider a donation to the team. We do all this in our free time.

Without making this "false" setting limesurvey's popup link function is disabled. Is this supposed to be the case?Yes, the filter was implemented for security reasons (e.g. Cross-Site-Scripting) and therefore filters javascript and HTML-Tags.
 
Logged Logged  
 
Best regards,
Mazi
______________________
Need help? I can: set up Limesurvey for you / create your survey / implement additional features / design your template / offer premium support -> Contact.
  The administrator has disabled public write access.
Go to top