jQWidgets Forums
jQuery UI Widgets › Forums › General Discussions › page with parameters
This topic contains 12 replies, has 2 voices, and was last updated by arksouaf 11 years, 11 months ago.
-
Authorpage with parameters Posts
-
Dear,
my problem is simple but i tried hard to solve it but badly i didnt find the solution
the widgets are working 100% when i call a simple link like
but when i open another page with a link like this
http://localhost:57180/home/ShowHotel/32
its not working
i had knew that the problem happend when a parameter is passed to the page
but i cannt have the solution for this badly
thank you for your time
Hi arksouaf,
if you use getDemoTheme it will not. The function is only for our demos and that is the reason it is called getDemoTheme. If you do not use that function, everything will work correctly.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/remove the getDemoTheme was one of the solution i tried but also its not work
thank you for fast respond
Best Regards
i have use the javascript debuger
i found an error in this code
$(“#ComingDate”).jqxDateTimeInput({ width: ‘150px’, height: ’25px’, rtl: true, formatString: ‘MM-dd-yyyy’, theme: ‘base’ });the error is
Uncaught TypeError: Object [object Object] has no method ‘jqxDateTimeInput’but with the same code without passing parameters to the page this error dont appear
i hope i helped you in finding the error
Thank you
Hi arksouaf,
The issue according to us is that. Only that function uses parameters. Also make sure the widgets are in document.ready. If that does not help, send us a sample and we will see what’s wrong in the provided code.
btw. your URL #1 and URL #2 point to different pages. It is possible that you try to use something which you do not have references to it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/$(document).ready(function () {
// Create a jqxDateTimeInput
$(“#ComingDate”).jqxDateTimeInput({ width: ‘150px’, height: ’25px’, rtl: true, formatString: ‘MM-dd-yyyy’, theme: ‘base’ });
$(“#LeavingDate”).jqxDateTimeInput({ width: ‘150px’, height: ’25px’, rtl: true, formatString: ‘MM-dd-yyyy’, theme: ‘base’ });
var today = new Date();
$(“#LeavingDate”).jqxDateTimeInput(‘val’, new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1));
});this is the whole SCRIPT tag
hope this help
Thank you
Your Script tag is OK, there is something else on your side which is not so you would need to provide a full sample if you want we to test it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/i know its point to diffrent pages
its MVC and the code i put is in the MAIN Layout so its included in every page
Thank you again
Hi arksouaf,
So most probably your references to the Scripts are not correct.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/$(document).ready(function () {
// Create a jqxDateTimeInput
$(“#ComingDate”).jqxDateTimeInput({ width: ‘150px’, height: ’25px’, rtl: true, formatString: ‘MM-dd-yyyy’, theme: ‘base’ });
$(“#LeavingDate”).jqxDateTimeInput({ width: ‘150px’, height: ’25px’, rtl: true, formatString: ‘MM-dd-yyyy’, theme: ‘base’ });
var today = new Date();
$(“#LeavingDate”).jqxDateTimeInput(‘val’, new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1));
});
$(document).ready(function () {
// Create jqxNumberInput
$(“#PersonsCount”).jqxNumberInput({ width: ‘130px’, height: ’20px’, inputMode: ‘simple’, spinButtons: true, decimalDigits: 0, rtl: true, theme: ‘base’ });
$(“#ChildsCount”).jqxNumberInput({ width: ‘130px’, height: ’20px’, inputMode: ‘simple’, spinButtons: true, decimalDigits: 0, rtl: true, theme: ‘base’ });
$(“#DistanceFormHarm”).jqxNumberInput({ width: ‘130px’, height: ’20px’, inputMode: ‘simple’, spinButtons: true, decimalDigits: 0, rtl: true, theme: ‘base’ });
});thats the whole sample with the refrenced js files
<!-- add the jQuery script --> <script type="text/javascript" src="@Url.Content("~/scripts/jquery-1.10.2.min.js")"></script> <!-- add the jQWidgets framework --> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxcore.js")"></script> <!-- add one or more widgets --> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxbuttons.js")"></script> <!-- add one of the jQWidgets styles --> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxdatetimeinput.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxcalendar.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxtooltip.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/globalization/globalize.js")"></script> <link rel="stylesheet" href="@Url.Content("~/jqwidgets/styles/jqx.base.css")" type="text/css" /> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxscrollbar.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxtabs.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxcheckbox.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxscrollview.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxlistbox.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxdropdownlist.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxnumberinput.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxpanel.js")"></script> <script type="text/javascript" src="@Url.Content("~/jqwidgets/jqxcombobox.js")"></script><script type="text/JavaScript"> $(document).ready(function () { // Create a jqxDateTimeInput $("#ComingDate").jqxDateTimeInput({ width: '150px', height: '25px', rtl: true, formatString: 'MM-dd-yyyy', theme: 'base' }); $("#LeavingDate").jqxDateTimeInput({ width: '150px', height: '25px', rtl: true, formatString: 'MM-dd-yyyy', theme: 'base' }); var today = new Date(); $("#LeavingDate").jqxDateTimeInput('val', new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1)); }); $(document).ready(function () { // Create jqxNumberInput $("#PersonsCount").jqxNumberInput({ width: '130px', height: '20px', inputMode: 'simple', spinButtons: true, decimalDigits: 0, rtl: true, theme: 'base' }); $("#ChildsCount").jqxNumberInput({ width: '130px', height: '20px', inputMode: 'simple', spinButtons: true, decimalDigits: 0, rtl: true, theme: 'base' }); $("#DistanceFormHarm").jqxNumberInput({ width: '130px', height: '20px', inputMode: 'simple', spinButtons: true, decimalDigits: 0, rtl: true, theme: 'base' }); });</script>
Hi arksouaf,
I think you do not understand me. The PATH to the files used by jQWidgets seems to be not correct and I strongly suggest you to take another look at it. That is the only reason why you will get: Uncaught TypeError: Object [object Object] has no method ‘jqxDateTimeInput error message. Btw. You should have only one document.ready per page, too.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank you very much for the help
i have found that after i call this Script
<script type="text/javascript" src="@Url.Content("~/scripts/jquery-1.10.2.min.js")"></script>
another older version called at the bottom of the layout
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
i remove it and its worked
Thank you for the help and for quick response
BEST REGARDS
-
AuthorPosts
You must be logged in to reply to this topic.