I have a page with a master header and need to go from a second page back to the 'index' to a region. This will get me to the page but I cannot seem to get to the region which is #about.
<a runat="server" href="~Index.aspx" class="smoothScroll">
About
</a>
First you should give the about region an id, and then link to that page and at the end of it add #(our id) like this:
<div id="about"></div>
and in your link:
<a runat="server" href="~/Index.aspx#about" class="smoothScroll">
About
</a>
Related
This is my code
<a :href="page_4_state.data.dealerUrl" class="f-green" target="_blank">
<u>Searching for number</u>
Normally, It will link to another page.
But I want to link to the bottom of the another page.
I see your url dealer in the comment use a "href anchor", like this:
<a :href="page_4_state.data.dealerUrl+'#footer'" class="f-green" target="_blank">
<u>Searching for number</u>
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_href_anchor
I have an index.html that includes:
<li>
<a href="imprint.html#imprint-link">
<div class="main-menu-title">IMPRINT</div>
</a>
</li>
When I click on this item another html file (imprint.html) is loaded, but when I click on Home, which includes the following code to go back to index.html, it doesn't work!
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
What is wrong here?
Update 1: When hovering the mouse over the link I get:
try using this code :
<a href="index.html">
<div class="main-menu-title">HOME</div>
</a>
inplace of :
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
To answer your original question.
What's wrong here?
As a couple kind folks already commented and one person already provided a nice solution, clicking on your original link
href="#index-link"
while you are on the imprint.html page will not take you to your index.html page. Why? Because
<a href="#index-link">
<div class="main-menu-title">HOME</div>
</a>
is saying, "Take me to an element on the current page (imprint.html) that has an ID of 'index-link'. If there is no element with and ID set to index-link, on the imprint.html page, nothing will happen. And, you will stay on the current page because you didn't specify an URL outside of the current page, which is still imprint.html.
So, with that current setup, you will not get to see index.html.
I'm trying to parse a html code for specific content, but the problem I'm running into is that certain websites require you to click a "Show more" button.
When I grab the URL there's no way to tell it I want the full code with the "Show more" button clicked. Is there a way to grab the full source code of the page, because it keeps getting cut off after a point.
Example website: https://play.google.com/store/search?q=fm%20radio&c=apps&hl=en
The source code gets cut off at the "Radio hungary" app, which is the last app that loads automatically.
This even happens when I load everything and then try to view the pages source code.
It ends in:
style="display:none"> Show More </button> <div class="bottom-loading" style="display:none"></div> <div class="footer"> <div class="footer-links-container"> <span class="copyright"> ©2016 Google</span> <a class="footer-link id-no-nav" href="https://play.google.com/intl/en_us/about/play-terms.html" target="_blank"> Site Terms of Service</a> <a class="footer-link id-no-nav" href="http://www.google.com/intl/en_us/policies/privacy/" target="_blank"> Privacy Policy</a> <a class="footer-link id-no-nav" href="http://developer.android.com/index.html" target="_blank"> Developers</a> <a class="footer-link id-no-nav" href="https://play.google.com/artists" target="_blank"> Artists</a> <a class="footer-link id-no-nav" href="https://support.google.com/googleplay/?p=about_play" target="_blank"> About Google</a> </div> </div> </div></div><div class="loading" jscontroller="EgJAl" jsaction="rcuQ6b:rcuQ6b" id="page-load-indicator"></div><div id="instrument-manager-parent"></div><script src="https://wallet.google.com/inapp/lib/buy.js"></script><script
Even if I click the show more button.
The purpose of this is to grab all the URL's of the images, and I can't do this by hand because well.. we have thousands of images.
I believe if you just take advantage of the Javascript HTML DOM methods you can accomplish what you want to achieve.
This will help: http://www.w3schools.com/js/js_htmldom_methods.asp
By using this, you can target specific elements/ids/classes and pull or modify the information you want.
Jquery will also help you a lot with this.
You can solve it using Javascript dom,steps to do are
keep your content in a div element
set its default height as a fixed value
on clicking the show more link execute a javascript function to make the div element height to auto
in this way you can show content excerpt with javascript
If you go for server side, you can create a new page for showing the content.
This is my link to the specific page from another page.
<a href="http://test.com/#test"
and this is my part of page I want to display but it does not work...
<div id="test"><h4>Title of test</h4></div>
I am using WordPress, could it cause the problem?
Change this:
<div id="test">
<h4>
Title of test
</h4>
</div>
to this...
<a name="test">
<h4>
Title of test
</h4>
</a>
You should be able to link to it with this:
Test
In HTML, you can jump to a specific page section by using an anchor tag with a name or id attribute, like:
<a id="test"><h4>Title of test</h4></a>
or
<a name="test"><h4>Title of test</h4></a>
Actually, it looks like name was only for HTML4, ID is what should be used for HTML5 per here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-name
I have a resource called Artists, that is connected to a table called artists. For the view, /artists, I run through the table using a foreach loop to display some of the information. I create links, like so:
<div class="boxxy">
<a href="/artists/{{$artist->id}}" target="_blank" class="anchor-hover">
<img src="{{ $artist->image_path}}" alt="{{$artist->stage_name}}" height="200" width="200">
<span class="details">
<h2>{{$artist->stage_name}}</h2>
<p class="desc">{{$artist->description}}</p>
<span class="pupdate">{{ $artist->city}}, {{ $artist->state}}</span>
<span class="viewlink">Play My City</span>
</span>
</a>
</div>
However, using this, when I click on the image, it takes me to another tab in the browser (to the correct place, like artists/7, but in a different tab). My question is, how do I prevent the page from being opened up in another tab? I would like it just directed in the same tab.
Get rid of target="_blank" in your anchor.