jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: background image background image #69346

    Stef
    Participant

    Hello Nadezhda,

    It was in the content div of jqxwindow, obviously.
    I persisted in placing the image in the first div:-(
    thank you again.

    Stef.


    Stef
    Participant

    Hi Peter,
    I found a way to solve my problem;
    I have only a single event now. I really do not know why I had two events … the mystery of javascript.

    Here’s the code:

    
    <html lang="en">
       <head>
          <title>jQuery DateTimeInput Sample</title>
             <link rel="stylesheet" href="jqwidgets-ver3.7.1/jqwidgets/styles/jqx.base.css" type="text/css"/>
             <script type="text/javascript" src="jquery-2.1.3/jquery-2.1.3.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/jqxcore.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/jqxdatetimeinput.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/jqxcalendar.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/jqxtooltip.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/jqxbuttons.js"></script>
             <script type="text/javascript" src="jqwidgets-ver3.7.1/jqwidgets/globalization/globalize.js"></script>
    
             <script type="text/javascript">
                $(document).ready(function () {
                   $("#jqxdatetimeinput").jqxDateTimeInput({ width: '250px', height: '25px', formatString: 'dd.MM.yyyy' });
    
                   // init buttons.
                   $("#setDateButton").jqxButton();
                   $("#getDateButton").jqxButton();
    
                   // get date.
                   $("#getDateButton").bind('click', function () {
                      alert("#"   + event.target.id + ':\n' 
                                  + $('#jqxdatetimeinput').jqxDateTimeInput('getText') + "\n"
                                  + $('#jqxdatetimeinput').jqxDateTimeInput('getDate'));
                   });
    
                   // set new date.
                   $("#setDateButton").bind('click', function () {
                      var isoDate = '2015-05-11';
                      $('#jqxdatetimeinput').jqxDateTimeInput('setDate', isoDate);
                   });
    
                   // listen to new value.
                   $('#jqxdatetimeinput').bind('valueChanged', function (event) {
                      alert("#" + event.target.id + ': ' + $('#jqxdatetimeinput').jqxDateTimeInput('getDate'));
                      $("#dateinfo").text($('#jqxdatetimeinput').jqxDateTimeInput('getText'));
                   });
                });
          </script>  
    
       </head>
       <body>
          <div id='content'>
             <div id='jqxdatetimeinput'></div>
             <div style="margin-top: 10px;">
                <input id="setDateButton" type="button" value="Set Date"/>
                <input id="getDateButton" type="button" value="Get Date"/>
             </div>
             <span id="dateinfo">
             </span>
          </div>
       </body>
    </html>
    

    Thanks for your help, Stephane.


    Stef
    Participant

    Hi Peter,

    thank you for your answer and that’s a hassle because I am writing an app which is jqwidget client side, the web server side java is J2E – Apache Tomcat and finally the server side data and programs is an as400.
    I need the “valueChanged” function to approach “real time” and synchronize each server.

    I am afraid to saturate the socket between Tomcat and AS400 whether the events are doubled for a single call to ‘setDate’ or other as a change in value of any input I have not tried it yet.

    Is JQuery or JQWidget doubling the event?

    Sincerely, Stephane.

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