If you mean open a page on current page, use an iframe. https://www.w3schools.com/tags/tag_iframe.ASP
Opens a new window on the same page
Let's say I have a link from a different page and I want to click on it. How do I make a condition to open in that page when I enter from that link one of the modal ones? If you click on link 1 to open the page with the respective mode https://i.imgur.com/fJdyk6x.png
route
<a :href="`/proiect/${project.name}}`">Apartaments </a>
<li class="nav-item one">
<a class="nav-link" id="pp-apartments-tab" data-toggle="tab"
href="#pp-apartments" role="tab" aria-controls="pp-apartments"
aria-selected="true">
<span> Apartaments </span>
<span class="items-counter"> {{ $project->count }} </span>
{{-- <i class="fad fa-building"></i> --}}
</a>
</li>
Is it possible only through the route to do this?
In fact, I want when I click on a link on the main page and it sends me to the other page to open to that tab depending on which link I clicked.
/incomprehensible
But if you want each link to always open in their own fixed tab, use the target in your <a href>
See https://www.w3schools.com/tags/att_a_target.asp
<a :href="/proiect/${project.name}}" target="apartments_tab">Apartaments</a>
If you want your page to open in a new window/tab you can add the target="_blank" attribute to your link.
e.g.
<a target="_blank" class="nav-link" id="pp-apartments-tab" data-toggle="tab" href="#pp-apartments" role="tab" aria-controls="pp-apartments" aria-selected="true">
<span> Apartaments </span>
<span class="items-counter"> {{ $project->count }} </span>
{{-- <i class="fad fa-building"></i> --}}
</a>
Docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a (Look for target attribute)
Actually not works
<a target="_blank" class="nav-link" id="pp-apartments-tab" data-toggle="tab"
href="#pp-apartments" role="tab" aria-controls="pp-apartments"
aria-selected="true">
<span> Apartaments </span>
<span class="items-counter"> {{$project->apartments t}} </span>
{{-- <i class="fad fa-building"></i> --}}
</a>
<a href="{{ route('public.project.view', ['projectNm' => $project->name) }}" target="pp-apartemtns-tab">
Define not works, you can write in simple sentences. We can't help you if we don't understand you.
Apparently I want to open that tab of apartments or houses but when I target nothing nothing happens, absolutely nothing opens, somehow to put wrong?
@laracoft https://i.imgur.com/fJdyk6x.png When I click on the homepage for example on the case link to take me to the page + to open that tab below, not to open apartments directly
Ok, show the rendered HTML instead of the blade file.
Because you use tabs from bootstrap and they just switch tabs in html.
<span> <a href="{{ route('public.project.view', ['projectNm => $project->name, ]) }}" target="pp-houses-tab">{{ $project->houses_count }} case </a> </span>
link from home page
Houses tab in view project
<li class="nav-item one">
<a target="_blank" class="nav-link" id="pp-houses-tab" data-toggle="tab" href="#pp-houses"
role="tab" aria-controls="pp-houses" aria-selected="true">
<span> Houses </span>
<span class="items-counter"> {{$project->houses }} </span>
{{-- <i class="fad fa-house"></i> --}}
</a>
</li>
@myirlik <a target="_blank" class="nav-link" id="pp-houses-tab" data-toggle="tab" href="#pp-houses" role="tab" aria-controls="pp-houses" aria-selected="true">
Your href must be a link, cannot start with #.
And what would be the best solution?
@myirlik you want a new window right? What is the URL you want to load inside this window?
So. I project.view I have that list of tabs and I want when I click on the "houses" icon on the home page, to open project.view and down to open the tab of houses not apartments how to open default
Can you type out the URL? project.view is not a URL.
project/test-project/
route('public.project.view', ['projectNm => $project->name, ]) }}
ok, before we do route(), TEST and see if actually works the way you want first.
<a href="/project/test-project/" target="_blank">Apartaments </a>
<li class="nav-item one">
<a class="nav-link" id="pp-apartments-tab" data-toggle="tab"
href="#pp-apartments" role="tab" aria-controls="pp-apartments"
aria-selected="true">
<span> Apartaments </span>
<span class="items-counter"> {{ $project->count }} </span>
{{-- <i class="fad fa-building"></i> --}}
</a>
</li>
The project page will open, but the apartments will appear below, not the houses tab
Show more HTML, include the houses tab. Also, can you confirm if you are using bootstrap? Which version?
project view:
<li class="nav-item one">
<a target="_blank" class="nav-link" id="pp-houses-tab" data-toggle="tab" href="#pp-houses"
role="tab" aria-controls="pp-houses" aria-selected="true">
<span> Case </span>
<span class="items-counter"> {{$project->houses_items_count}} </span>
{{-- <i class="fad fa-house"></i> --}}
</a>
</li>
<div class="tab-pane fade pp-tab" id="pp-houses" role="tabpanel"
aria-labelledby="pp-houses-tab">
case 'house':
$( "#pp-houses-tab" ).trigger( "click" )
break;
home blade
a href="/project/test-project/" target="_blank">Apartaments </a>
Just like in project view, if you click on the case tab, the houses tab opens at the bottom, I want the home page to open when I click on the case icon, the project page will open and the houses tab will already be opened.
<a href="/project/test-project/#pp-houses-tab" target="_blank">Apartaments </a>
<li class="nav-item one">
<a class="nav-link" id="pp-apartments-tab" data-toggle="tab"
href="#pp-apartments" role="tab" aria-controls="pp-apartments"
aria-selected="true">
<span> Apartaments </span>
<span class="items-counter"> {{ $project->count }} </span>
{{-- <i class="fad fa-building"></i> --}}
</a>
</li>
He'll circle that part of my house but he won't open it, any idea?
Are you on bootstrap? Which version? What is circle that part of my house? Please use simple sentences.
https://i.imgur.com/F73J1G2.png latest version i use
So is there something like bootstrap? Or in general what I want to do
Please or to participate in this conversation.