Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    code not seen on page

    I have a small javascript code on my page that allows someone to save the page to be bookmarked ( which I got from here) and it looks okay in explorer. I have a css file attached as well and in that file, the links are made to look a certain way.

    But in netscape, I can not see anything from this code.
    "Add to Favourites" isn't even seen, nothing.

    Am I doing anything wrong or silly question, is this a problem with netscape and can I fix it?


    thank you

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Show the code. It's probably a check in the code itself that makes the decision whether to display the link since the way you add a favorite in IE isn't the same as adding a bookmark in Netscape.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    to external.addFavourite property is proprietary to IE. Unfortunately there is no Netscape equivalent.

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    In addition for IE :

    I created a shortcut creator, which allows an user to save hir favorite site as an shortcut that can be placed eg. in Desktop. Thought, you'd be interested :

    Code:
    <!-- Example Written by Zvona -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html>
    <head>
    	<title></title>
    	<meta http-equiv="content-type" content="text/html;charset=iso-8859-1;">
    	<script type="text/javascript">
    	function zBookmark()
    	{
    		sPageName	= (arguments[0])?arguments[0]:"default.url";
    		document.writeln("[DEFAULT]");
    		document.writeln("BASEURL=http://www.google.com/");
    		document.writeln("[InternetShortcut]");
    		document.writeln("URL=http://www.google.com/");
    		document.writeln("Modified=F05B73A1A279C2013D");
    		document.writeln("IconFile=http://www.google.com/favicon.ico");
    		document.writeln("IconIndex=1");
    		document.execCommand("SaveAs",false,sPageName);
    		history.back();
    	}
    	</script>
    </head>
    <body>
    	<form name="saveMe">
    		<input type="button" value="Create a bookmark" onclick="zBookmark('Google.url');" />
    	</form>
    </body>
    </html>
    Zvona
    First Aid for
    Web Design

  • #5
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, thanks everyone.

    I'll have to get the code tomorrow since I am not at home. But if it helps I do believe I got the code at the javascriptkit url.

    And that desktop code Zvona, I actually like that idea. Thanks for posting it here.



    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <SCRIPT LANGUAGE=JavaScript>var lookup=navigator.appVersion
    aol = (lookup.indexOf("AOL") > 0 );
    if (aol) // Only true for AOL
    {
    document.write("Add to favourites!");
    }
    else
    {
    ie4 = ((navigator.appName == "Microsoft Internet Explorer") &&
    (parseInt(navigator.appVersion) >= 4 ));
    if (ie4) // Only true for MSIE
    {
    var url="your_URL";
    var title="your page title";
    document.write('<A HREF="javascript:window.ext');
    document.write('ernal.AddFavorite(url,title);" ');
    document.write('onMouseOver=" window.status=');
    document.write("'Add to favourites! '; return true ");
    document.write('"onMouseOut=" window.status=');
    document.write("' '; return true ");
    document.write('"><font size="-3">Add to favourites!</font></a>');
    }
    }
    ns4 = (navigator.appName == "Netscape");
    if (ns4) // Only true for Netscape
    {
    document.write("Press CTRL+D to Add to favourites!");
    }
    </SCRIPT>
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    I found it
    I didn't do much but change what I was allowed to do. So, this is pretty much the original code.

    But I now think half of not seeing that code has to do with my background being black?
    Last edited by undyingfires; 10-29-2002 at 01:25 PM.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would guess that since the code you showed does display a message to use CTRL-D to add a bookmark in Netscape that your background color may be the problem. Make sure your text color is also set at the same point where you set the background color.

  • #7
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, nonetheless thanks to all
    I'll have to change that colour or my text - whichever come first (:


  •  

    Posting Permissions

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