Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » javascript dependency
javascript dependency [message #91966] Mon, 26 January 2009 02:39 Go to next message
matthew is currently offline matthewFriend
Messages: 14
Registered: July 2009
Junior Member
Right now, when I open any js file, I get lots errors like this:

http://i6.photobucket.com/albums/y222/moyoungerman/post/js_e rror1.jpg
http://i6.photobucket.com/albums/y222/moyoungerman/post/js_e rror2.jpg

The javascript are part of some Drupal PHP page, they are linked in
like this when the page is rendered:

<script type="text/javascript" src="/misc/jquery.js?9"></script>
<script type="text/javascript" src="/misc/drupal.js?9"></script>
<script type="text/javascript"
src="/sites/gsprint_devel/modules/thickbox/thickbox_auto.js?9 "></script>
<script type="text/javascript"
src="/sites/gsprint_devel/modules/thickbox/thickbox.js?9"></script >

So how can I tell PDT drupal.js depends on jquery.js so it won't
complain $ is undefined?

On a line like this:

var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes':
{}, 'locale': {} };


I get error: "The operator || is undefined for the argument type(s)
__Drupal0, any"

This should be okay. Why am I getting this error?
Re: javascript dependency [message #92056 is a reply to message #91966] Mon, 26 January 2009 18:10 Go to previous messageGo to next message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
Matthew,

Unfortunately this isn't a problem with PDT per say. It is a problem
with the way the project is setup in Eclipse and there is additional
steps needed to make sure the Javascript interpreter knows that you are
using jQuery. I am currently in the same process of getting Drupal
projects JS files working with Eclipse. If you do a web search for
"eclipse jquery" you will see some documentation on the topic. I haven't
found a great step-by-step guide to do this setup yet. In the general
sense you have to include the the javascript files within the misc
directory as an included files to the project even if you aren't
interacting with it directly. So jquery.js and drupal.js would be two
files as included scripts available to the other javascript files.

If / when I find a good guide to getting jQuery working in Eclipse I
will post it here.

--
Shawn Clark

Matthew Young wrote:
> Right now, when I open any js file, I get lots errors like this:
>
> http://i6.photobucket.com/albums/y222/moyoungerman/post/js_e rror1.jpg
> http://i6.photobucket.com/albums/y222/moyoungerman/post/js_e rror2.jpg
>
> The javascript are part of some Drupal PHP page, they are linked in
> like this when the page is rendered:
>
> <script type="text/javascript" src="/misc/jquery.js?9"></script>
> <script type="text/javascript" src="/misc/drupal.js?9"></script>
> <script type="text/javascript"
> src="/sites/gsprint_devel/modules/thickbox/thickbox_auto.js?9 "></script>
> <script type="text/javascript"
> src="/sites/gsprint_devel/modules/thickbox/thickbox.js?9"></script >
>
> So how can I tell PDT drupal.js depends on jquery.js so it won't
> complain $ is undefined?
>
> On a line like this:
>
> var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes':
> {}, 'locale': {} };
>
>
> I get error: "The operator || is undefined for the argument type(s)
> __Drupal0, any"
>
> This should be okay. Why am I getting this error?
Re: javascript dependency [message #92071 is a reply to message #92056] Mon, 26 January 2009 22:24 Go to previous messageGo to next message
Craig Stevens is currently offline Craig StevensFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Shawn,

I'm particularly keen to get JQuery going as well, I'm using 64Bit PDT2.0
with Eclipse Ganymede.

Good luck finding that guide:)

Regards,

Craig
Re: javascript dependency [message #92085 is a reply to message #92056] Mon, 26 January 2009 23:20 Go to previous messageGo to next message
Craig Stevens is currently offline Craig StevensFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Shawn,

I'm looking for this as well. If I find it I'll also post here. Desperate
to get JQuery working within my Eclipse PDT2.0 install.
Re: javascript dependency [message #92099 is a reply to message #92056] Tue, 27 January 2009 01:58 Go to previous messageGo to next message
matthew is currently offline matthewFriend
Messages: 14
Registered: July 2009
Junior Member
Ok, you know exactly what I'm talking about. So I you even find the
solution, please let me know.

At the meantime, does anyone else know what to do about this?


>Unfortunately this isn't a problem with PDT per say. It is a problem
>with the way the project is setup in Eclipse and there is additional
>steps needed to make sure the Javascript interpreter knows that you are
>using jQuery. I am currently in the same process of getting Drupal
>projects JS files working with Eclipse. If you do a web search for
>"eclipse jquery" you will see some documentation on the topic. I haven't
>found a great step-by-step guide to do this setup yet. In the general
>sense you have to include the the javascript files within the misc
>directory as an included files to the project even if you aren't
>interacting with it directly. So jquery.js and drupal.js would be two
>files as included scripts available to the other javascript files.
>
>If / when I find a good guide to getting jQuery working in Eclipse I
>will post it here.
Re: javascript dependency [message #92953 is a reply to message #92099] Sat, 07 February 2009 05:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dave.salesanswer.com

Matthew,

I turned off JavaScript Syntax Validation in
Window/Preferences/Validation. This does not really fix the issue, but
at least if you have a real error it would not be mixed in with hundreds
of erroneous errors on the Problems View.

I am trying to set up a Drupal development environment using PDT. I am
hoping that there is some way to configure the drupal.js and jquery.js
libraries on the one of the Eclipse paths - I have tried but nothing
seems to work.

Do you know of any solutions for this issue?

Thanks,

Dave



Matthew Young wrote:
> Ok, you know exactly what I'm talking about. So I you even find the
> solution, please let me know.
>
> At the meantime, does anyone else know what to do about this?
>
>
>> Unfortunately this isn't a problem with PDT per say. It is a problem
>> with the way the project is setup in Eclipse and there is additional
>> steps needed to make sure the Javascript interpreter knows that you are
>> using jQuery. I am currently in the same process of getting Drupal
>> projects JS files working with Eclipse. If you do a web search for
>> "eclipse jquery" you will see some documentation on the topic. I haven't
>> found a great step-by-step guide to do this setup yet. In the general
>> sense you have to include the the javascript files within the misc
>> directory as an included files to the project even if you aren't
>> interacting with it directly. So jquery.js and drupal.js would be two
>> files as included scripts available to the other javascript files.
>>
>> If / when I find a good guide to getting jQuery working in Eclipse I
>> will post it here.
Re: javascript dependency [message #92968 is a reply to message #92099] Sat, 07 February 2009 05:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dave.salesanswer.com

Matthew,

I turned off JavaScript Syntax Validation in
Window/Preferences/Validation. This does not really fix the issue, but
at least if you have a real error it would not be mixed in with hundreds
of erroneous errors on the Problems View.

I am trying to set up a Drupal development environment using PDT. I am
hoping that there is some way to configure the drupal.js and jquery.js
libraries on the one of the Eclipse paths - I have tried but nothing
seems to work.

Do you know of any solutions for this issue?

Thanks,



Dave

Matthew Young wrote:
> Ok, you know exactly what I'm talking about. So I you even find the
> solution, please let me know.
>
> At the meantime, does anyone else know what to do about this?
>
>
>> Unfortunately this isn't a problem with PDT per say. It is a problem
>> with the way the project is setup in Eclipse and there is additional
>> steps needed to make sure the Javascript interpreter knows that you are
>> using jQuery. I am currently in the same process of getting Drupal
>> projects JS files working with Eclipse. If you do a web search for
>> "eclipse jquery" you will see some documentation on the topic. I haven't
>> found a great step-by-step guide to do this setup yet. In the general
>> sense you have to include the the javascript files within the misc
>> directory as an included files to the project even if you aren't
>> interacting with it directly. So jquery.js and drupal.js would be two
>> files as included scripts available to the other javascript files.
>>
>> If / when I find a good guide to getting jQuery working in Eclipse I
>> will post it here.
Re: javascript dependency [message #93114 is a reply to message #92968] Sun, 08 February 2009 21:31 Go to previous message
matthew is currently offline matthewFriend
Messages: 14
Registered: July 2009
Junior Member
On Sat, 07 Feb 2009 00:22:05 -0500, Dave Connerth
<dave@salesanswer.com> wrote:

>Do you know of any solutions for this issue?

Nope. I gave up on this one. I just use Firebug for debugging
javascript.
Previous Topic:Eclipse 3.5 and PDT 2.1.0
Next Topic:[Announce] PDT 2.1.0M5 is available
Goto Forum:
  


Current Time: Thu Mar 28 10:55:04 GMT 2024

Powered by FUDForum. Page generated in 0.02725 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top