www.webdeveloper.com
Results 1 to 9 of 9

Thread: open page at bookmark

  1. #1
    Join Date
    Oct 2004
    Location
    faraway Romania
    Posts
    471

    open page at bookmark

    I would like to know the html code (if it exists) that would open a page (on loading) on a bookmark rather than on the top. The reason I want to do this is because freeservers places ads on the top of my web page and i would like the page to open at its real top, that is just below the freeservers ad . Incidentaly, I have managed to trick them and place my pictures on top of their ads (I have no idea how my http://www.andr3.s5.com/winner.htm PowerPoint crated page manages to to this).

  2. #2
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,275
    Well I have no idea what bookmarks have to do with this, so I'm going to scoot round that and onto the next part of your post.

    Your host gives you free web-space and in return they place ad's on your page. No doubt you will have agreed to some terms and conditions where you give your permission for them to place these ad's on your page. By blocking the ads you are dishonouring your agreement and if your host found out they would probably just terminate your account.

    If you want no-ad's hosting then you have to pay for it, simple as that.

    Edit: Just so you know, an admin on the freeservers forums is a member here, maybe you might want to think twice about trying to hide the ads.
    Last edited by David Harrison; 10-23-2004 at 12:01 PM.
    Every fight is a food fight when you’re a cannibal.

  3. #3
    Join Date
    Oct 2004
    Location
    faraway Romania
    Posts
    471
    Good point lavalamp I wouldnt want to have my account deleted, actually Im pretty happy with freeservers. I wasnt actually trying to hide the ads, what I wanted to do is open the page just below them. Theyre still there, just that the visitor has to scroll up to see them. I will check to see if that contravenes the terms and conditions, and if it does I wont do it. Perhaps I should have said internal link rather than bookmark?

    As for the page that hides the ads, I have no idea why it did that. Its just one page out of more than 30. I have already redesigned that page so that it doesnt hide the ads anymore. But perhaps the freeserver admin that you mentioned would want to see this page so that they can improve their codes so that this wont be possible anymore.

  4. #4
    Join Date
    Jul 2004
    Location
    Sendai, Japan
    Posts
    1,273
    You can do that, but there's a visible jump after your page loads.

    Put this in your head :

    Code:
    <script type="text/javascript" language="JavaScript">
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    }
    //-->
    </script>
    This in your body :

    Code:
     <body onload="MM_goToURL('parent','#title');return document.MM_returnValue">
    And this around your title (the first thing on your page):

    Code:
     <a id="title">YOUR TITLE GOES HERE</a>
    I'm not sure if this is ethically better than hiding the ads though - you're still intentionally trying to avert your users' eyes from the ads.

    And...there's probably an easier way that I don't know about...

  5. #5
    Join Date
    Oct 2004
    Location
    faraway Romania
    Posts
    471
    Well, heres what the agreement says

    Any attempt to modify, obfuscate, undermine or avoid the display of the advertising is considered a violation of this Agreement and the USER's account will be subject to immediate termination.

    I suppose they would consider what I was trying to do as avoiding the display so as I said I'm quite happy with freeservers I think its not worth the risk.

    Thanks anyway bonrouge, perhaps this might come in handy at a later date.

  6. #6
    Join Date
    Mar 2004
    Posts
    3,056
    Originally posted by BonRouge

    This in your body :

    Code:
     <body onload="MM_goToURL('parent','#title');return document.MM_returnValue">
    And this around your title (the first thing on your page):

    Code:
     <a id="title">YOUR TITLE GOES HERE</a>
    Does jumping to an anchor by id only rather than name work in html? I was rather under the impression it only worked in xhtml.

    Also I'm not sure, but I'm assuming that script works only in IE. From what I've seen, code churned out by that thing usually seems to prefer IE proprietary (even when there's a fully cross browser alternative of the) code.

  7. #7
    Join Date
    Jul 2004
    Location
    Sendai, Japan
    Posts
    1,273
    I haven't got a clue. You could be right - in fact you probably are - I tested this on an XHTML page and didn't even think about the difference between that and HTML (which I don't actually know by the way).

    Can you explain this for me?
    Also I'm not sure, but I'm assuming that script works only in IE. From what I've seen, code churned out by that thing usually seems to prefer IE proprietary (even when there's a fully cross browser alternative of the) code.
    What is 'that thing?'
    I'm pretty sure I checked this on Firefox rather than IE, so I don't think it's just for IE, though as I said -it was on an XHTML page. D'oh!

  8. #8
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,275
    Originally posted by Mr Herer
    Does jumping to an anchor by id only rather than name work in html? I was rather under the impression it only worked in xhtml.
    No, HTML too, I'm about 90% sure it works on NN 4.7 as well (v. old browser).

    By "that thing" did you mean Dreamweaver? I've heard that DW is one of the better WYSIWYG editors out there, but it's still no substitute for a human coder.
    Every fight is a food fight when you’re a cannibal.

  9. #9
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    In Netscape 4.x the name fragment identifier is understood but not the id attrib.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles