Forum



08:06

12/12/2012

Hi, I am new to jqGrid and have been able to setup a jqGrid that is what I am wanting in a blank webpage in Visual Studio. When I move that working jqGrid into my website where I am using a masterpage, I get the following error:
Microsoft JScript runtime errror: 'jQuery' is undefined
Any assistance would be greatly appreciated.
Thanks
13:22

Moderators
30/10/2007

Hello Sara,
You maybe will need to publish your problem here
The error you have tell me that you do not have included the jQuery lib or the path to the lib is not correct.
Please follow these instructions in order to get idea what to do.
Also please visit the documentation pager here
Thank you
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
17:40

12/12/2012

02:41

12/12/2012

Tony -
Ok. So, I have the jqGrid working with the MasterPage as long as the webpage that uses the MasterPage are in the same location in my website file structure. The problem I have is when I put the jqGrid onto a webpage that is in a subfolder and uses the same MasterPage - then I get the "Microsoft JScript runtime errror: 'jQuery' is undefined error".
Website file structure:
- App_Data folder
- App_Themes folder - this has my css files
- Bin folder - this has the Trirand.Web.dll file
- Scripts folder - this has the js files
- Users - the folders/webpages in this folder require a login to access, while the ones outside of this folder are considered "public" webpages
- 1000_Manager
- Database.aspx - jqGrid won't work on this page
- 1000_Manager
- Default.aspx - jqGrid works on this page
- MasterPage.master
The css file works ok with a relative href so that it can apply in pages in side the folder structure:
<
link type="text/css" rel="stylesheet" href="~/App_Themes/jqGrid/ui.jqgrid.css" />
The js files, will not work at all if I use the "~/" to make the relateive file location:
<script type="text/javascript" src="Scripts/trirand/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="Scripts/trirand/jquery.jqGrid.min.js"></script>
As I was typing this I asked myself, will I have any jqGrids in my "public" webpages or will they only be on the ones where a login is required. I don't forsee any jqGrids on the "public" pages. With that said, I just tested adding "../../" to the src's of the js files and... the jqGrids worked.
<script type="text/javascript" src="../../Scripts/trirand/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="../../Scripts/trirand/jquery.jqGrid.min.js"></script>
Thanks for letting me "talk" this through. It is surprising how things become clear when trying to explain the problem you are having!
Most Users Ever Online: 715
Currently Online:
38 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66