473,387 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

JavaScript support for handhelds...

wmc
From what I've read, the JavaScript/DOM support is pretty good for
handhelds, but trying a simple page which works on the desktop doesn't
work on pocket IE on the device. I know scripting isn't completely
disabled, because I can use a script block to write a string, but I
haven't been able to call a function to change the string either from a
form button click or by adding another script block that calls the
function. Both of those work on the desktop. In fact, using a script
block to call the function doesn't even work on my device when the
string value is written statically in the HTML (so it doesn't have
anything to do with using the document.write).

Can somebody sort me out? I'm running WM5 ver 5.1.70 on this device
so I assume my Pocket IE must be fairly recent.

thanks

--wmc
* * *

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>Javascript Test Page</title>

<script type="text/javascript">

function uiWrite(bReset) { // works on desktop

var con = document.getElementById("flow");

if (bReset == false) {
con.innerHTML = "STRING: bar";
} else {
con.innerHTML = "STRING: foo";
}
return true;
}

</script>

</head>

<body>

<div id="container">

<p>Test the ability to write HTML into the page using a script. As
the page loads a script writes "STRING: foo". Clicking the input button
rewrites the string. Uses getElementById, innnerHTML and DOM 0 onClick
event handler.</p>

<script type="text/javascript" // works on device and desktop

document.write("<p id=\"flow\">STRING: foo</p>");

</script>

<form>
<input type="button" value="Rewrite as 'bar'"
onClick="uiWrite(false);" />
<input type="button" value="Reset to 'foo'"
onClick="uiWrite(true);">
</form>

</div>

<body>

</html>

Apr 9 '07 #1
3 2532
wmc
Never mind... I'm just not used to using handhelds.

Somehow I wasn't clicking the form button correctly with the stylus.

Apr 9 '07 #2
wmc
After adding test code (typeof) I realized that JavaScript support in
Pocket IE is not as far along as I thought.

document.getElementById is not supported in the pocket IE on this device
but document.All is. Just like the bad old days on the desktop.

I was assuming that IE on all WM5 devices would support getElementById.
Oh well...

--wmc
Apr 9 '07 #3
wmc said the following on 4/9/2007 3:20 PM:
After adding test code (typeof) I realized that JavaScript support in
Pocket IE is not as far along as I thought.

document.getElementById is not supported in the pocket IE on this device
but document.All is. Just like the bad old days on the desktop.
And in *no* version of IE is XHTML supported yet you try to use that
Doctype with IE.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: onetitfemme | last post by:
.. Does anyone know of a smart way to do it? .. There are plenty of users that don't support java, javascript and/or AJAX's XMLHTTPRequest (people with handhelds, PDAs and ...) my app would...
10
by: madtom1999 | last post by:
I've been playing with some javascript code and have produced a very rough proof of concept source code editor written in javascript (a bit like FCKeditor). Its not ready for release ((L)GPL>2 when...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.