Hard coding a web page to laod at a certain place - html

I am looking to hard code a html web page so upon loading goes to a set position on the page. Obviously normally it loads and starts at very top and you scroll down.
I know you can do it using link attribute but I am trying to set it forall traffic and hard code it in.
Hope you can help.
Will

Hopefully I understood what you want to do.
Here you can scroll using javascript to the bottom:
http://www.mediacollege.com/internet/javascript/page/scroll.html
If you can use ASPX you can just bring a special item into view:
http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.bringintoview.aspx
Like you said, you can move by using Link anchors (example below goes to anchor 5):
http://www.activevb.de/rubriken/komponenten/index-komponenten.html#anchor5
As far as I remember it was called bookmark, not anchor:
http://www.w3.org/TR/css3-gcpm/#bookmark-level
Hope there is a way cou can solve it or explain it with an small example.
Regards

Related

wants that when I click on the any index hyperlink, then it is displayed on main description page

I have made an web page. There are two iframes
In it. First is of index and second one is description page. I want that when I click on the any index hyperlink, then it is displayed on main description page.
How it will be possible? please give me the HTML code
You can use a button and when clicking it, change the url of the iFrame using Javascript like this:
document.getElementById('iframe-id').src = newLink;
You can use the data-attribute to store the wanted link in your html.
In case you want to do that: It is not possible to react to things outside of an iFrame through an iFrame. So you cannot put a link in iFrame1 and have it reload iFrame2, because those are two different websites and don't see each other.
Now, idk what exactly you are planing to do, but I really hope, that you don't want to make your entire site like that. Using iFrames is really only useful for things like inserting widgets (like Codepen etc.), but should never be used to display information from your own site. If you don't want to copy your html for every site then use PHP. If you don't want to reload your entire webpage (which is pretty much never a problem) you can use AJAX-requests to load parts of your website. (Frameworks like React.js, Angular.js and Vue.js do that for you)

HTML How to Transition Between Pages

I am currently trying to make a transition between pages on a website.
Eg: If a user were on www.example.com/About and they clicked on a link to go to www.example.com/Contact, the about page would fly out to the left, whilst the contact page would fly in from the right.
So far all I could find online was how to do this on the same page with hashtags. But I want to do this with separate pages.
is it possible?
if not is there an alternative and how to do it?
UPDATE
Ok so I did a bit more research and I found this thing called barba.js(http://barbajs.org) that seemed to do what I'm looking for. So I installed the js script file followed the instructions on the site...and it didn't work! All it did was not load my pages correctly and didn't do what it was supposed to do. Anyone know how I can use this(or if there is a better option than barba.js).
-Thanks!
I don't think you can do that with pure html & js, as you load the entire page each time you click on a link if it's not an anchor.
However you can load just a part of the page, and so apply a transition of your choice with Ajax and js
But in the end, you won't really switch from page to page, but only load the parts that you want to update. This is approximately how modern front end frameworks like Angular, React,... are working
Here is a pure js example http://www.w3schools.com/js/tryit.asp?filename=tryjs_ajax_first
Here is a jQuery example http://www.w3schools.com/jquery/ajax_ajax.asp
You are talking about is page transition and it normally happens in SPA (Single Page Application) where there is no hard refresh.
If you are not working in a SPA application I don't think you can do that where you are moving from one page to another by link/button click and a hard refresh happens.
You can choose angularjs one of the famous spa/mvc framework in jvascript and us ui-router to move from one page to another. there are many other you can explore.

How do I add a link back to my main webpage from a page written with mkdocs?

I am building a general website that also has a documentation page. For the docs page I'm using mkdocs. I would like a link in the docs page, ideally in the top right corner, that goes back to my main webpage. I know how to put links inside the docs, but I'd like this to appear like a header. Is there a way to do this?
No, this is not possible at this time. However, this is the subject of issue #989 and may be added in the future.

Site jumping instead of scrolling on first click

I am a noob on coding. I built my site using a template and modified it with Dreamweaver.
Everything is ok to me except one thing. When the page first loads my first click on anything jumps to that section instead of scrolling to it.
I spent a lot of time reading stuff and testing but still don't have a clue how to avoid it. My site is set to go "Dreamscradle.com" and I think think it should start with "Dreamscradle.com/index.html" How do I set it?
Any help will be welcome, Thanks.
This happens because you enter the site without index.html when clicking a link it will redirect to index.html and then add the anchor. You could rewrite your links without index.html to solve the issue.
for example:
Portfolio
To:
Portfolio

Dynamically updating <title>...</title> tag when new target is opened in an iframe

I am working on developing a web site for my soon to be formed business, and I decided to develop a single index page where the nav buttons target an iframe instead of a new window. Is there script I can use in any language that would update the title tag of the index page dynamically every time a new target is loaded in the iframe? I would appreciate any input on this. Thank you very much!
Using jQuery the code would look something like this:
​jQuery(document).ready(function(){
jQuery('#myframe').load(function(){
document.title="new title";
});
});​
But building your website like this has some serious drawbacks you might want to consider:
You will have to think of a way how people will land on the top frame if they find some sub site in their search engine of choice.
The changed page title will probably never be used by search engines as you are setting it with javascript (or the first issue applies).
Frames/Iframes cause memory leaks in IE (http://stackoverflow.com/questions/8407946/is-it-possible-to-use-iframes-in-ie-without-memory-leaks). This might only be a problem if your top frame will not be reloaded from time to time.
There might be problems when people try to print your website.
Your visitors might have problems when they try to bookmark a subsite of your website, as only the top frame will be bookmarked (not the content of the iframe).
...and I am sure there are many more issues with such a solution.