Hi -

I hope this is the correct newsgroup! (If not, which would be more
appropriate?)

I am developing on a Sprint 6600 running JScript 5.5.5207, PocketPC 2003,
PIE 6.0.

Consider the following: (Drop.html)

<html>
<body>
<script language="JScript">
function getVersion() {
txtVersion.value = ScriptEngine() + " version " +
ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." +
ScriptEngineBuildVersion()
}

function setVal (OBJ, VAL) {
if (VAL=="Yes" || VAL == "No") {
alert ("Old: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
".selectedIndex = " + OBJ.selectedIndex )
OBJ.value = VAL;
alert ("New: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
".selectedIndex = " + OBJ.selectedIndex )
}
}
</script>
<p align="center"><textarea rows="7" cols="33"
name="txtVersion"></textarea></p>
<select class="DRP002" defaultvalue="No" name="DROP1" readonly="true"
size="1" style="COLOR: #ffffff; FONT-STYLE: normal; BACKGROUND-COLOR:
#787878">
<option selected="selected" value="No" x9="636">No</option><option
value="Yes">Yes</option></select>
<p align="center">
<input type="button" value="Version" name="btnVersion"
onclick="getVersion()"></p>
<input type="button" value="Set Yes" name="btnYes" onclick="setVal(DROP1,
'Yes')"></p>
<input type="button" value="Set No" name="btnNo" onclick="setVal(DROP1,
'No')"></p>
</body>
</html>


On my PC, when I run it with IE 6.0 (Windowx XP), I click the button "Set
Yes", the value of DROP1 is set to "Yes" (from "No"), DROP1's selectedIndex
gets set to 1, and Yes get's displayed in the drop down.

On my PDA, when I run it, I click the button "Set Yes", the value of DROP1
is set to "Yes" (from "No"), DROP1's selectedIndex DOES NOT get set to 1,
and No remains displayed in the drop down.

In essence, selectedIndex never get's changed when the value for the drop
down gets changed.

Is this an issue with PIE? Or, is there something I need to do differently
in the PIE version of the script?

Thanks for any help!

Regards,

Mike

Re: PIE/JScript question by Andy

Andy
Thu May 05 11:07:27 CDT 2005

On pIE, all you are doing is changing the value of the selected option, you
are not changing the selection. If you are trying to select an option by
its value, then you'd want to get the options collection from the select
element, find the index of the option item that has the matching value, then
set that as the selectedIndex property of the select element.

Andy.

"Mike G" <xgalatmcx@cxmcast dot net> wrote in message
news:uqml0BOTFHA.336@TK2MSFTNGP09.phx.gbl...
> Hi -
>
> I hope this is the correct newsgroup! (If not, which would be more
> appropriate?)
>
> I am developing on a Sprint 6600 running JScript 5.5.5207, PocketPC 2003,
> PIE 6.0.
>
> Consider the following: (Drop.html)
>
> <html>
> <body>
> <script language="JScript">
> function getVersion() {
> txtVersion.value = ScriptEngine() + " version " +
> ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." +
> ScriptEngineBuildVersion()
> }
>
> function setVal (OBJ, VAL) {
> if (VAL=="Yes" || VAL == "No") {
> alert ("Old: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
> ".selectedIndex = " + OBJ.selectedIndex )
> OBJ.value = VAL;
> alert ("New: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
> ".selectedIndex = " + OBJ.selectedIndex )
> }
> }
> </script>
> <p align="center"><textarea rows="7" cols="33"
> name="txtVersion"></textarea></p>
> <select class="DRP002" defaultvalue="No" name="DROP1" readonly="true"
> size="1" style="COLOR: #ffffff; FONT-STYLE: normal; BACKGROUND-COLOR:
> #787878">
> <option selected="selected" value="No" x9="636">No</option><option
> value="Yes">Yes</option></select>
> <p align="center">
> <input type="button" value="Version" name="btnVersion"
> onclick="getVersion()"></p>
> <input type="button" value="Set Yes" name="btnYes" onclick="setVal(DROP1,
> 'Yes')"></p>
> <input type="button" value="Set No" name="btnNo" onclick="setVal(DROP1,
> 'No')"></p>
> </body>
> </html>
>
>
> On my PC, when I run it with IE 6.0 (Windowx XP), I click the button "Set
> Yes", the value of DROP1 is set to "Yes" (from "No"), DROP1's
> selectedIndex gets set to 1, and Yes get's displayed in the drop down.
>
> On my PDA, when I run it, I click the button "Set Yes", the value of DROP1
> is set to "Yes" (from "No"), DROP1's selectedIndex DOES NOT get set to 1,
> and No remains displayed in the drop down.
>
> In essence, selectedIndex never get's changed when the value for the drop
> down gets changed.
>
> Is this an issue with PIE? Or, is there something I need to do
> differently in the PIE version of the script?
>
> Thanks for any help!
>
> Regards,
>
> Mike
>
>



Re: PIE/JScript question by Mike

Mike
Thu May 05 12:31:26 CDT 2005

Thanks Andy, that is how I ended up solving it. Is there a list of
differences between Javascript on IE and pIE?

Mike

"Andy Dadi" <adadi@online.microsoft.com> wrote in message
news:OKKELAZUFHA.3312@TK2MSFTNGP09.phx.gbl...
> On pIE, all you are doing is changing the value of the selected option,
> you are not changing the selection. If you are trying to select an
> option by its value, then you'd want to get the options collection from
> the select element, find the index of the option item that has the
> matching value, then set that as the selectedIndex property of the select
> element.
>
> Andy.
>
> "Mike G" <xgalatmcx@cxmcast dot net> wrote in message
> news:uqml0BOTFHA.336@TK2MSFTNGP09.phx.gbl...
>> Hi -
>>
>> I hope this is the correct newsgroup! (If not, which would be more
>> appropriate?)
>>
>> I am developing on a Sprint 6600 running JScript 5.5.5207, PocketPC 2003,
>> PIE 6.0.
>>
>> Consider the following: (Drop.html)
>>
>> <html>
>> <body>
>> <script language="JScript">
>> function getVersion() {
>> txtVersion.value = ScriptEngine() + " version " +
>> ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." +
>> ScriptEngineBuildVersion()
>> }
>>
>> function setVal (OBJ, VAL) {
>> if (VAL=="Yes" || VAL == "No") {
>> alert ("Old: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
>> ".selectedIndex = " + OBJ.selectedIndex )
>> OBJ.value = VAL;
>> alert ("New: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name +
>> ".selectedIndex = " + OBJ.selectedIndex )
>> }
>> }
>> </script>
>> <p align="center"><textarea rows="7" cols="33"
>> name="txtVersion"></textarea></p>
>> <select class="DRP002" defaultvalue="No" name="DROP1" readonly="true"
>> size="1" style="COLOR: #ffffff; FONT-STYLE: normal; BACKGROUND-COLOR:
>> #787878">
>> <option selected="selected" value="No" x9="636">No</option><option
>> value="Yes">Yes</option></select>
>> <p align="center">
>> <input type="button" value="Version" name="btnVersion"
>> onclick="getVersion()"></p>
>> <input type="button" value="Set Yes" name="btnYes" onclick="setVal(DROP1,
>> 'Yes')"></p>
>> <input type="button" value="Set No" name="btnNo" onclick="setVal(DROP1,
>> 'No')"></p>
>> </body>
>> </html>
>>
>>
>> On my PC, when I run it with IE 6.0 (Windowx XP), I click the button "Set
>> Yes", the value of DROP1 is set to "Yes" (from "No"), DROP1's
>> selectedIndex gets set to 1, and Yes get's displayed in the drop down.
>>
>> On my PDA, when I run it, I click the button "Set Yes", the value of
>> DROP1 is set to "Yes" (from "No"), DROP1's selectedIndex DOES NOT get set
>> to 1, and No remains displayed in the drop down.
>>
>> In essence, selectedIndex never get's changed when the value for the drop
>> down gets changed.
>>
>> Is this an issue with PIE? Or, is there something I need to do
>> differently in the PIE version of the script?
>>
>> Thanks for any help!
>>
>> Regards,
>>
>> Mike
>>
>>
>
>



Re: PIE/JScript question by David

David
Mon May 09 14:10:27 CDT 2005

I'm not aware of a list of differences.

A list of the JScript features supported in Pocket IE is in the Pocket PC
2003 SDK.

David
------
This posting is provided "AS IS" with no warranties, and confers no rights.

"Mike G" <xgalatmcx@cxmcast dot net> wrote in message
news:O8zrChZUFHA.3932@TK2MSFTNGP10.phx.gbl...
> Thanks Andy, that is how I ended up solving it. Is there a list of
> differences between Javascript on IE and pIE?
>
> Mike
>
> "Andy Dadi" <adadi@online.microsoft.com> wrote in message
> news:OKKELAZUFHA.3312@TK2MSFTNGP09.phx.gbl...
>> On pIE, all you are doing is changing the value of the selected option,
>> you are not changing the selection. If you are trying to select an
>> option by its value, then you'd want to get the options collection from
>> the select element, find the index of the option item that has the
>> matching value, then set that as the selectedIndex property of the select
>> element.
>>
>> Andy.
>>
>> "Mike G" <xgalatmcx@cxmcast dot net> wrote in message
>> news:uqml0BOTFHA.336@TK2MSFTNGP09.phx.gbl...
>>> Hi -
>>>
>>> I hope this is the correct newsgroup! (If not, which would be more
>>> appropriate?)
>>>
>>> I am developing on a Sprint 6600 running JScript 5.5.5207, PocketPC
>>> 2003, PIE 6.0.
>>>
>>> Consider the following: (Drop.html)
>>>
>>> <html>
>>> <body>
>>> <script language="JScript">
>>> function getVersion() {
>>> txtVersion.value = ScriptEngine() + " version " +
>>> ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." +
>>> ScriptEngineBuildVersion()
>>> }
>>>
>>> function setVal (OBJ, VAL) {
>>> if (VAL=="Yes" || VAL == "No") {
>>> alert ("Old: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name
>>> + ".selectedIndex = " + OBJ.selectedIndex )
>>> OBJ.value = VAL;
>>> alert ("New: " + OBJ.name + ".value =" + OBJ.value + "; " + OBJ.name
>>> + ".selectedIndex = " + OBJ.selectedIndex )
>>> }
>>> }
>>> </script>
>>> <p align="center"><textarea rows="7" cols="33"
>>> name="txtVersion"></textarea></p>
>>> <select class="DRP002" defaultvalue="No" name="DROP1" readonly="true"
>>> size="1" style="COLOR: #ffffff; FONT-STYLE: normal; BACKGROUND-COLOR:
>>> #787878">
>>> <option selected="selected" value="No" x9="636">No</option><option
>>> value="Yes">Yes</option></select>
>>> <p align="center">
>>> <input type="button" value="Version" name="btnVersion"
>>> onclick="getVersion()"></p>
>>> <input type="button" value="Set Yes" name="btnYes"
>>> onclick="setVal(DROP1, 'Yes')"></p>
>>> <input type="button" value="Set No" name="btnNo" onclick="setVal(DROP1,
>>> 'No')"></p>
>>> </body>
>>> </html>
>>>
>>>
>>> On my PC, when I run it with IE 6.0 (Windowx XP), I click the button
>>> "Set Yes", the value of DROP1 is set to "Yes" (from "No"), DROP1's
>>> selectedIndex gets set to 1, and Yes get's displayed in the drop down.
>>>
>>> On my PDA, when I run it, I click the button "Set Yes", the value of
>>> DROP1 is set to "Yes" (from "No"), DROP1's selectedIndex DOES NOT get
>>> set to 1, and No remains displayed in the drop down.
>>>
>>> In essence, selectedIndex never get's changed when the value for the
>>> drop down gets changed.
>>>
>>> Is this an issue with PIE? Or, is there something I need to do
>>> differently in the PIE version of the script?