accessing a folder from another folder - html

i am currently trying to make a working sign up/in page. The problem lies that i am fairly new to HTML and C# programming and i am wondering how do i access a home.HTML file in a diffrent folder so that when the "Sign up" button is pressed it goes to that home.HTML file. I have to folders. One which name is "Sign up page" and one which name is "Home Page" and i have my sign in/up thing in "Sign up page" but i don't know how so that when the button is pressed it goes to the other folder "Home Page" and opens "home.HTML" even tho in two diffrent folders. Is there any possible way for that? Here is the button that when pressed needs to go to home.html file
<button type="button" class="signup-btn"><Strong>Sign up.</Strong></button>

Inside the button add <a> </a> tag and link the html page. But I recommended you to not use anchor tag inside Button tag.
<button type="button" class="signup-btn"><Strong>Sign up</Strong></button>
recommended:
Sign up
and style it by the class name

You can use anchor tag like
Sign up

Related

HTML button only redirect when clicking the text inside

Was wondering why when I clicked my button in html it wasn't responding later found out that it will only respond and redirect when I clicked the wording inside "Get Started" was wondering why. This is the code I'm using
<div class="main">
<div class="main__container">
<div class="main__content">
<h1>RAID 2 EARN</h1>
<h2>TECHNOLOGY</h2>
<p>We make it easy!</p>
<button class="main__btn">Get Started</button>
</div>
<div class="imgmain">
<img id="main__img" src="/IMGS/picture1.svg"/>
</div>
</div>
</div>
It is because you're actually clicking the anchor tag inside of the button and the button click doesn't have any actions associated with it. The size of the hyperlink is always only the size of its content. You should change your CSS to style your hyperlink to look like a button. Typically, you can do something like this:
<a class="main__btn" href="raid2earn.html">Get Started</a>
This way you're HTML spec compliant and your hyperlink is styled to look like a button but you're using default browser patterns to complete your action.
Your anchor tag is enclosing only the 'Get Started' text instead of the button. This way, only the text becomes a link
Actually, every html element has a job.
<a> for connecting to outer files
<button> for the inside actions
And you can style everyone as you want.
But:
if you still need to use the button and put the a inside and need to be able to click the button and do the action of the a, there are many many ways, some in html, some in css, and others in javascript.
In html, the easiest solution to your issue is to flip the elements, and make the a outside the button like that:
<a href="#">
<button>Click the button now</button>
</a>
This one is just the easiest.
And there are many others in html and css and javascript.
But again, you must use every element in its own purpose.
Sure you are putting a link tag inside a button because you want a button look and feel. just style your a element the way you want your button to look like as suggested above.
Cheers

How to link url or .html page link to CSS button

I have a "migrated.html" page in root directory. How do I add that link to this CSS style button?
<button onclick="#" Migrated</button>
The above html code didn't work for me.
Here is the link to the code set:
https://codepen.io/prateek-vishwas/pen/Rwwpzjo
There are a few different ways to accomplish this.
But, from what I understand, it sounds like you just want an anchor <a> tag with a href attribute that is styled like this button.
You can simply just set the same class on the anchor tag that is on the button, so you should receive
<a href = "url-to-ur-page" class = glossy-button glossy-button--red>Migrated</a>
Why it has to be a button ? Why not use the normal "A" tag and style him like a button ?
<a href="migrated.html" class="glossy-button glossy-button--red">!!!Migrated!!!
</a>
Works in your codepen - ijust moved the migrated text inside the tag
This will work even without javascript.
Anyhow.the js to change the current url is
window.location = 'your url';
<button onclick="window.location='migrated.html';">
Migrated
</button>
which also work in your pen

Django 2.0: back button redirecting to different pages based on where you came from

I'm using Django 2.0 and have a model A with a list view and a detail view. You can go from the list view to the detail view in the following manner:
Button on ListView Html page to go to detail view
<td><a href="{{ a.get_absolute_url }}" class="btn btn-primary" class>View</a></td>
Models.py
def get_absolute_url(self):
return reverse("a:detail", kwargs={'a_id': self.a_id})
Then in the DetailView Html Page I have a button to go back to the detail view.
<a href="{% url 'a:list' %}" class="btn btn-primary" class>Back</a>
where a:list takes you to ListView Html
That is pretty straight forward. However, what if I made this same process for another html page. Then I'd need a second 'back' buttons to go to this new html page. It gets cumbersome really quick.
Is there a way that you can create a button that will go back to whatever page the user came from? This can either be to any page that has a button to go to this page (and you pass in some information that allows you to backtrack this) or maybe you typed in the url and want the back button to go back to whatever page you came from. I'm open to either way.
If you need Back button you can simply use HTTP_REFERER header
Like this:
<a href="{{ request.META.HTTP_REFERER }}" class="btn btn-primary" class>Back</a>
Note: you need to have django.core.context_processors.request in your TEMPLATE_CONTEXT_PROCESSORS.

How do I link two HTML pages with a button? [duplicate]

This question already has answers here:
How do I create an HTML button that acts like a link?
(35 answers)
Closed 7 years ago.
I've got two HTML pages, with one being an opening page for an application and the second being a login page. I have a button on the opening page and I want to be able to click on it and have it take me to the login page. How do I do this?
This will add a button and link it to the login page:
<a href="path_to_login_page">
<button>Take me to the login page</button>
</a>
Change path_to_login_page & Take me to the login page to customize the button. If you already have a customized button and want to use it:
<a href="path_to_login_page">
'Place your button here'
</a>
Personally I would just change the button to a standard anchor. You could still style the link to make it look like a button.
Go home
If the element really must remain a button, you could do this:
<button onclick="location.href='index.html'>Go home</button>
It's not exactly best practice, though.
THIS IS THE SHORTEST AND THE FASTEST WAY TO DO IT:
<a href="login-page.html">
<button> Login Page</button>
</a>
Run and Check it here: https://jsfiddle.net/2zov6q2v/14/

Moving to a tab and a specific location within that tab

I have a page with a link on, and three tabs. Default view is Tab 1
The tabs are below the page fold
The end result should be that, when the person clicks on the link, it should open Tab3 and move the page up so that the user can view the content of the tab.
As it stands now, the user clicks on the link and it opens the tab3, but because the tabs are below the page fold, it seems like nothing is happening.
I want the screen to move down to the tab as well. Im currently using onClick="parent.location='#contact'" to open the tab
This is the code for the link
<form>
<input class="listbutton" type="button" onClick="parent.location='{site_url}
{url_title text="`$action_object->m_listing_info->title`"}/
{route_suffix for="listings"}{$action_object->m_listing_info->listing_id}#contact'"
value="{translate text='contact_owner'}" title="{translate
text='listestablishmentforfree'}">
</form>
This is the code where it's linking to
<li>
<span>{translate text='contact_owner'}</span>
</li>
As you did not have code, so what i can understand i am helping u
$('#anchorID').click(function() {
$("#contacts").focus();
});