RE: DHTML, Javascript and Pocket PC2003

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: James Morley-Smith (Morley-Smith_at_discussions.microsoft.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 03:39:12 -0800

Hi Ross,

I know you said you tried the DIV and SPAN approach but I think you may have
done something wrong as I believe the following should do exactly what you
want. I tested it on my 2003 SE device and it works so it should do the same
on yours.

<html>
<head>
<title>Example 1</title>
<script>

function doSelection(items){
        var s = '<select id="select2">';
        for(i=0; i<items; i++)
                s += '<option>Generated Option ' + (i+1) + '</option>';
        
        s += '</select>';
        
        spanlist2.innerHTML = s;
}

</script>
</head>
<body>

<span id="spanlist1">
<select onchange="doSelection(this.selectedIndex );">
<option>No Options</option>
<option>1 Option</option>
<option>2 Options</option>
<option>3 Options</option>
<option>4 Options</option>
<option>5 Options</option>
<option>6 Options</option>
</select>
</span>

<br>
<br>

<span id="spanlist2">
<select>
</select>
</span>

</body>
</html>

James.

"Ross Coundon" wrote:

> Hi,
>
> I am using an MDAIII or XDAIIs device and I need to be able to code a web
> page in such way as to be able to dynamically change the contents of
> drop-down lists based on user selections. These devices run the Pocket PC
> 2003 operating system.
> I.e. The selected item in one drop-down list affects what is displayed in
> another.
>
> I have tried a number of different ways to achieve this using
> Javascript/DHTML without success.
> I have tried the following:
>
> 1. Using DIV tags and changing the innerHTML attribute.
> 2. Using SPAN tags and changing the innerHTML attribute.
> 3. Using SELECT tags and changing the innerHTML attribute.
> 4. Creating Option objects and adding them to a Select object.
>
> Does anyone know if what I am trying to is possible on these devices with
> this operating system?
>
> Many thanks in advance,
>
> Ross
>
>
>
>
>
>
>
>



Relevant Pages

  • Re: unique web pages in asp.net
    ... > The presentation layer needs to have a front end that is unique for each ... > the asp.net 1.1 ide changes the html "div" tags to span tags. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: can DIV elements be reached?
    ... "There is no legal way to use the name attribute from such tags as ... For the HTML markup operated on MUST NOT contain `div' elements (or `span' ...
    (comp.lang.javascript)
  • Re: can DIV elements be reached?
    ... "There is no legal way to use the name attribute from such tags as ... "We’ll be using getElementsByTagName for getting all divs". ... DIV, SPAN, P, etc. ...
    (comp.lang.javascript)
  • can DIV elements be reached?
    ... "There is no legal way to use the name attribute from such tags as ... div or span, according to the W3C HTML 4.01 specs." ...
    (comp.lang.javascript)
  • Question about syntax of MySQL Loop that populates into JavaScript
    ... populate <div> tags using innerHTML, ... executing javascript:populate150would produce: ...
    (alt.php)