Hi,
I would like to load an HTML page and execute a little javascript to scroll down to a predefined point on the page where an HTML anchor tag has been placed on the page. Think a scrolling list of 100 dates and I want the page to load and scroll down 30 dates to the current date. It works on my local html page. as shown below
<html>
<body onload="goToAnchor();">
<script type="text/javascript">
function goToAnchor() {
location.href = "file://localhost/Users/fireworxsoftware/Desktop/untitled%20folder/MyHtml.html#myAnchor";
}
</script>
------------------- Then I insert
<a name="myAnchor"></a> ------anywhere in the html at the point I want the page to scroll to on open.
HOWEVER when I load it into the iOS browser using the link below does not execute the JS properly
<html>
<body onload="goToAnchor();">
<script type="text/javascript">
function goToAnchor() {
location.href = "file://specialFolderPath("Documents")My.html#myAnchor";
}
</script>
Could use some help with a href link in IOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Could use some help with a href link in IOS
- Attachments
-
- DataViewcopy3.html.zip
- (640 Bytes) Downloaded 203 times
Re: Could use some help with a href link in IOS
Well it appears that the href link is good. The page loads and no error message is sent but the javascript function won't execute. Perhaps that is just the way it goes. If anyone has found away to get this done please let me know.
Thanks,
Dave
Thanks,
Dave