[Xerte] Re: Embedding survey monkey
Pat Lockley (Pgogy)
info at pgogywebstuff.com
Fri Jul 3 09:36:20 BST 2015
Ages ago I found embedding something from a script did the same thing
http://widget.surveymonkey.com/collect/website/js/EZfigXKNNLYTe3aIXp3Y0evIBYgz_2FshKsjj5OGywUjs8bbGIhnCZtatXAEg_2FxnCy.js
The funky stuff happens in here - but it seems to build a new style node
on the fly
On 2015-07-03 04:26, Julian Tenney wrote:
> I wondered about that, but I'd like to understand why it's inserting
> at 0,0 because it might be something xerte is doing and possible we
> could change something so it does work properly using their embed
> code: here is my solution, which adds an extra div, and then adds an
> extra parameter z to the function so I can pass in the id of the div
> and then use that to set the value of the var c:
>
> <DIV ID="SURVEY"></DIV>
>
> <script>(function(t,e,s,n,Z){var
> o,c,a;t.SMCX=t.SMCX||[],e.getElementById(n)||(o=e.getElementsByTagName(s),C=DOCUMENT.GETELEMENTBYID(Z),a=e.createElement(s),a.type="text/javascript",a.async=!0,a.id=n,a.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/EZfigXKNNLYTe3aIXp3Y0evIBYgz_2FshKsjj5OGywUjs8bbGIhnCZtatXAEg_2FxnCy.js"].join(""),c.parentNode.insertBefore(a,c))})(window,document,"script","smcx-sdk","SURVEY");</script><a
> style="font: 12px Helvetica, sans-serif; color: #999; text-decoration:
> none;"
> href=https://www.surveymonkey.com/mp/customer-satisfaction-surveys/>
> Create your own user feedback survey </a>
>
> The original code looks for the last script icon. Presumably because
> it expects to do it as the page is loading, rather than being
> instantiated in an already loaded framework:
>
> <script>(function(t,e,s,n){var
> o,c,a;t.SMCX=t.SMCX||[],e.getElementById(n)||(O=E.GETELEMENTSBYTAGNAME(S),C=O[O.LENGTH-1],a=e.createElement(s),a.type="text/javascript",a.async=!0,a.id=n,a.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/EZfigXKNNLYTe3aIXp3Y0evIBYgz_2FshKsjj5OGywUjs8bbGIhnCZtatXAEg_2FxnCy.js"].join(""),c.parentNode.insertBefore(a,c))})(window,document,"script","smcx-sdk");</script><a
> style="font: 12px Helvetica, sans-serif; color: #999; text-decoration:
> none;"
> href=https://www.surveymonkey.com/mp/customer-satisfaction-surveys/>
> Create your own user feedback survey </a>
>
> -----Original Message-----
> From: Pat Lockley (Pgogy) [mailto:info at pgogywebstuff.com]
> Sent: 02 July 2015 18:58
> To: Xerte discussion list
> Cc: Julian Tenney
> Subject: Re: [Xerte] Re: Embedding survey monkey
>
> If you can share a version I can hack at it in chrome Make a page
> type?
>
> On 2015-07-02 13:49, Julian Tenney wrote:
>
>> I tried that but it didn't work, but I unscrambled the code and did
>
>> get it to work by forcing the insertBefore to use a new div. I hate
> it
>
>> when you get js all in one line like that...
>
>>
>
>> cheers Pat,
>
>> ________________________________________
>
>> From: xerte-bounces at lists.nottingham.ac.uk
>
>> [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat Lockley
>
>> (Pgogy) [info at pgogywebstuff.com]
>
>> Sent: 02 July 2015 18:26
>
>> To: Xerte discussion list
>
>> Subject: [Xerte] Re: Embedding survey monkey
>
>>
>
>> Try wrapping it in a div with a position:absolute style and then set
>
>
>> the top to something?
>
>>
>
>> On 2015-07-02 11:08, Julian Tenney wrote:
>
>>> Trying to help someone embed a survey money and finding the layout
>
>>> breaks: has anyone successfully manipulated the embed code to get
> it
>
>>> to appear in the right place?
>
>>>
>
>>> This message and any attachment are intended solely for the
> addressee
>
>>> and may contain confidential information. If you have received this
>
>
>>> message in error, please send it back to me, and immediately delete
>
>
>>> it.
>
>>>
>
>>> Please do not use, copy or disclose the information contained in
> this
>
>>> message or in any attachment. Any views or opinions expressed by
> the
>
>>> author of this email do not necessarily reflect the views of the
>
>>> University of Nottingham.
>
>>>
>
>>> This message has been checked for viruses but the contents of an
>
>>> attachment may still contain software viruses which could damage
> your
>
>>> computer system, you are advised to perform your own checks. Email
>
>>> communications with the University of Nottingham may be monitored
> as
>
>>> permitted by UK legislation.
>
>>>
>
>>>
>
>>> _______________________________________________
>
>>> Xerte mailing list
>
>>> Xerte at lists.nottingham.ac.uk
>
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte [1]
>
>>
>
>> --
>
>> Pgogy Webstuff
>
>> pgogywebstuff.com
>
>>
>
>> _______________________________________________
>
>> Xerte mailing list
>
>> Xerte at lists.nottingham.ac.uk
>
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte [1]
>
>>
>
>> _______________________________________________
>
>> Xerte mailing list
>
>> Xerte at lists.nottingham.ac.uk
>
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte [1]
>
>>
>
>>
>
>>
>
>>
>
>> This message and any attachment are intended solely for the
> addressee
>
>> and may contain confidential information. If you have received this
>
>> message in error, please send it back to me, and immediately delete
> it.
>
>>
>
>> Please do not use, copy or disclose the information contained in
> this
>
>> message or in any attachment. Any views or opinions expressed by the
>
>
>> author of this email do not necessarily reflect the views of the
>
>> University of Nottingham.
>
>>
>
>> This message has been checked for viruses but the contents of an
>
>> attachment may still contain software viruses which could damage
> your
>
>> computer system, you are advised to perform your own checks. Email
>
>> communications with the University of Nottingham may be monitored as
>
>
>> permitted by UK legislation.
>
> --
>
> Pgogy Webstuff
>
> pgogywebstuff.com
>
> This message and any attachment are intended solely for the addressee
> and may contain confidential information. If you have received this
> message in error, please send it back to me, and immediately delete
> it.
>
> Please do not use, copy or disclose the information contained in this
> message or in any attachment. Any views or opinions expressed by the
> author of this email do not necessarily reflect the views of the
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an
> attachment may still contain software viruses which could damage your
> computer system, you are advised to perform your own checks. Email
> communications with the University of Nottingham may be monitored as
> permitted by UK legislation.
>
>
>
> Links:
> ------
> [1] http://lists.nottingham.ac.uk/mailman/listinfo/xerte
--
Pgogy Webstuff
pgogywebstuff.com
More information about the Xerte
mailing list