I am building a long Client List page for a site. There are links on other pages that are to jump to a specific category of client (Industry). Everything's working great except for when testing in Internet Explorer.
I have a link with the following URL:
/about-us/client-list/#environment-conservationJump
On the Client List page, I have the following anchor:
<a id="environment-conservationJump"> </a>
The first time I clicked on the link, it seemed to work, but now, after scrolling up and down the page a bit, if I refresh the page, it will jump to a different point in the page. Not always where another anchor exists, sometimes just part-way through one of the other lists.
In every other browser, everything is working great. I could just set the links to include a query string, and use jQuery to scroll down the page, but I'd prefer to not introduce another function to the page if I don't need to.
Has anyone run into this problem?
Related
I'm having a odd issue with this site I'm building:
http://limetreeyoga.uk
If you click on "about" it takes you to the "about" page but if you refresh the page it takes you back to the home page?
Same with the other pages, its also not showing the "title" tag in the browser? I have no idea why, can anyone help?
Cheers
T
This website uses FRAMES - extremely old (i.e. outdated) technology....
The outer frame always stays the same, that's the reason for the reload problem. Only the inner frames change when you click the menu.
ADDITION: In fact, it seems you have a complete regular (useable) document structure inside the first frame. Try to erase all HTML outside the first <frame> element - that might even work... (although I didn't look into it in detail)
I have a page called "home" with an element with id="element". I have a link on another page that points to this url: "localhost:3000/home#element".
Using Chrome, when I follow the link, it takes me to the home page, but the view isn't scrolled down at all. When I refresh, however, the view automatically scrolls down to #element. It also works when I manually type the URL in.
Why doesn't this work when I'm using a link?
This bug doesn't show up on Firefox.
Probably unrelated but worth mentioning: Sometimes, rarely, when I navigate to the url "localhost:3000/home", the page opens already scrolled down to an apparently random position. It happens so sporadically that I haven't had a chance to do much testing on it. I doubt the two bugs are related, though.
I want to go from homepage of cece.indiana.edu/index.html to cece.indiana.edu/request.html#speaker. Even though I have the id="speaker", my request is not redirected to the specific id "speaker". I can only get this to work when I am on the request page already. Why can't I get this simple thing to work? Also, I've searched and found answers but none have fixed the problem.
Relevant code/snippets:
<h2 id="speaker" name="speaker">Request a Speaker</h2>
URL: cece.indiana.edu/request.html#speaker
If I am on cece.indiana.edu/index.html: I will go to
Scroll onto Navigation bar
Scroll under "get involved"
Click on "request a speaker"
Be redirected to the bottom of the request.html page. - this is not what I want to happen!
What I want it to do, but it is not happening: If I am on cece.indiana.edu/index.html (or any page)
Scroll onto Navigation Bar
Scroll under "get involved"
Click on "request a speaker"
Be redirected to the H2 with the id "speaker".
This not working correctly in Chrome or Firefox, but it has worked in Safari when I've tried it. I want it to work on all browsers.
It's the JavaScript on your page. If all JS is disabled it works fine. There is JavaScript code messing with the page load and specifically with scrolling and animation, so it's not surprising that it's interfering. Your JS even has specific references to URLs that do or do not have #anchors in them.
In this case it seems you are being sent to the bottom of the page because the "smooth scrolling" code in your JS isn't taking into account that the page may already be scrolled part way. Some browsers will "remember" where you had scrolled to last time you loaded a page, so particularly if you use the back button and then click the navigation item again, you'll end up scrolled too far.
If you have the ability to change the JS, you can fix this by making sure the smooth scrolling code ends by checking to make sure it's actually in the right spot, maybe after a small delay.
Whenever I click the "Home" option on my menu (left hand side, frames), a second copy of the menu page appears on the left side of the main window. The html of this link is identical to the other links, which work fine. As I'm just developing the site at the moment, the HTML of all the links is also identical. There is no code difference between this link and the others in any way, only the behavior.
The doubled copy of the menu is a phantom. It will not double itself again, and goes away when any other link, other than the home page, is navigated to. I'm currently in school and this is my first ground-up project, so I'm sure it's something stupid and simple.
Well Aarron, your problem is indeed quite obvious. After looking for hours, the solution the whole time is that your "Home" link is pointed at Index.aspx, which is the page with your frames, instead of Main.aspx. You were thinking of Index as your home page, which it is, but linking there in this context gave you frames within frames, instead of the default opening display page you were aiming for.
Is there a way to make it so the page doesn't shoot to the top of the site when clicking different links in the navigation bar?
e. So say I'm browsing my site and I'm scrolled down a little bit. Then I click on a link that navigates to a different page on my site. It automatically scrolls to the top. Is there a way to make it not do that.
instead of simply linking to a page, you could link to an anchor on that page using
link text
if that anchor is placed properly on the target page, you will not experience the jump back to top every time you link to another page. hope this helps
If this is the problem I'm picturing:
Change your links to point to <a href="#"> or <href="javascript:void(0);">
If you're going to different pages, you can use a link like:
My Link
Down in the page:
<div id="Section5">
Stuff!
</div>
This is the way that the web works. But still you can do a few work a rounds but each one will take a little work.
First option:
When you click on any link on the page, get the margin of the link from the top, then add it as a parameter to this link, and only then do the navigation. (the format of the line will be like page.html#margin-from-top).
Then in the new loaded page, you can look for this value and do the scroll. (I prefer the scrolling with a little duration).
Second option:
Another idea is to stay always on the same page and only change the content of it. you can do that with a little effects too.
It seems, too, like you might want to use a mooTools ScrollTo affect or possibly even invoke an AJAX method like SWFAddress.
Depending on exactly what you're trying to do, you may be able to accomplish it without using any fancy javascript, but it will depend on the inclusion of labels/etc. on your target page (as has been mentioned before).