Replacement of the given functions in Mozilla Browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarath chandran
    New Member
    • Nov 2007
    • 6

    Replacement of the given functions in Mozilla Browser

    what is this function trying to do?
    onload method calls these two functions
    [code=javascript]function getHost(){
    document.form1. Host.value = document.locati on.host;
    }
    function getClientTimeZo ne(){
    var dt = new Date();
    document.form1. ClientTimeZone. value = '' + dt.getTimezoneO ffset();
    }[/code]

    The above piece of code works well in IE but not in Mozilla
    How will I replace this?
    Last edited by gits; Dec 4 '07, 02:59 PM. Reason: fix code tags
  • Logician
    New Member
    • Feb 2007
    • 210

    #2
    Originally posted by sarath chandran
    what is this function trying to do?
    onload method calls these two functions
    [code=javascript]function getHost(){
    document.form1. Host.value = document.locati on.host;
    }
    function getClientTimeZo ne(){
    var dt = new Date();
    document.form1. ClientTimeZone. value = '' + dt.getTimezoneO ffset();
    }[/code]

    The above piece of code works well in IE but not in Mozilla
    How will I replace this?
    It's trying to display in form fields the timezone offset in minutes and the current host. form1 should be the name of a form (not an ID).
    Any error messages in the console?

    Comment

    Working...