HTML/ASPX WinCE question

E

EMW

Hi,

I use the following to start my ASPX:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>index</title>
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">


<script language="JavaScript">
function size()
{
var scr_w = screen.availWidth;
var scr_h = screen.availHeight;
}
</script>
</head>
<body>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P style="FONT-SIZE: xx-large; COLOR: gray; FONT-FAMILY: 'Lucida
Calligraphy'" align="center">Loading........</P>
<P>
<script language="Javascript">
<!--
if (top.location != self.location) {top.location = self.location.href}
//-->
</script>
<script language="JavaScript">
var scr_w =document.body.clientWidth;
var scr_h = document.body.clientHeight;

window.location = 'fshome.aspx?width='+scr_w+',height='+scr_h
</script>
</P>
</body>
</html>

This all is in the index.html file.
Now I want the FSHOME.ASPX page to send the user to the mobile page when he
enters the site-adres.
But for some reason the above file does not continue, the fshome.aspx
doesn't seem to get loaded.

Is there something wrong in the file that windows mobile 2003 does not know?

rg,
Eric
 
A

Adrienne

Hi,

I use the following to start my ASPX:

Well, in the first place, it's terribly bloated, and not even valid markup.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

You should be using Strict for new documents.

You are not defining the language.
<head> <title>index</title>

What an original title! How about something that actually tells the
visitor what they are looking at?
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
Useless.



<script language="JavaScript">
function size()
{
var scr_w = screen.availWidth;
var scr_h = screen.availHeight;
}
</script>

And for people with javascript disabled?
</head>
<body>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>

Why the blank paragraphs?
<P style="FONT-SIZE: xx-large; COLOR: gray; FONT-FAMILY: 'Lucida
Calligraphy'" align="center">Loading........</P>

And people who do not have Lucida Calligraphy? There is no background
color defined. Someone with a gray background is going to not see
anything.
<P>
<script language="Javascript">
<!--
if (top.location != self.location) {top.location = self.location.href}
//-->
</script>
<script language="JavaScript">
var scr_w =document.body.clientWidth;
var scr_h = document.body.clientHeight;

window.location = 'fshome.aspx?width='+scr_w+',height='+scr_h
</script>

Scripts should be in the head section of a document. Script language is
depreciated. You should use <script type="text/javascript">. Again, this
is not going to work for persons without javascript. Better to do a server
side redirect.
 
E

EMW

All this file is doing is detecting what the screensize is and then let te
ASPX program know about it.
If there is a way to not using this, but detect the screensize of the client
from ASPX let me know, otherwise this is the only way to do so.

rg,
Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top