SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    192
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    IE8 SUPPORTS THIS JS Math.max(Math.min(

    daysInPeriodvar = Math.max(Math.min(endPeriod, dateOut) - Math.max(startPeriod, dateIn), 0);
    IE8 SUPPORTS THIS,,,...???
    If not what is the cross browser method? implement manual min max methods?

  2. #2
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    192
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    why not work calc functionality here? i mean no work in some versions of IE only?
    georgiosrafaelavilla.com/book.php
    relates to Math.max(Math.min(endPeriod, dateOut) - Math.max(startPeriod, dateIn), 0);
    used in calc function....
    well?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lse123 View Post
    daysInPeriodvar = Math.max(Math.min(endPeriod, dateOut) - Math.max(startPeriod, dateIn), 0);
    IE8 SUPPORTS THIS,,,...???
    If not what is the cross browser method? implement manual min max methods?
    I.E. has always supported those methods. The error is elsewhere.
    Tab-indentation is a crime against humanity.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,785
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Logic Ali View Post
    I.E. has always supported those methods.
    Not always - Internet Explorer 2 didn't support scripting languages at all. It has been supported since IE3 though - which is still an earlier version than anyone is likely to be running any more.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    192
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    georgiosrafaelavilla.com/book.php

    I am still no make it why not work in ie7, ie8... all is on js can you help? startup with
    <input type="button" id="calcButton" value="Calculate Amounts" onClick="calcGeneral();"/>

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,785
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There's nothing wrong in what little code you have posted to explain why it isn't working (although including JavaScript inside the HTML <input> tag is a bit old fashioned) so the problem must lie in the part of the code you haven't shown us yet.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    192
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I was not meaning that. i give this function (button input) as a start point, for you, for debug. the problem is:
    at georgiosrafaelavilla.com/book.php after press id="calcButton" having selected dates prior, no work in ie7, ie8.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,785
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It would be easier to work out what is happening if all the JavaScript was correctly attached just before the </body> tag instead of being scattered through the HTML.

    Without being able to locate the particular script that has the problem in that page my best guess as to why it doesn't work in IE7 and IE8 would be that there is a somewhere in the code that is using a JavaScript command that those browsers do not recognise because the JScript equivalent (that those browsers would recognise) has not been provided.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Zealot
    Join Date
    May 2013
    Posts
    192
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    d[0] = (new Date("00:00:00 January 1, 2013")).getTime();
    d[1] = (new Date("00:00:00 April 1, 2013")).getTime();

    THIS SUPPORTED BY IE8, IE7 OR IPAD 1?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •