Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

WPI 8.6 and beyond bug\bugfix thread

- - - - -

  • This topic is locked This topic is locked
142 replies to this topic

#126
Francesco

Francesco

    Advanced Member

  • Members
  • PipPipPip
  • 410 posts

I compiled dHTMLx (attached in this post) with only the controls WPI uses, it replaces the whole Codebase folder.

In WPI.HTA this code block


<script type="text/javascript" src="../common/codebase/dhtmlxcommon.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcontainer.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtabbar.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtabbar_start.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxslider.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxslider_start.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtree.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxmenu.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxmenu_ext.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtoolbar.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxgrid.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxgridcell.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxgrid_drag.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxwindows.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcombo.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxcombo_extra.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxcombo_whp.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxaccordion.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxeditor.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxeditor_ext.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcolorpicker.js" application="yes"></script>

must be replaced with


<script type="text/javascript" src="../common/codebase/dhtmlx.js" application="yes"></script>

and in Installer.HTA


<script type="text/javascript" src="../common/codebase/dhtmlxcommon.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcontainer.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxwindows.js" application="yes"></script>

must be replaced with


<script type="text/javascript" src="../common/codebase/dhtmlx.js" application="yes"></script>

Attached Files


Edited by Francesco, 12 July 2013 - 01:12 AM.



How to remove advertisement from MSFN

#127
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

OMG Thank you!



#128
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

I am having issues with msfn. I might need to find a different forum home for it as the senior staff can't seem to be bothered that I have needs of them.

 

http://www.msfn.org/...ger-recipients/

 

I have messaged xper and cluberti with the issues and the request for myselfidem to be added to the devs members and they just blatantly ignore me. EVEN though WPI has been a part of this forum for 10 years....



#129
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

 

I compiled dHTMLx (attached in this post) with only the controls WPI uses, it replaces the whole Codebase folder.

In WPI.HTA this code block


<script type="text/javascript" src="../common/codebase/dhtmlxcommon.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcontainer.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtabbar.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtabbar_start.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxslider.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxslider_start.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtree.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxmenu.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxmenu_ext.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxtoolbar.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxgrid.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxgridcell.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxgrid_drag.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxwindows.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcombo.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxcombo_extra.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxcombo_whp.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxaccordion.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxeditor.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/ext/dhtmlxeditor_ext.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcolorpicker.js" application="yes"></script>

must be replaced with


<script type="text/javascript" src="../common/codebase/dhtmlx.js" application="yes"></script>

and in Installer.HTA


<script type="text/javascript" src="../common/codebase/dhtmlxcommon.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxcontainer.js" application="yes"></script>

<script type="text/javascript" src="../common/codebase/dhtmlxwindows.js" application="yes"></script>

must be replaced with


<script type="text/javascript" src="../common/codebase/dhtmlx.js" application="yes"></script>

This won't let WPI render the boxes for the wizards. Any ideas?



#130
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Works fine for me Kels!

Could you give us more details about your trouble, please?

 

Regards

 

*Edit: Maybe we can also add inside WPI.hta

 

On line 448:

document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlx.css">');

Edited by myselfidem, 12 July 2013 - 11:26 AM.


#131
Francesco

Francesco

    Advanced Member

  • Members
  • PipPipPip
  • 410 posts

 

This won't let WPI render the boxes for the wizards. Any ideas?

 

Sorry, I didn't notice the same files were loaded twice in each HTM file.

 

You also have to replace in WPI.HTA:

    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxtabbar.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxcombo.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxslider.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxslider_custom.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxtree.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxgrid.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxgrid_skins.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxwindows.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxcolorpicker.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxmenu_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxaccordion_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxgrid_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxwindows_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxeditor_dhx_skyblue.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlx_custom.css">');

with

document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlx.css">');

and in Installer.HTA:

    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlxwindows.css">');
    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/skins/dhtmlxwindows_dhx_skyblue.css">');

with

    document.write('<link rel="stylesheet" type="text/css" href="../common/codebase/dhtmlx.css">');

Edited by Francesco, 12 July 2013 - 01:58 PM.


#132
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Many thanks Francesco! Works fine and it's very nice.

Regards



#133
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

@ myselfidem and francesco:

 

8.6.6 introduced a bug I am trying to track down.

 

One of the changes has made the installer lock up on (Seemingly) installers that have sub routines.

 

The installer is having a issue continuing when so installers run. It just locks up completely...

 

Please assist me in checking the changes introduced in the last release.



#134
Francesco

Francesco

    Advanced Member

  • Members
  • PipPipPip
  • 410 posts

I haven't noticed anything that could affect the installer in the changes and I never had any error myself, maybe it's IE10 or something else causing trouble?



#135
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Does this problem exist also after adding the proposed changes?

 

I haven't noticed anything also, and now I use WPI with all the changes and works fine for me!

 

Regards



#136
Francesco

Francesco

    Advanced Member

  • Members
  • PipPipPip
  • 410 posts

enable64bit can be removed since the launcher when possible always run MSHTA in 64bit mode.

 

From configwizard.js remove:

document.getElementById("bit64").checked=configList[pos].bit64=="yes" ? 1 : 0;
and
configList[pos].bit64=document.getElementById("bit64").checked ? "yes" : "no";
and
entry.bit64="no";
and
document.getElementById("bit64").disabled=state;
and
     case "bit64":
      configList[pn-2].bit64=val;
      break;
and
   WriteConfigValue(tf, "bit64", configList[i].bit64,0);
and
document.getElementById("lblEnable64BitProcessing").innerHTML=getText(lblEnable64BitProcessing);

From globals.js remove

var ExecuteBeforebit64=false;
and
var ExecuteAfterbit64=false;
and
var bit64=[];   // Enable 64bit processing

From installer.js remove

   programs[0].bit64=ExecuteBeforebit64==true ? "yes" : "no";
and
   programs[0].bit64="yes";
and
   programs[0].bit64="no";
and
   programs[programs.length-1].bit64=ExecuteAfterbit64==true ? "yes" : "no";
and
   programs[programs.length-1].bit64="no";
and
   programs[programs.length-1].bit64="no";
and
     if (programs[item].bit64=="yes" && OSBits==64)
      cmd='"'+sysPath64+'RegEdt32" /S ' + cmd;
     else
and
  if (programs[item].bit64=="yes" && OSBits==64)
   cmd='"'+sysPath64+'cmd.exe" /C '+cmd;
  else

From installer_log.js remove

WriteLogLinePlain("   ExecuteBeforebit64=" + ExecuteBeforebit64);
and
WriteLogLinePlain("   ExecuteAfterbit64=" + ExecuteAfterbit64);

From installer_reboot.js remove

  if (rbProg.bit64 != null)
   rbfHandle.WriteLine("programs[prb].bit64=['"+GetConfigValue(rbProg.bit64.toString(),1)+"'];");

From optionswizard.js remove

  getElementById("lblExecuteBeforebit64").innerHTML=getText(lblEnable64BitProcessing);
and
  getElementById("lblExecuteAfterbit64").innerHTML=getText(lblEnable64BitProcessing);
and
  document.getElementById("ExecuteBeforebit64").disabled=false;
and
  document.getElementById("ExecuteBeforebit64").disabled=true;
and
  document.getElementById("ExecuteAfterbit64").disabled=false;
and
  document.getElementById("ExecuteAfterbit64").disabled=true;
and
ExecuteBeforebit64=false;
and
ExecuteAfterbit64=false;
and
  document.getElementById("ExecuteAfterbit64").checked=ExecuteBeforebit64;
and
  document.getElementById("ExecuteAfterbit64").checked=ExecuteAfterbit64;
and
    if (opt=="ExecuteBeforebit64")
     document.getElementById("ExecuteBeforebit64").checked=val=="true" ? true : false;
and
    if (opt=="ExecuteAfterbit64")
     document.getElementById("ExecuteAfterbit64").checked=val=="true" ? true : false;
and
  tf.WriteLine("ExecuteBeforebit4="+ExecuteBeforebit64+";");
and
  tf.WriteLine("ExecuteAfterbit64="+ExecuteAfterbit64+";");
and
  tf.WriteLine("ExecuteBeforebit64="+document.getElementById("ExecuteBeforebit64").checked+";");
and
  tf.WriteLine("ExecuteAfterbit64="+document.getElementById("ExecuteAfterbit64").checked+";");

From program.js remove

bit64=[];
and
this.bit64=bit64[idx];
and
  bit64[i+1]=programs[i].bit64;

From updatewizard.js remove

   tf.WriteLine('\t\t\t"Bit64" : '+configList.Programs[i].Bit64+',');
and
     case "bit64":
      configList[pn-2].bit64=val;
      break;
and
  tf.WriteLine("// bit64[pn]=['no'];");
and
   WriteConfigValue(tf, "bit64", configList[i].bit64,0);

From configwizardtemplate_details.htm remove

     <tr>
      <td>
       <table border="0" cellpadding="0" cellspacing="0">
        <tr>
         <td>
          <input id="bit64" type="checkbox"
           onClick="ConfigUpdated();"
          >
         </td>
         <td nowrap>
          <div id="lblEnable64BitProcessing" class="opTxt" align="absmiddle"></div>
         </td>
        </tr>
       </table>
      </td>
      <td>
      <!-- next option here -->
      </td>
     </tr>

From globals_lang.js remove

var lblEnable64BitProcessing=[];

From the language files remove the lines starting with:

lblEnable64BitProcessing[lang]

From optionswizardtemplate_tools.htm remove

      <td>
       <table border="0" cellpadding="0" cellspacing="0">
        <tr>
         <td>
          <input id="ExecuteBeforebit64" type="checkbox"
           onClick="ConfigUpdated();"
          >
         </td>
         <td>
          <div id="lblExecuteBeforebit64" class="opTxt" align="absmiddle"></div>
         </td>
        </tr>
       </table>
      </td>
and
      <td>
       <table border="0" cellpadding="0" cellspacing="0">
        <tr>
         <td>
          <input id="ExecuteAfterbit64" type="checkbox"
           onClick="ConfigUpdated();"
          >
         </td>
         <td>
          <div id="lblExecuteAfterbit64" class="opTxt" align="absmiddle"></div>
         </td>
        </tr>
       </table>
      </td>

In configwizard.js replace

  tf.WriteLine("// WPI Config 8.0.0");
with
  tf.WriteLine("// WPI Config 8.7.0");

In WPI.HTA after

  else if (ver<800)
  {
/*
   var UpTxt=new String();
   UpTxt=getText(txtUpdateConfig);
   UpTxt=String(UpTxt).replace("7.2.0","8.0.0");
   if (confirm(configFile+"\n\n"+UpTxt))
   {
    NeedUpdateWizard=800;
    break;
   }
   else
   {
    alert("You should remove config.js from the WPIScripts folder\nbefore continuing.  Then run WPI again.");
    self.close();
   }
*/
   break;
  }
insert
  else if (ver<870)
  {
   var bit64=[];
   break;
  }


#137
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

I found the issue out I was having.

 

On ie8 this timer code works fine but hangs on ie10:

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
var txt="";
var now=new Date();
var nowSecs=(now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds();
var elapsedSecs=nowSecs - ins_startSecs;

var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
elapsedSecs=elapsedSecs - (minutes*60);
var seconds=elapsedSecs;
txt=((hours < 10) ? "0" : "") + hours;
txt += ((minutes < 10) ? ":0" : ":") + minutes;
txt += ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementById("TimerDisplay").innerHTML=txt;
}

On ie10 this code works fine yet hangs in ie8:

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
var now=new Date();
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;

var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
var seconds=elapsedSecs - (minutes*60);
document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
var timerID=setTimeout("ins_iTimer()",1000);  // Update display
}

The easiest way I can see to fix this would be using an if statement but I am having a time getting it to work any ideas?

 

As soon as this error is fixed I am ready to make the next release.

 

Changelog:

 

**** Compiled DHTMLx to v3.6.
**** Remvoed 64bit options as they are auto-enabled.
**** Added Win 2K to conditions.
**** Added {CMD} to the list of functions.
**** Add Win2k to the conditions.
**** Fixed a executebefore64bit error.
**** User file written version updated slightly.
**** Fixed a autologoncount error.
**** Fixed a alert sound location error.
**** More info added to the installer log.
**** Removed more old leftover code.
**** Added setfilesystem to the conditions.
**** More fontinstaller improvements.
**** Tons of textual errors fixed.
**** Added {MSI} to the commands for standard msi files.
**** Added alerts to themewizard when exiting.
**** Fixed a couple of resolution errors.
**** Restored "Float" for the tooltips.
**** Tons of minor features improved.
**** Fixed AutoAdminLogin feature.
**** Added HiPerformance Power Scheme for Win7.
**** Redundant code removal.
**** Theme fixes.
**** Expanded wmi functions.


Edited by Kelsenellenelvian, 19 July 2013 - 08:44 PM.


#138
bphlpt

bphlpt

    MSFN Addict

  • Members
  • PipPipPipPipPipPipPip
  • 1,633 posts
  • OS:none specified
  • Country: Country Flag

As I see it, those two timer routines are different in four different places, shown here. (I moved one line to group it with related lines but I don't think it will make any difference. I also added extra blank lines so the two pieces of code would have the same number of lines.)

Works in IE8

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
var now=new Date();
[-1-]
var nowSecs=(now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds();
var elapsedSecs=nowSecs - ins_startSecs;
[/-1-]
 
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
[-2-]
elapsedSecs=elapsedSecs - (minutes*60);
var seconds=elapsedSecs;
[/-2-]
[-3-]
var txt="";
txt=((hours < 10) ? "0" : "") + hours;
txt += ((minutes < 10) ? ":0" : ":") + minutes;
txt += ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementById("TimerDisplay").innerHTML=txt;
[/-3-]
[-4-]
 
[/-4-]
}

Works in IE10

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
var now=new Date();
[-1-]
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
 
[/-1-]
 
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
[-2-]
var seconds=elapsedSecs - (minutes*60);
 
[/-2-]
[-3-]
document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
 
 
 
 
[/-3-]
[-4-]
var timerID=setTimeout("ins_iTimer()",1000);  // Update display
[/-4-]
}

I can't imagine that the basic JaveScript math and variable assignments should act differently between IE8 and IE10, which means that the difference should be caused by either [-3-] or [-4-]. Assuming I am right, then:

Should work in IE8

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
 
var now=new Date();
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
var seconds=elapsedSecs - (minutes*60);
 
var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementById("TimerDisplay").innerHTML=txt;
}

Should work in IE10

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";
 
var now=new Date();
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
var seconds=elapsedSecs - (minutes*60);
 
document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
var timerID=setTimeout("ins_iTimer()",1000);  // Update display
}

If I am not right for some reason, then you can swap out [-1-], then [-2-], etc until you narrow it down further as to which lines are really causing the problem.

Did you mean to leave [-4-] out of the IE8 version?

Anyway, assuming you can narrow it down to as few a number of lines as possible that need to be handled differently in the different versions of IE, and assuming you can tell on which version of IE that WPI is currently running, I would think that you should be able to run the appropriate set of lines using logic similar to:

If IE10 then {IE10 lines} else {IE8 lines}

What does the If logic lines you have tried look like?

Handling the different browser requirements has always been the bane of HTML coding. Good luck!

Cheers and Regards


Edited by bphlpt, 19 July 2013 - 11:29 PM.


#139
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Yes [4] Doesn't play well with ie8 either.

 

Here's what I have:

if (IE10)
  document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
  var timerID=setTimeout("ins_iTimer()",1000);  // Update display
 
  else
  document.getElementById("TimerDisplay").innerHTML=txt;
  var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;

So my whole code looks like:

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";

var now=new Date();
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
var seconds=elapsedSecs - (minutes*60);
  if (IE10)
  document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
  var timerID=setTimeout("ins_iTimer()",1000);  // Update display
 
  else
  document.getElementById("TimerDisplay").innerHTML=txt;
  var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
}

Now my only issue is writing a function to tell wpi IE10



#140
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

@ francesco please send me your wpi.hta we seem ta have a couple of differences I need to look at.



#141
Francesco

Francesco

    Advanced Member

  • Members
  • PipPipPip
  • 410 posts

Sure.

Attached Files

  • Attached File  WPI.zip   4.04KB   4 downloads


#142
bphlpt

bphlpt

    MSFN Addict

  • Members
  • PipPipPipPipPipPipPip
  • 1,633 posts
  • OS:none specified
  • Country: Country Flag

Here's what I have:

if (IE10)
  document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
  var timerID=setTimeout("ins_iTimer()",1000);  // Update display
 
  else
  document.getElementById("TimerDisplay").innerHTML=txt;
  var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;

 

I assume you meant to say:

if (IE10)
  document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
  var timerID=setTimeout("ins_iTimer()",1000);  // Update display
 
 else
  var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
  document.getElementById("TimerDisplay").innerHTML=txt;

since you have to define txt before you can display it, don't you? :)

 

Just out of curiosity, are you sure that this:

 

var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementById("TimerDisplay").innerHTML=txt;

 

doesn't work in IE10?  If it did, then [-4-] would be the only thing unique about IE10.

 

Cheers and Regards


Edited by bphlpt, 20 July 2013 - 09:48 AM.


#143
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developers
  • 8,703 posts
  • OS:Windows 7 x64
  • Country: Country Flag

This does indeed work fine in ie10.

 

Running a vm install now to test in ie8 again just to make sure.

function ins_iTimer()
{
position="timers.js";
whatfunc="ins_iTimer()";

var now=new Date();
var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
var hours=Math.floor(elapsedSecs/3600);
elapsedSecs=elapsedSecs - (hours*3600);
var minutes=Math.floor(elapsedSecs/60);
var seconds=elapsedSecs - (minutes*60);
var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
document.getElementById("TimerDisplay").innerHTML=txt;
}

After test the next release will be ready your first on the list for the release!


Edited by Kelsenellenelvian, 20 July 2013 - 10:31 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN