Page 1 of 1

Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 1:00 pm
by gp2727
Pablo, the $(document).ready tab automatically generates this script when using the Extension Builder whether code is there or not.

Could this be changed where the tab is completely removed and we call this feature ourselves in the <head> tab?

Very frustrating trying to use the current Extension Builder.... :cry:

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 1:07 pm
by Pablo
As far as I know this was fixed in the latest version.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:00 pm
by gp2727
After downloading the latest version of the Extension Builder, I still find the $(document.ready) script added to all built scripts.
You can try this for yourself, add no code and publish.
Add a script and publish, and it still appears.
I've enabled built in jQuery and disabled built in jQuery. Still shows...
The easiest way to deal with this is remove the document.ready tab, and allow extension builders to place code where needed...

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:05 pm
by Pablo
Are you also using the latest version of Web Builder?

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:20 pm
by gp2727
Using 9.2 build date December 17th,2013.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:25 pm
by Pablo
Are you sure the 'documentready' section of your extension is empty (no spaces, line break etc)?
It seems to works correct for me. $(document).ready will only be generated if there is code in this section.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:38 pm
by gp2727
No code or line breaks in this tab.

I'm using an internal jquery reference in my code, not the one built into the extension builder.

The reason I'm not using the $(document).ready section is because the code calls for the $(window).load function...

I'll keep trying to figure this out and let you know if I do.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:44 pm
by Pablo
Maybe you can open the project file with a text editor and see if there is any code inside the SCRIPT_DOCREADY section?

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:53 pm
by gp2727
<script type="text/javascript">
$(document).ready(function()
{

});
</script>

Before posting this code, I tried adding code and removing all, just to see if any code or line breaks were there. I have not added code in this area, but tried and removed by backspacing
to the beginning. Cursor is at the top upper left corner blinking.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 3:56 pm
by Pablo
I meant the extension builder project file (.xwb)
This is a xml file that you can open with the (plain) text editor.

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 4:05 pm
by gp2727
Sorry, I found no code there. Like I said, I'll try to figure this out. This is what is output at the bottom of notepad:

<SCRIPT_DOCREADY>
</SCRIPT_DOCREADY>
<HTML_HEAD>PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJjc3Mvc3R5bGUuY3NzIiB0eXBlPSJ0ZXh0L2Nz
cyIgY2hhcnNldD0idXRmLTgiIC8+DQo8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9ImNzcy9m
cmFjdGlvbnNsaWRlci5jc3MiPg0KPHNjcmlwdCBzcmM9ImpxdWVyeS0xLjkuMC5taW4uanMiIHR5
cGU9InRleHQvamF2YXNjcmlwdCIgY2hhcnNldD0idXRmLTgiPjwvc2NyaXB0Pg0KPHNjcmlwdCBz
cmM9ImpxdWVyeS5mcmFjdGlvbnNsaWRlci5qcyIgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBjaGFy
c2V0PSJ1dGYtOCI+PC9zY3JpcHQ+DQo8c2NyaXB0IHNyYz0ibWFpbi5qcyIgdHlwZT0idGV4dC9q
YXZhc2NyaXB0IiBjaGFyc2V0PSJ1dGYtOCI+PC9zY3JpcHQ+DQo=</HTML_HEAD>
<HTML_TAIL>
</HTML_TAIL>
<HTML_RENDER>
</HTML_RENDER>
<PREVIEW width="200" height="200" left="10" top="10" >
</PREVIEW>
<JQUERY>
</JQUERY>
</EXTENSION>

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 4:12 pm
by Pablo
Maybe there is something else on the page that adds the code?

Re: Please remove $(document).ready tab in EXB

Posted: Fri Jan 03, 2014 4:15 pm
by gp2727
I'll try to figure this out. Will keep you updated.... Thanks for your help.