Forum Moderators: open

Message Too Old, No Replies

ASP.NET - Netscape - Safari compatibility

Anyone else had this problem?

         

evanheld

3:49 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



I am writing an ASP.NET web app but the app must be visible to many different bowsers since 50% of people accessing the app will be using either netscape or apache.

Here's my problem. I used some javascript to get around smartnavigation not working in other browsers but apache doesn't seem to except it. Does anyone know if there is some special nuance with apache and javascript?

Thanks
evanheld

wardbekker

4:07 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



evanheld,

I'm not familiar with a Apache browser. I only know webserver by that name. Maybe you mean Mozilla?

Some general method to make your asp.net page better accessable by other browsers is to choose a different browser compatability in asp.net by using the ClientTarget property in the page directive. For instance : "downlevel" Renders with HTML 3.2 capabilities; that is, no CSS support.

evanheld

4:30 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



You're right, my mistake. The browser is actually called Safari and it comes with mac os X. I am currently researching this on [developer.apple.com...] which seems to be informative, although no breakthrough yet.

korkus2000

4:48 pm on Nov 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the JavaScript that you are using?

evanheld

5:27 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



something I found on this site to get around smartnavigation:

declared these evet handlers
onload="javascript:ScrollIt()" onscroll="javascript:setcoords()"

created two hidden fields: PageX, PageY

<script language="javascript">
function ScrollIt(){
window.scrollTo(document.Form1.PageX.value, document.Form1.PageY.value);}
function setcoords(){ var myPageX;
var myPageY;
if (document.all){myPageX = document.body.scrollLeft;
myPageY = document.body.scrollTop;}
else{
myPageX = window.pageXOffset + document.body.scrollLeft;
myPageY = window.pageYOffset + document.body.scrollTop;
}

document.Form1.PageX.value = myPageX;
document.Form1.PageY.value = myPageY;
}
</script>

I only just added ( + document.body.scrollLeft and + document.body.scrollTop)
to the else logic as per what I found on a apple site but I have not tested it yet.

Small Website Guy

7:12 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



In order for the server controls to work with non-IE browers, you need to change your BROSWERCAPS settings, due to a bug in the default configuration file that M$ has refused to fix even when the upgraded the .NET framework to version 1.1.