Skip to content Skip to sidebar Skip to footer

How Do You Add Jquery In A Html Page As A Web Resource In Dynamics Crm 2011

having a lot of trouble with this one. I am trying to run a simple jquery script inside of an html page to just pop up an alert box. I have uploaded the jquery library and the json

Solution 1:

I see two options available to you.

Option 1: Relative Paths Web Resources can point to each other via relative paths. So, it really depends on the "Name" of your html web resource and your jquery web resources.

The "Name" of a web resource cannot be changed after it has been created. So, you want to pay close attention to this. (You can always delete it and create it again with a new name, though.) This Name value can have a path in it.

For example, your jQuery library web resource might have a Name of "/Scripts/jquery.js". If you html page (that your iframe points to) has a name of "/Pages/mypage.html", then that html page must reference the jQuery library like so:

<scriptsrc="../Scripts/jquery.js"></script>

It has to go up a level to get out of the Pages folder, then down into the Scripts folder, and hits the jquery.js file. You can think of this as a real file system, as if you were working with a regular ASP.NET site.

Option 2: CDN Google (and other networks) host libraries like jQuery on their Content Delivery Networks (CDN). They designed these to be extremely fast and reliable. If you don't mind requiring a connection to the internet for your functionality to work, you can link directly to jquery on Google's CDN.

To do this, change your script tag for jQuery to this:

<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

Post a Comment for "How Do You Add Jquery In A Html Page As A Web Resource In Dynamics Crm 2011"