A quick question

In this section you can share self-made extensions with other users of WYSIWYG Web Builder.
There is a dedicated section for commercial extensions.
Post Reply
supersonictt
 
 
Posts: 398
Joined: Sun May 15, 2011 10:27 am

A quick question

Post by supersonictt »

Am building another extension, this time I need to add a script before the end of the body tag, can this be done in EB4?
Thanks.
User avatar
BaconFries
 
 
Posts: 5799
Joined: Thu Aug 16, 2007 7:32 pm

Re: A quick question

Post by BaconFries »

It can be done but it requires that you manipulate the body html by using DOM/javascript. I think our javascript wizard [RZ] has a fix for this as another forum member had a similar issue (Adendum) but I stand to be corrected if wrong on this. [Rz] may read this and be able to assit you with this.
supersonictt
 
 
Posts: 398
Joined: Sun May 15, 2011 10:27 am

Re: A quick question

Post by supersonictt »

Thank you so much BaconFries.

Actually I can notify users of the extension to include the code in the end of the body tag, but I always try to make as easy as possible for users.
User avatar
[RZ]
 
 
Posts: 1912
Joined: Tue Nov 04, 2008 12:08 pm

Re: A quick question

Post by [RZ] »

oh yes... i'm [rz]... responding from my own javascript oracle... i'm hearing my little children invoking the esoteric power from the dom mystery... i won't reveal my deepest secret... never... but i have a half of mercy on you... because you are trying to learn the ancestral secret... you must still wait a couple of years... anyhow, my simplest solution is... enclose your <script></script> into a <div></div> with the highest possible z-index value... this way you will have this code by the </body> tag... this isn't the most orthodox solution... the dom gates are closed now...


well, in honor of the truth, to manipulate the dom you must know "intimately" what the whole project does, and how other jquery/javascript procedures work and how can them be affected, otherwise you will be running into a series of severe/unpredictable issues. this is one of the reasons i always write my own code for the extensions, remember i told you this?
hope this little trick helps! (in most of the cases it will work fine and an extensive experience is not required.)

@bacon, thank you for your concept about me!
@supersonictt, as per your reply to bacon it seems you actually prefer to notify users... so you are free to ignore my post ;)
supersonictt
 
 
Posts: 398
Joined: Sun May 15, 2011 10:27 am

Re: A quick question

Post by supersonictt »

[RZ] wrote:@supersonictt, as per your reply to bacon it seems you actually prefer to notify users... so you are free to ignore my post ;)
Hehe, no [rz] am not gonna ignore from you! You are like a teacher to me :) and I learned from you a lot :)
Thank you so much for the suggestion, I will give it a try :)
User avatar
[RZ]
 
 
Posts: 1912
Joined: Tue Nov 04, 2008 12:08 pm

Re: A quick question

Post by [RZ] »

saywhat!? you said i'm a true teacher and now you say just "like" a teacher!?
no no no...
supersonictt
 
 
Posts: 398
Joined: Sun May 15, 2011 10:27 am

Re: A quick question

Post by supersonictt »

Sorry master :oops:

You can read here what's written :)
viewtopic.php?f=42&t=50159&p=253038#p253038
User avatar
[RZ]
 
 
Posts: 1912
Joined: Tue Nov 04, 2008 12:08 pm

Re: A quick question

Post by [RZ] »

i haven't read this. ok, no problem now!
(just kidding)
supersonictt
 
 
Posts: 398
Joined: Sun May 15, 2011 10:27 am

Re: A quick question

Post by supersonictt »

Hehe :D
Post Reply