Netscape issue?

Results 1 to 5 of 5

Thread: Netscape issue?

  1. #1
    Vadim Guest

    Default Netscape issue?

    Hi guys,<BR>I&#039m a beginner into JavaScript, so i have a next problem.<BR>the code below is working fine into IE 4.0/5.0, but then i running the same .asp into NetScape 4.72 it&#039s does nothing. No error, nothing.<BR>What do i missing????????????????<BR><BR>Response.Write ("function getcurrentdate(){") & Chr(13)<BR> Response.Write ("var today = new Date();") & chr(13)<BR> Response.Write ("var locday = today.getDate();")<BR> Response.Write ("var locmonth = today.getMonth()+ 1;")<BR> Response.Write ("var locyear = today.getFullYear();")<BR> <BR> Response.Write ("if (document.frmcombo.Status[document.frmcombo.Status.selectedIndex].value==""completed"")")<BR>Response.Write (" {")<BR>Response.write ("; document.frmcombo.month.value=locmonth; document.frmcombo.year.value=locyear;")<BR>Respons e.Write (" }") & Chr(13)<BR>Response.Write ("else ")<BR>Response.Write (" {") & Chr(13)<BR>Response.write ("""11""; document.frmcombo.month.value=""12""; document.frmcombo.year.value=""1997"";")<BR>Respon se.Write (" }") & Chr(13)<BR>Response.Write (" }") & Chr(13)<BR>Response.Write ("&#060;/script&#062;") & Chr(13)<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Netscape issue?

    why couldn&#039t you just view-source and show us just the javascript code???<BR><BR>j

  3. #3
    Tom Levesque Guest

    Default RE: Netscape issue?

    Well I&#039ve taken your code and deceiphered it (thank you Personal Web Server) but now you&#039ve got another problem, look:<BR><BR><BR>function getcurrentdate(){<BR><BR> var today = new Date();<BR> var locday = today.getDate();<BR> var locmonth = today.getMonth() + 1;<BR> var locyear = today.getFullYear();<BR><BR> if (document.frmcombo.Status[document.frmcombo.Status.selectedIndex].value=="completed"){<BR><BR>;<BR> document.frmcombo.month.value=locmonth;<BR> document.frmcombo.year.value=locyear;<BR><BR> } else {<BR><BR>"11";<BR> document.frmcombo.month.value="12";<BR> document.frmcombo.year.value="1997";<BR><BR> }<BR>}<BR><BR>You&#039re referring to a form value, COPY AND PASTE ALL THE CODE, NOT JUST PART OF IT. Not everyone here takes mind reading 101 (er, code guessing?)

  4. #4
    Vadim Guest

    Default RE: Netscape issue?

    I found that was wrong.<BR>IE understand .value, but Netscape does not. After i changed the .value to SelectedIndex they both working fine.

  5. #5
    chandu Guest

    Default RE: Netscape issue?

    while reading the value of selectbox in nn,<BR>you must use this..everything goes fine..<BR>document.formname.objectname.options[document.formname.objectname.selectedIndex].value=="something"<BR>{your code}<BR>else<BR>{your code}<BR>all the best..

Posting Permissions

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