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.
A quick question
- BaconFries
-
- Posts: 5799
- Joined: Thu Aug 16, 2007 7:32 pm
Re: A quick question
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.
-
-
- Posts: 398
- Joined: Sun May 15, 2011 10:27 am
Re: A quick question
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.
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.
Re: A quick question
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![Wink ;)](./images/smilies/icon_wink.gif)
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
![Wink ;)](./images/smilies/icon_wink.gif)
-
-
- Posts: 398
- Joined: Sun May 15, 2011 10:27 am
Re: A quick question
Hehe, no [rz] am not gonna ignore from you! You are like a teacher to me[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
![Smile :)](./images/smilies/icon_smile.gif)
![Smile :)](./images/smilies/icon_smile.gif)
Thank you so much for the suggestion, I will give it a try
![Smile :)](./images/smilies/icon_smile.gif)
Re: A quick question
saywhat!? you said i'm a true teacher and now you say just "like" a teacher!?
no no no...
no no no...
-
-
- Posts: 398
- Joined: Sun May 15, 2011 10:27 am
Re: A quick question
i haven't read this. ok, no problem now!
(just kidding)
(just kidding)