Windows Script Host Error

Mar 4, 2010 at 3:56 PM

Hello,

I'm attempting to set up some "cascading dropdowns" using your guidelines.  I'm having to use a CEWP due to management restrictions.  I've got the 2 latest versions of jQuery loaded and referenced but it never runs.  I put an alert in the script (as shown in your examples) and it doesn't show up - indicating that its not firing.  When I go to the files in my library and try to open them (just to see if I got the paths correct) I get an error described below.  Can you tell me what, if anything, I can do about these errors? 

I'm getting this error: (from the SPServices 0.5.1.min)

Line: 20

char: 1

Error: 'JQuery' is undefined

Code: 800A1391

Source: Microsoft JScript runtime error

 

I get this error: (from the jquery 1.4.2.min)

Line 16

Char: 1

Errow: 'window' is undefined

Code 800A1391

Source: Microsoft JScript runtime error

 

Your help and expertise is greatly appreciated.

 

David

Coordinator
Mar 4, 2010 at 4:42 PM

David:

You should only have one version of the jQuery library and one version of the SPServices library loaded at ony one time.  If you look at the top of the first Documentation page, you'll see this example:

<script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery-1.4.min.js"></script>
<script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery.SPServices-0.5.0.min.js"></script>

Both files need to be in a location which allows all of your users to read them.

M.

Mar 4, 2010 at 6:25 PM

Understood.

Here’s what I have:

<script language="javascript" type="text/javascript">

                $(document).ready(function() {

Dave

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Thursday, March 04, 2010 11:43 AM
To: Milliken, David - Washington, DC
Subject: Re: Windows Script Host Error [SPServices:203807]

From: sympmarc

David:

You should only have one version of the jQuery library and one version of the SPServices library loaded at ony one time. If you look at the top of the first Documentation page, you'll see this example:

<script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery-1.4.min.js"></script>
<script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery.SPServices-0.5.0.min.js"></script>
 
 

Both files need to be in a location which allows all of your users to read them.

M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Mar 4, 2010 at 7:07 PM
Edited Mar 4, 2010 at 7:08 PM

Dave:

I'm not seeing enough there to know what's going on.  Take a look at the bottom of this page:
http://spservices.codeplex.com/documentation
Your script in the CEWP should look something like the code below the PlaceHolderMain line.

M.

Mar 4, 2010 at 8:07 PM

Hi Marc,

Thanks for the reply –

Here’s what I’ve got in the CEWP:

<script language="javascript" type="text/javascript">

                $(document).ready(function() {

               alert("hi david");

                                $().SPServices.SPCascadeDropdowns({

                                                relationshipList: "Regions",

                                                relationshipListParentColumn: "Country",

                                                relationshipListChildColumn: "Title",

                                                parentColumn: "Country",

                                                childColumn: "Region",

                                                debug: true

                                });

                                $().SPServices.SPCascadeDropdowns({

                                                relationshipList: "States",

                                                relationshipListParentColumn: "Region",

                                                relationshipListChildColumn: "State",

                                                relationshipListSortColumn: "ID",

                                                parentColumn: "Region",

                                                childColumn: "State"

                                });

                });

</script>

Thanks

Dave

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Thursday, March 04, 2010 2:08 PM
To: Milliken, David - Washington, DC
Subject: Re: Windows Script Host Error [SPServices:203807]

From: sympmarc

Dave:

I'm not seeing enough there the know what's going on. Take a look at the bottom of this page:
http://spservices.codeplex.com/documentation
Your script in the CEWP should look something like the code below the PlaceHolderMain line.

M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Mar 4, 2010 at 8:26 PM
So where are the references to the two libraries?

M.
Mar 4, 2010 at 8:44 PM

Here’s what I sent you.  I guess the top part didn’t go with the rest.  Can you see the references now?

Lets try it again.

Thanks  Dave

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Thursday, March 04, 2010 3:27 PM
To: Milliken, David - Washington, DC
Subject: Re: Windows Script Host Error [SPServices:203807]

From: sympmarc

So where are the references to the two libraries?

M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Mar 4, 2010 at 8:52 PM

It may be a problem with you emailing in your replies.  That last image didn't make it through, either.

M.

Mar 4, 2010 at 9:03 PM

Hmmm.  Okay – Let me send you a Word Document and see what happens.

Thank You Marc,

Dave

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Thursday, March 04, 2010 3:53 PM
To: Milliken, David - Washington, DC
Subject: Re: Windows Script Host Error [SPServices:203807]

From: sympmarc

It may be a problem with you emailing in your replies. That last image didn't make it through, either.

M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Oct 28, 2010 at 11:29 PM

Hi Marc,

Were you ever able to address Dave's problem?  I am having essentially the same issue (i.e. "jQuery is undefined" in SPServices-0.5.7.js).  Besides the standard scripts that SharePoint includes,  I've only added references to jQuery and SPServices (internally, from the same directory in my SharePoint site).  I can post my code, but it's not even getting past my SPServices call.  jQuery is apparently loaded, as I'm able to do some other jQuery stuff in the same script.

Anyway, just wondering how (or if) this discussion was resolved -- perhaps I'm missing the same thing.

Thanks very much.

Justin

Coordinator
Oct 29, 2010 at 2:22 AM
This is an old thread and I don't recallbif or how we resolved it, but I'm sure we did. It sounds like you probably have a .js file reference problem. Even if jQuery is loading correctly, SPServices may not be. Be sure also to load jQuery before SPServices. If you want to post your references, maybe I can spot something. M.
Oct 29, 2010 at 11:50 AM

Hello Marc,

Great to hear from you! Hope all is well.

Yes – we (I should say You) resolved the problem. I’m trying to recall what the exact problem was – let me review my stuff and I’ll see if can find something on how it was resolved. I think it had something to do with a set of “” in my .js reference line.

Again, great to hear from you. On another note, I enjoyed meeting you at SharePoint Saturday in Wash DC earlier this year and hope you’ll be part of the event in 2011.

Best Regards

Dave Milliken

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Thursday, October 28, 2010 9:23 PM
To: Milliken, David - Washington, DC
Subject: Re: Windows Script Host Error [SPServices:203807]

From: sympmarc

This is an old thread and I don't recallbif or how we resolved it, but I'm sure we did. It sounds like you probably have a .js file reference problem. Even if jQuery is loading correctly, SPServices may not be. Be sure also to load jQuery before SPServices. If you want to post your references, maybe I can spot something. M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Oct 29, 2010 at 9:32 PM

Yep, turns out SPServices was loading before jQuery.  Thanks for your reply!