Using a plugin do not work

More
3 years 4 months ago #101383 by plhostis
Hello

I'm trying to use plugin DigitalBush Masked Input Plugin in my survey
( see section workarounds: Text input mask second method in LS web manual)
i have added the line <script type="text/javascript" src="{TEMPLATEURL}jquery.maskedinput.js" charset="utf-8"></script> in then startpage.pstpl
but when i test my survey i have an error $(...).mask is not a function... !!!
any idea ?

FireFox 17.0.4
LS 2.00+ build 130802

Please Log in to join the conversation.

More
3 years 4 months ago #101390 by tpartner
Did you make sure to add that to startpage.pstpl AFTER the {TEMPLATEJS} tag?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 4 months ago #101392 by plhostis
yes i verified all the tag in the startpage.pstpl i followed exactly what is written in
Implementation as follows:
1.Visit digitalbush.com/projects/masked-input-plugin/ , download the latest plugin script and save it as jquery.maskedinput.js in the template folder.
2.Link to the script by placing <script type="text/javascript" src="{TEMPLATEURL}jquery.maskedinput.js" charset="utf-8"></script> within the <head> tag of startpage.pstpl.
3.Turn off $filterxsshtml to allow insertion of JavaScript in the questions. (See documentation here)
4.Create the text input questions that the masks are to be applied to
5.In the source of the help section of the first question of the group that contains the masked inputs, add the following code. (See How to use script here)





<script type="text/javascript" charset="utf-8">
$(document).ready(function($) {
$("#answer55431X1X5").mask("999-99-9999",{ placeholder:"#" });
});
</script>

Please Log in to join the conversation.

More
3 years 4 months ago #101403 by tpartner
Can you activate a test survey?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 4 months ago #101410 by plhostis
yes i tried with a inactive and active survey , it is the same. :evil:

Please Log in to join the conversation.

More
3 years 4 months ago #101416 by holch
What Tpartner means, is there a way that you can provide a link to a test survey, where we can have a look at it.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 4 months ago #101439 by plhostis
unfortunately no we are not over Internet.
It seems to erase the line i have added...

<script type="text/javascript" src="{TEMPLATEURL}jquery.meiomask.js" charset="utf-8"></script> within the <head> tag of startpage.pstpl.

just after tag {TEMPLATEJS} , i don't know why. i tried with IE 9 and Firefox 17.0.4

Please Log in to join the conversation.

More
3 years 4 months ago #101465 by holch
Did you follow the recommendations of the manual on how to use Javascript in Limesurvey? is the XSS filter switched off?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
3 years 4 months ago #101487 by tpartner
Hmm, truly odd.

If you can't publish a survey, can you attach exports of the template and a sample survey?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 4 months ago #101729 by plhostis
Hello

ok i send you an survey export .lss
Attachments:

Please Log in to join the conversation.

More
3 years 4 months ago #101731 by plhostis
when i test my survey on LimeService (now LimeSurvey Professional).org it works well !!!

aarrgghh !!

Please Log in to join the conversation.

More
3 years 4 months ago #101742 by tpartner

ok i send you an survey export .lss

And the template?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 4 months ago #101755 by plhostis
ok i forgot it
here it is

it's name is CDC_citronade

Please Log in to join the conversation.

More
3 years 4 months ago #101759 by tpartner
I don't see any attachment.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 3 months ago #102057 by plhostis

File Attachment:

File Name: CDC_citronade.zip
File Size:153 KB


hello

here it is
Attachments:

Please Log in to join the conversation.