Sign in with
Sign up | Sign in
Your question

javascript multidimensional arrays on Pocket IE - Do they ..

Last response: in Cell Phones & Smartphones
Share
Anonymous
September 16, 2004 10:54:24 PM

Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer (More info?)

Hi There,

Been working on this project with an imminent deadline. Was creating some
code for a webpage to run on Pocket IE.

Coded it fine on desktop IE and the JavaScript uses multidimensional arrays.
The code does not run when on pocket PC and before trying to look at all the
other possibilities for problems I though I would ask if anyone knows
whether JavaScript multidimensional arrays are supported on Pocket Internet
Explorer.

The other command that I do use that I had not used before is
..insertAdjacentHTML, but I am sure that this is OK.

Any help appreciated.

Kind regards

Dave.
Anonymous
September 17, 2004 3:13:25 AM

Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer (More info?)

Further to my last posting, some tedious experimentation has revealed that
the

object.insertAdjacentHTML("BeforeBegin",stringtoinsert);

is what is causing my the javascript on Pocket IE to stop executing.

In my case obect is the ID of a <p> element
e.g.
<p id="MARKER"> </p>

And then I have

MARKER.insertAdjacentHTML("BeforeBegin",stringtoinsert);

So is this command not supported or am I doing something wrong. If it is not
supported how can I insert HTML into my webpage on Pocket IE.

Regards

Dave
Anonymous
September 17, 2004 2:44:13 PM

Archived from groups: microsoft.public.pocketpc (More info?)

On Thu, 16 Sep 2004 18:54:24 +0100, "Dave Smithz" <SPAM FREE WORLD>
wrote:

>Hi There,
>
>Been working on this project with an imminent deadline.

They always are. Beat some sense into your marketing department ;-)

> Was creating some code for a webpage to run on Pocket IE.
>>Coded it fine on desktop IE and the JavaScript uses multidimensional arrays.
>The code does not run when on pocket PC and before trying to look at all the
>other possibilities for problems I though I would ask if anyone knows
>whether JavaScript multidimensional arrays are supported on Pocket Internet
>Explorer.

Yes, they are. IE on PPC (at least, most recent versions) uses
Javascript1.5 which is broadly what is in use by IE5 on desktops.

>The other command that I do use that I had not used before is
>.insertAdjacentHTML, but I am sure that this is OK.

And that's where you're going wrong. PocketIE doesn't support dynamic
content creation. That is, you can't use innerHTML and so on once the
document has loaded.

There are ways round this using XML/XSL for the content, or using a
frameset which 'document.write's the content you want to add. Neither
is especially trouble-free but it can be made to work.

HTH
Cheers - Neil
Anonymous
September 17, 2004 2:46:32 PM

Archived from groups: microsoft.public.pocketpc (More info?)

On Thu, 16 Sep 2004 23:13:25 +0100, "Dave Smithz" <SPAM FREE WORLD>
wrote:


>In my case obect is the ID of a <p> element e.g.
><p id="MARKER"> </p>
>
>And then I have
>
>MARKER.insertAdjacentHTML("BeforeBegin",stringtoinsert);
>
>So is this command not supported or am I doing something wrong. If it is not
>supported how can I insert HTML into my webpage on Pocket IE.

Are you trying to insert the content at runtime or afterwards ?

If it's when you're creating the page, save the content to a variable
and document.write it into the page. Otherwise (after the page has
loaded) you'll need to create a page-reload strategy which collates
parameters (eg from a query string) and creates the content from that
at runtime.

Cheers - Neil
!