-
1. Re: Noob question: Problem loading jQuery
SlowMotion Oct 28, 2014 9:49 AM (in response to Rambutan)First step would be to pull up your html in the Chrome browser. Right click and Inspect Element. Click on your Network tab and confirm that the .js file is actually loading.
-
2. Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 10:04 AM (in response to SlowMotion)Thanks for the fast reply!
So what am I right clicking on? If I click the linked script path in the debug source view of index.html it takes me the jQuery js file. Also if I look at the resources view it shows:
(index.html)
|-Scripts
|-jquery-1.11.1.min.js
index.html
-
3. Re: Noob question: Problem loading jQuery
SlowMotion Oct 28, 2014 10:07 AM (in response to Rambutan)Right click on the page itself. If you haven't use the Chrome Network Panel before, google it and learn a bit about it. It's a neat tool and can quickly show you what is or isn't being loaded onto the page. What you want to see is a STATUS code of 200 - that means the script is loading.
-
4. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 10:20 AM (in response to SlowMotion)Riiiiight with you now, load it directly in Chrome, not through the debug Dev tools.
Ok did that, the example works (click on the button and <p> tags are hidden) and I looked at the network view, it says jQuery js is loaded.
FYI this is my manifest.xml
<?xml version="1.0" encoding="UTF-8"?> <ExtensionManifest Version="5.0" ExtensionBundleId="com.example.jqui" ExtensionBundleVersion="1.0.0" ExtensionBundleName="Extension-Name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ExtensionList> <Extension Id="com.example.jqui" Version="1.0" /> </ExtensionList> <ExecutionEnvironment> <HostList> <Host Name="PHXS" Version="[15.0,15.9]" /> <Host Name="PHSP" Version="[15.0,15.9]" /> </HostList> <LocaleList> <Locale Code="All" /> </LocaleList> <RequiredRuntimeList> <RequiredRuntime Name="CSXS" Version="5.0" /> </RequiredRuntimeList> </ExecutionEnvironment> <DispatchInfoList> <Extension Id="com.example.jqui"> <DispatchInfo > <Resources> <MainPath>./index.html</MainPath> <ScriptPath>./jsx/hostscript.jsx</ScriptPath> </Resources> <Lifecycle> <AutoVisible>true</AutoVisible> </Lifecycle> <UI> <Type>Panel</Type> <Menu>JQ UI Example</Menu> <Geometry> <Size> <Height>300</Height> <Width>300</Width> </Size> </Geometry> <Icons> <Icon Type="Normal">./icons/iconNormal.png</Icon> <Icon Type="RollOver">./icons/iconRollover.png</Icon> <Icon Type="Disabled">./icons/iconDisabled.png</Icon> <Icon Type="DarkNormal">./icons/iconDarkNormal.png</Icon> <Icon Type="DarkRollOver">./icons/iconDarkRollover.png</Icon> </Icons> </UI> </DispatchInfo> </Extension> </DispatchInfoList> </ExtensionManifest>
-
5. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 10:31 AM (in response to Rambutan)Just in case my last response was unlcear: it works in Chrome but not in Photoshop panel
-
6. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 10:39 AM (in response to Rambutan)BINGO!!
So I had an example project from one of the CEP examples which worked fine so I've been looking at the differences between the projects, one of them was the jQuery version...
I loaded up jquery-1.9.1.js instead of jquery-1.11.1.min.js in my project and it worked fine!
I don't know beyond that what the problem is though.
G
-
7. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 10:59 AM (in response to Rambutan)I'm testing different versions:
jquery-2.1.1.min.js - Fail
jquery-1.11.1.js - Fail
jquery-1.11.1.min.js - Fail
jquery-1.11.0.min.js - Fail
jquery-1.10.2.min.js - Fail
jquery-1.9.1.js - Works
jquery-1.9.1.min.js - Works
Can anyone else replicate this or is it just something funky about my setup? Remeber I'm on Photoshop CC2014 with latest updates (fresh install, had to manually create the user CEP folder) and Win 8.1
TNKS!
G
-
8. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 28, 2014 11:02 AM (in response to Rambutan) -
9. Re: Re: Noob question: Problem loading jQuery
SlowMotion Oct 28, 2014 11:03 AM (in response to Rambutan)Interesting problem. I never even considered the version number, I'm using 1.9 for all my projects.
Obviously something changes between v9 and v11. Not sure what it is, but thanks for following up after you found the solution.
-
10. Re: Noob question: Problem loading jQuery
PeteBaumgartner Oct 30, 2014 7:15 PM (in response to Rambutan)I am experiencing the same issue - when I run with jQuery 1.9.1 - which is used in the CEP Examples - jQuery works okay
I have not been able to get CEP to work with newer versions of jQuery
I tried to load a frame with the html frame source I clipped from the demo jQuery UI site & it failed when loading into a CEP panel.
pjb
-
11. Re: Noob question: Problem loading jQuery
weiguo@adobe.com Oct 30, 2014 11:25 PM (in response to Rambutan)This is probably because CEP (the underlying technology that Photoshop uses to run html extensions) uses an old version of CEF, which uses old version of Chromium. After we upgrade to new version of CEF in 2015, you should be able to use new jQuery in Photoshop html extensions. Thanks
-
12. Re: Re: Noob question: Problem loading jQuery
Rambutan Oct 30, 2014 11:51 PM (in response to PeteBaumgartner)@PeteBaumgartner The forum link I posted above has detailed info of what's happening on a javascript level and some work arounds. Here's the link again:
Problem with jQuery and CEP 5 - "$" getting overrided
It's a bit confusing because some info seems to be in this forum and some over on the Creative Suite Extension Builder forum.
@weiguo@adobe.com can we please get a note about this issue added to the github pages? I'm fine working with jQuery 1.9.x but would have been nice to know there's officially a comparability issue with later versions.
Thanks!
G
-
13. Re: Noob question: Problem loading jQuery
SlowMotion Oct 31, 2014 7:21 AM (in response to weiguo@adobe.com)Will the update next year be going from CEF 1 to CEF 3? If that's so, are there any migrations concerns that will need to be considered for current extensions using JQuery 1.9?
-
14. Re: Noob question: Problem loading jQuery
PeteBaumgartner Oct 31, 2014 8:59 AM (in response to Rambutan)Thanks.
-
15. Re: Noob question: Problem loading jQuery
PeteBaumgartner Oct 31, 2014 9:14 AM (in response to PeteBaumgartner)Now that I have seen the other write-up - in the other forum …. I tried loading my later version of jQuery in an iFrame with the 'no node.js' option
<iframe id=”xxx” class=”xxxxx” nodejs-disabled=”true”>
and it worked!
The jQuery script & link reference elements in the <head> of that .html read like this:
<title>jQuery UI Tooltip - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
So that is good - but my next question would be: What CEP functionality am I disabling by doing this?
Thanks.
-
16. Re: Noob question: Problem loading jQuery
Rambutan Oct 31, 2014 9:22 AM (in response to SlowMotion)CEP 4.2+ uses CEF3:
Search for CEF3.
Using the debug console this is the version of Chrome that Photoshop CC2014 uses:
window.navigator.appVersion
"5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36"
My current version of the Chrome browser is 38.0.2125.111 so CC's is some versions behind. I can't for the life of me find a JS command that returns the current exact version of CEF.
But from here:
http://cefbuilds.com/#branch_trunk
CEF 3.1453.1490 uses Chromium 27.0.1453.116 so Photshop must be a version or 2 behind that. Current CEF (x64 windows) is CEF 3.2171.1901 from that same link.
@ weiguo@adobe.com I assume you're talking about versions of CEF3?
G


