Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

works in ie but not ns,op

Status
Not open for further replies.

sepp

IS-IT--Management
Jan 27, 2001
16
AT
hi

found this code in the net
it is part of a calender which should go one month up and then update the output
since i have little idea about the problems of different browsers i dont know what to search for
can anybody give me a clue where my problem lies and where i can find a good source for information

thx

Code:
function vor(MN)
  {
  var now = new Date();
  var Monat = now.getMonth()
  var Jahr = now.getYear()
  if (Jahr < 2000) Jahr+=1900
  var Wo = MN.indexOf(&quot; &quot;)
  Monatname = MN.substring(0,Wo)
  Jahr = eval(MN.substring(Wo+1,MN.length))
  if (Monatname==&quot;Januar&quot;){Monat=0}
  if (Monatname==&quot;Februar&quot;){Monat=1}
  if (Monatname==&quot;März&quot;){Monat=2}
  if (Monatname==&quot;April&quot;){Monat=3}
  if (Monatname==&quot;Mai&quot;){Monat=4}
  if (Monatname==&quot;Juni&quot;){Monat=5}
  if (Monatname==&quot;Juli&quot;){Monat=6}
  if (Monatname==&quot;August&quot;){Monat=7}
  if (Monatname==&quot;September&quot;){Monat=8}
  if (Monatname==&quot;Oktober&quot;){Monat=9}
  if (Monatname==&quot;November&quot;){Monat=10}
  if (Monatname==&quot;Dezember&quot;){Monat=11}
  var Monat = Monat + 1
  if (Monat==12)
    {
    Monat = 0
    Jahr = Jahr + 1
    }
  var Monatname = &quot;&quot;
  var Erster = new Date(Jahr,Monat,1)
  update(Monat,Jahr,Erster,0)
  }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top