Why does my page actualize on the anchor? - html

When i clicked on this button that i created 1 it makes me go there 2 and that is what i want. But it's what comes after that that is the unwanted result.
When i actualized the page, it will makes me go there again, i can understand why since the url will not change there since it was " [...]index.html#nom " and it will become the same after actualizing the page after i clicked on the button. But when i do something else, like clicking on the button " Accueil " the url will be this [index.html] but it will not make me go at the start of the page but there 3 when i want to be there 4.
So my question is this. Why when i actualize my page without clicking the button or clicking " Accueil" or clicking "Accueil" or the other "Accueil" in the three others pages [à propos ; Tarifs ; Portfolio] that is supposed to make me go at the start of the page " [...]index.html " it will make me go to " Voir mon portfolio " (seen in image 3).
I tried to understand why it doesn't work. But if i understand correctly.
If i use a <a href"#nom"> TEST . When a id="nom" was created before. When i clicked on the " TEST " it will makes me go at the same page, but at the id where it was located in the page. So in my case it works. But when i clicked on other things that's supposed to make me go at the start of the " Accueil" page. it just makes me go at another location.
I tried to use another ID with another anchor just to make the " Accueil " of the page accueil; à propos ; tarifs ; portfolio makes me go to the same anchor located at the start of the page so it will works out. But again, the url will change and it will be this " [...]index.html#haut ". So there go another problem. If i just actualize my page without the #haut it will make go at the location of image4 and if have already clicked on the button ( seen in image 1) then i need to click on the " Accueil" at the top... to go at the top of the page. So it kinds of lost his meaning.
While doing what i'm doing will makes it work. It doesn't work on some cases :
1 : If i'm going to the index page the first time, the url will be " [...] index.html " so it will makes me go at the location of image4.
2 : If i'm clicking on the button seen in image1, the url will change to " [...] index.html#nom ", and if i actualize the page it will makes me go there again. So if i want to go at the start of my page i need to go at the start by scrolling and clicking on Accueil, but it's not that great (since i don't need to click on accueil since i'm already at the start of the page).
I tried looking on the internet, but it only gave me explanation of the anchor and id and it doesn't seem like i did something wrong here so i don't really know.
<body>
<header>
<nav>
<img src="logo.png" alt="Logo Robbie Lens" id="haut">
<div>
Accueil
À propos
Tarif
Portfolio
</div>
</nav>
</header>
<main>
<section class="accueil-introduction">
<div>
<h1>Robbie Lens Photographie</h1>
<p>
Où <em>professionalisme</em> s’allie avec <em>passion</em>. Depuis
plus de 5 ans maintenant, j’exerce mon métier avec la passion
qui m’anime : capturer l’essence de chaque instant.
</p>
UN PROJET ? ÉCRIVEZ-MOI
</div>
<img src="robbie-lens.png" alt="Portrait avec effet de la photographe Robbie Lens" >
</section>
<section class="accueil-photos">
<h2>Mon dernier projet</h2>
<div>
<img src="element-1.png" alt="Twelve apostles - Australie" >
<img src="element-2.png" alt="Wai-O-Tapu - Nouvelle-Zélande" >
<img src="element-3.png" alt="Parc National d’Abel Tasman - Nouvelle-Zélande" >
</div>
<div>
<img src="element-4.png" alt="Lac Rotorua - Nouvelle-Zélande" >
<img src="element-5.png" alt="Milford Sound - Nouvelle-Zélande" >
<img src="element-6.png" alt="Lac Wanaka - Nouvelle-Zélande" >
</div>
<div>
VOIR MON PORTFOLIO
</div>
</section>
<section>
<h2 class="tortue" >Parlons de votre projet</h2>
<form method="get" action="#">
<div class="form-nom-email">
<div class="form-column">
<label for="nom">nom</label>
<input type="text" name="nom" id="nom" required autofocus>
<label for="email">e-mail</label>
<input type="email" name="email" id="email" required >
</div>
<div class="form-column">
<label for="message">Votre message</label><br>
<textarea name="message" id="message" cols="40" rows="4"></textarea required>
<input type="submit" value="ENVOYER" class="cta">
</div>
</div>
</form>
</section>
</main>
<footer>
<img src="logo.png" alt="Logo Robbie Lens" >
<div>
<a target="_blank" href="https://twitter.com/" class="lien-icone">
<img src="twitter.png" alt="Logo Twitter" >
</a>
<a target="_blank" href="https://www.instagram.com/" class="lien-icone">
<img src="instagram.png" alt="Logo Instagram" >
</a>
</div>
</footer>
</body>
Thanks for your answer and if the question was already made and answered i'm sorry.
Have a nice day.

Related

How to hide something when no search result found in angular

In my homepage I have a search bar and a list of user favorite cards. Only If there is no favorited cards on the initial browser load and when a user removed all their favorite cards then it'll show a banner "Add a favorite...".
The problem I have right now is the banner is displaying when I search something on the search-bar and found no favorited card. How do I fix that?. I don't want to show my banner if there is no search result found.
If I do favorites.size == 0 instead then the banner is not showing up at all when browser load or user removed all their cards.
<div class="input">
<form class="search-form">
<input #searchValue id="input-field" class="input-field" type="search"
name="insightSearchFilter" (ngModelChange)="filterChanged($event)" [formControl]="inputCtrl"/>
<p class="hint" *ngIf="inputCtrl.value">
<strong> {{ favorites?.length }} Search Result for </strong><em>"{{ inputCtrl?.value }}".</em>
<strong> The Results listed below are exact matches for your query.</strong>
</p>
</form>
</div>
<div *ngIf="favorites">
<div *ngIf="favorites.length > 0">
<app-card-list [cards]="favorites"></app-card-list>
</div>
<div *ngIf="favorites.length == 0" class="empty-faves-container">
<div class="add-faves-container">
<div class="add-faves-ico"></div>
<div class="text">Add a Favorite</div>
</div>
</div>
</div>
Since you are filtering this.favorites in filterChanged methods. You should apply check for search text also along with length check.
like
(favorites.length == 0 && !(inputCtrl.value))

How to scrape mailto from following page using VBA

i am trying to scrape mailto (href) from a html file, but i am unable to "hit" it.
Any advice is welcome.
<div class="exhibitor-contact">
<div class="col">
<h3>
whatever </h3>
<p>
MLW <br /> whatever<br /> 75008 Paris - France </p>
<p>
<a class='inverse-a-span' href='#tel' id='tel' onclick="return xt_click(this,'C', xtn2, xtpage.replace(/\w*$/, 'exhibitor::tel').replace(/^Exhibitors::/, ''), 'A')">Show Phone Number</a><span style='display:none;'>whatever</span><br /> Send an Email<br /> </p>
</div>
</div>
</section>
Code:
Set my_data = IE.Document.getElementsByClassName("anyclass")
Set mail = IE.Document.getElementsByTagName("a")(0) ActiveSheet.Cells(i, 2).Value = mail.href
Use a css attribute = value selector with ^ starts with operator
Debug.Print ie.document.querySelector("[href^='mailto:']").href

Why does only one image from the two render?

With the following markup, I always get the same look as when for an image that isn't found: its alt and title still there but no pic.
<div class="def-orange">
<h3>Sign Up</h3>
<p>
Which kind of profile would you like?
</p>
</div>
<a href="#Url.Action("RegisterSenior", "Account", new RouteValueDictionary {{"userSide", "contractor" }})">
<img src="images/signup-contractor.png" alt="mans's head sillouheted with safety helmet" title="As a Senior">
</a>
<a href="#Url.Action("RegisterEmployer", "Account", new RouteValueDictionary {{"userSide", "employer" }})">
<img src="/Images/signup-employer.png" alt="mans's head sillouheted with collar and tie" title="As an Employer">
</a>
<div class="def-orange">
Already have an account? #Html.ActionLink("Sign In", "Login", "Account")
</div>
I know both images are present because I can swap them around, and both images display when they are on the right hand one of the two a tags, and neither displays when they are in the left hand a tag.
Change images/signup-contractor.png to /Images/signup-contractor.png

Laravel image issue

im trying to make a profile view for my users, but having an issue when showing the profile photo, because i get the box such like its waiting for the foto but it doesn't shows it, here is the code:
#include('layouts.header')
#include('layouts.navbar')
<div class="media-body">
<a class="pull-left">
<img class="media-object" src="{{Auth::user()->avatar}}" alt = "Foto de perfil">
</a>
<h3>{{Auth::user()->name}}</h3><br>
<h5>Email: {{Auth::user()->email}}</h5>
<h5>Telefono: {{Auth::user()->phone}}</h5>
</div>
#include('layouts.footer')
i have the images saved in public/images/
You may try this (Assumed Auth::user()->avatar returns only the file name like - image.png):
<img
class="media-object"
src="{{asset('images') . '/' . Auth::user()->avatar }}"
alt = "Foto de perfil"
/>

Invoke click in a webbrowser element

I have a webbrowser control (name: WB) in my VB .net form.
I have loaded a webpage in webbrowser. Here is the sample html:
enter code here
<script type="text/javascript">
Sys.WebForms.PageRequestManager._initialize
('ctl00$ContentPlaceHolder1$ScriptManager1', 'form1',
['tctl00$ContentPlaceHolder1$UpdatePanel1',
'ContentPlaceHolder1_UpdatePanel1'], [], [], 90, 'ctl00');
</script>
<div class="row">
<div class="control group alternating">
<h2>Results</h2>
<div id="ContentPlaceHolder1_UpdatePanel1">
<div class="row">
<a id="ContentPlaceHolder1_Repeater1_LinkButton1_0"
href="javascript:__doPostBack('
ctl00$ContentPlaceHolder1$Repeater1$ctl00$LinkButton1','')">
<strong>A. Bleakley Chandler, MD</strong></a><br />
Georgia Medical College<br />Augusta, GA, USA
</div>
<div class="row">
<a id="ContentPlaceHolder1_Repeater1_LinkButton1_1"
href="javascript:__doPostBack('
ctl00$ContentPlaceHolder1$Repeater1$ctl01$LinkButton1','')">
<strong>A. Kyle Mack, MD</strong></a><br />
Ann and Robert H. Lurie Children's Hospital of Chicago<br />
</div>
<div class="row">
<a id="ContentPlaceHolder1_Repeater1_LinkButton1_2"
href="javascript:__doPostBack('
ctl00$ContentPlaceHolder1$Repeater1$ctl02$LinkButton1','')">
<strong>A. Lawrence Ossias, MD</strong></a><br />
Mount Sinai NYC<br />
</div>
<div class="row no-shading">
<div class="pagination-arrows right">
<span>
1 of 100</span>
<a id="ctl00_ContentPlaceHolder1_Repeater1Prev" class="aspNetDisabled ir
prev">prev</a>
<a id="ctl00_ContentPlaceHolder1_Repeater1Next" class="ir next"
href="javascript:__doPostBack('
ctl00$ContentPlaceHolder1$Repeater1Next','')">next</a>
</div>
</div>
</div>
Now I want to click on the first element of Repeater control. My InvokeMember code:
Dim pLink As HtmlElement = WB.Document.GetElementById
("ContentPlaceHolder1_Repeater1_LinkButton1_0")
pLink.InvokeMember("click") 'doesn't work
But due to some unknown reason, the click doesn't fire inside this repeater control. Other links in the page works fine with "invokemember("click")"
like the following one :
Dim pLink As HtmlElement = WB.Document.GetElementById
("ctl00_ContentPlaceHolder1_Repeater1Next")
pLink.InvokeMember("click") 'Works fine..
I tried GeckoFx browser control (geckoanchorelement.click), this did not work. I also tried to send MouseClick thru postmessage api - this also failed.