Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009

    Unanswered: Adding HTML to data access page

    Im trying to add standard html to my data access page (a 'add to favorites' link). The code is fine, I can stick it on there, I can make it sing and dance with bells and whistles, however, when clicked it says 'error on page' on the status bar, and it fails to add the link to the favorites. Here is the bones of the code

    <SCRIPT LANGUAGE="javascript">
    if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion >= "4.0")
    {document.write("<U><SPAN STYLE='color:blue;cursor:hand;' onClick='window.external.AddFavorite(location.href , document.title);'>Add this page to your favorites</SPAN></U>")}
    //This code posts text if not
    {document.write("Hit CTRL-D to bookmark this page")}

    Its for IE 4 or above. Im using IE 6.
    Ive tried using other similar scripts which have all reacted the same. Ive also added other html elements to it which seem to work fine to.

    Does anyone know why this isnt working?

  2. #2
    Join Date
    May 2009
    For the AddFavorite function to work in IE7, the page must be from a web server, not directly from a local file system, otherwise, you will get a permission denied error (which is the error your javascript logic is generating).



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts