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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • page with parameters #28092

    arksouaf
    Participant

    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

    http://localhost:57180/

    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

    page with parameters #28094

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    page with parameters #28095

    arksouaf
    Participant

    remove the getDemoTheme was one of the solution i tried but also its not work

    thank you for fast respond 🙂

    Best Regards

    page with parameters #28096

    arksouaf
    Participant

    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

    page with parameters #28097

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    page with parameters #28098

    arksouaf
    Participant

    $(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

    page with parameters #28099

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    page with parameters #28100

    arksouaf
    Participant

    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

    page with parameters #28101

    Peter Stoev
    Keymaster

    Hi arksouaf,

    So most probably your references to the Scripts are not correct.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    page with parameters #28102

    arksouaf
    Participant

    $(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

    page with parameters #28103

    arksouaf
    Participant
    <!-- 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>
    page with parameters #28104

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    page with parameters #28105

    arksouaf
    Participant

    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

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.