Click to See Complete Forum and Search --> : JavaScript errors - anchors and browsers


adria002
05-06-2004, 01:22 PM
We developed and applicaton for Pocket PC 2003 and now need to move to a Tungsten C running Palm OS 5.2. We have tried a few available web browsers, but seem to like the Web Pro 3 the best.

A problem we keep running into is that our JavaScript code does not seem to function the same, despite the documentation telling us that they are available with this version.

One of the problems involves using anchors.

A standard href (<a href="#bottom">Jump to Bottom</a> ) jumps to the anchor fine, but we need to use a JavaScript onclick function to direct to the correct anchor. Each seems to try to open a new page rather than jumping to the anchor on the current page. It comes out to the web directory and asks you to select a file.

Is anyone aware of
1) a better browser to use
2) a that will allow us to jump to an anchor on the current page using JavaScript on both a Pocket PC and Palm OS

sample code:
<html>
<head>
<title>location.hash Property</title>
<script type="text/javascript">
function goNextAnchor(where)
{
window.location.hash = where;
}
</script>
</head>
<body>
<h1><a id="start" name="start">Top</a></h1>
<form>
<input type="button" name="next" value="NEXT"
onclick="goNextAnchor('sec1')" />
</form>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<hr />
<h1><a id="sec1" name="sec1">Section 1</a></h1>
<form>
<input type="button" name="next" value="NEXT"
onclick="goNextAnchor('sec2')" />
</form>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<hr />
<h1><a id="sec2" name="sec2">Section 2</a></h1>
<form>
<input type="button" name="next" value="NEXT"
onclick="goNextAnchor('sec3')" />
</form>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<hr />
<h1><a id="sec3" name="sec3">Section 3</a></h1>
<form>
<input type="button" name="next" value="BACK TO TOP"
onclick="goNextAnchor('start')" />
</form>
</body>
</html>


Thanks