Solved

Button not taking me to the href

Posted on 2016-10-18
3
37 Views
Last Modified: 2016-10-18
<button type="button" class="btn btn-info btn-lg pull-center" href= "page2.php">2. By s EDI Files<br>(through web )</button>

Open in new window


I have this button but its not taking me to page2.php, im not sure why
0
Comment
Question by:Jasmine Ikhreishi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 41848177
Buttons are not links - rather use a link and style it as a button i.e

<a class="btn btn-info btn-lg pull-center" href= "page2.php">2. By s EDI Files<br>(through web )</a>

Open in new window

0
 
LVL 23

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
ID: 41848185
or use onclick
<button type="button" class="btn btn-info btn-lg pull-center" onclick="window.location.href='page2.php'">2. By s EDI Files<br>(through web )</button> 

Open in new window

0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 41848278
Why define an onlick for a button when a <a> looks exactly the same and does the same thing by default?
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question