Netscape 6 and type conversion

Results 1 to 3 of 3

Thread: Netscape 6 and type conversion

  1. #1
    djones Guest

    Default Netscape 6 and type conversion

    Hi,<BR>We&#039;re running IIS4 and we&#039;ve got a page with a form that includes a hidden input field called "distance" with a decimal value ( e.g. "51.1"). This gets sent to another page where the following code is run. <BR><BR>distance = cdbl(request.form("distance"))<BR><BR>For some reason, in Netscape 6 we&#039;re getting a type mismatch. Works fine under ie and ns4x Done a response.write on the form variable and it&#039;s printing "51.1" OK. Server config? Any ideas??<BR>

  2. #2
    Join Date
    Dec 1969

    Default More debugging needed?

    Sounds like NS 6 is putting some kind of junk into the string. Maybe becuz it&#039;s a hidden field?<BR><BR>How about doing this:<BR><BR>&#060;%<BR>distance = Request.Form("distance")<BR>Response.Write "Type of distance is " & TypeName(distance) & "&#060;P&#062;"<BR>For i = 1 To Len(distance)<BR>&nbsp; &nbsp; ltr = Mid(distance,i,1)<BR>&nbsp; &nbsp; Response.Write "Letter #" & i & " is [" & ltr & "] with ASCII value " & Asc(ltr) & "&lt;BR&#062;"<BR>Next<BR>...<BR>%&#062;<BR><BR>Ru n this with MSIE *and* with NS 6 and compare the results.<BR><BR>You should get<BR><BR>String<BR>Letter #1 is [5] with ASCII value 53<BR>Letter #2 is [1] with ASCII value 49<BR>Letter #3 is [.] with ASCII value 46<BR>Letter #4 is [5] with ASCII value 53<BR><BR>If I have done my ASC correctly in my head.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: More debugging needed?

    Bill,<BR>Goddam! Ns is converting the ascii code 46 into 169. We were also having trouble with validating email addresses - same reason. ADO always came back with a null recordset - even though a response.write on the sql seemed to suggest everything was OK. <BR>Found the reason. All team members installed ns6 3 weeks ago, haven&#039;t touched the settings ( I swear!). On my pc found ns was using the Armenian character set! Another was using Western(iso-8859-1 ), but he&#039;s also seen the problem come up. Switching on Autodetect ( not part of the standard install? ) both switched to Western(windows-1252 ) and the problem has gone ( more testing needed to confirm this ). <BR><BR>Thanks for the help my freind. I&#039;m now off to CSS/layout hell with my new enemy. <BR>p.s. Seen under Ns6? owch!<BR><BR>darren<BR><BR>

Posting Permissions

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