JS in PIE

Y

Yusuf Haroon

Hi,

I have the following piece of code that works on the Desktop IE and not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 
A

Alex Yakhnin [MVP]

PIE currently supports only a limited set of DHTML.
From the MSDN docs:

"Pocket Internet Explorer 2003 supports HTML 4.01 CSS and XHTML.

Pocket Internet Explorer is HTML 3.2 compliant. Therefore, all HTML tags
that are defined by this standard can be displayed in Pocket Internet
Explorer.

Pocket Internet Explorer 2000 is not fully HTML 3.2 compliant, but it
supports a large subset of the standard and disregards tags that it cannot
parse and display. "
 
Y

Yusuf Haroon

any suggestions on how else I could do this given limitations? how can i
found out whether what i'm doing in the javascript code is compliant with
what PIE support?

Alex Yakhnin said:
PIE currently supports only a limited set of DHTML.
From the MSDN docs:

"Pocket Internet Explorer 2003 supports HTML 4.01 CSS and XHTML.

Pocket Internet Explorer is HTML 3.2 compliant. Therefore, all HTML tags
that are defined by this standard can be displayed in Pocket Internet
Explorer.

Pocket Internet Explorer 2000 is not fully HTML 3.2 compliant, but it
supports a large subset of the standard and disregards tags that it cannot
parse and display. "


--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org


Yusuf Haroon said:
Hi,

I have the following piece of code that works on the Desktop IE and not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 
C

casey chesnut

its just picky:

<html>
<body>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
<script language="JScript">
function newTitle()
{
if(sec1.innerHTML!="")
{sec1.innerHTML=""}
else
{sec1.innerHTML="displaytext"};
}
</script>
</body>
</html>


casey
http://www.brains-N-brawn.com
 
Y

Yusuf Haroon

thnx casey, that did it. so sec1 is already defined?! what if this is what i
wanted the function to actually do

function GetORInfo(section)
{
var layer=document.all["div"+section];
if(layer.innerHTML!="")
{layer.innerHTML=""}
else
{layer.innerHTML=orArray[section]};
}
}

how would i access the layer object to write to a div section that was
passed in as a param?

casey chesnut said:
its just picky:

<html>
<body>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
<script language="JScript">
function newTitle()
{
if(sec1.innerHTML!="")
{sec1.innerHTML=""}
else
{sec1.innerHTML="displaytext"};
}
</script>
</body>
</html>


casey
http://www.brains-N-brawn.com


Yusuf Haroon said:
Hi,

I have the following piece of code that works on the Desktop IE and not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 
Y

Yusuf Haroon

will do. thnx.
casey chesnut said:
dont know off hand.
would cross reference the jscript docs and what PIE will support.
my experience with PIE has been alot of trial-and-error too

casey
http://www.brains-N-brawn.com


Yusuf Haroon said:
thnx casey, that did it. so sec1 is already defined?! what if this is what
i
wanted the function to actually do

function GetORInfo(section)
{
var layer=document.all["div"+section];
if(layer.innerHTML!="")
{layer.innerHTML=""}
else
{layer.innerHTML=orArray[section]};
}
}

how would i access the layer object to write to a div section that was
passed in as a param?

casey chesnut said:
its just picky:

<html>
<body>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
<script language="JScript">
function newTitle()
{
if(sec1.innerHTML!="")
{sec1.innerHTML=""}
else
{sec1.innerHTML="displaytext"};
}
</script>
</body>
</html>


casey
http://www.brains-N-brawn.com


Hi,

I have the following piece of code that works on the Desktop IE
and
not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 
C

casey chesnut

the pocket pc SDK help file has a section called 'Creating Online Content
for Pocket PC'
it shows the tags that are supported
casey
http://www.brains-N-brawn.com

Yusuf Haroon said:
any suggestions on how else I could do this given limitations? how can i
found out whether what i'm doing in the javascript code is compliant with
what PIE support?

Alex Yakhnin said:
PIE currently supports only a limited set of DHTML.
From the MSDN docs:

"Pocket Internet Explorer 2003 supports HTML 4.01 CSS and XHTML.

Pocket Internet Explorer is HTML 3.2 compliant. Therefore, all HTML tags
that are defined by this standard can be displayed in Pocket Internet
Explorer.

Pocket Internet Explorer 2000 is not fully HTML 3.2 compliant, but it
supports a large subset of the standard and disregards tags that it
cannot
parse and display. "


--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org


Yusuf Haroon said:
Hi,

I have the following piece of code that works on the Desktop IE and not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 
C

casey chesnut

dont know off hand.
would cross reference the jscript docs and what PIE will support.
my experience with PIE has been alot of trial-and-error too

casey
http://www.brains-N-brawn.com


Yusuf Haroon said:
thnx casey, that did it. so sec1 is already defined?! what if this is what
i
wanted the function to actually do

function GetORInfo(section)
{
var layer=document.all["div"+section];
if(layer.innerHTML!="")
{layer.innerHTML=""}
else
{layer.innerHTML=orArray[section]};
}
}

how would i access the layer object to write to a div section that was
passed in as a param?

casey chesnut said:
its just picky:

<html>
<body>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
<script language="JScript">
function newTitle()
{
if(sec1.innerHTML!="")
{sec1.innerHTML=""}
else
{sec1.innerHTML="displaytext"};
}
</script>
</body>
</html>


casey
http://www.brains-N-brawn.com


Yusuf Haroon said:
Hi,

I have the following piece of code that works on the Desktop IE and not
PIE.

<html>
<script type="text/javascript">
function newTitle()
{
var layer1;
layer1=document.all["sec1"];
if
(layer1.innerHTML!=""){layer1.innerHTML=""}else{layer1.innerHTML="displaytex
t"};
}
</script>
<a href="javascript:void(0);" onClick="newTitle()">test link</a>
<div id="sec1"><br></div>
sometext
</html>

All it is supposed to do is hide and show text on the link click event.

Any suggestions on how I can get it to work in PIE and ultimately the
opennetcf htmlviewer control (and if not possible any suggestions on
alternative methods)?

Thnx.

Yusuf
 

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