Solved

How to call a html page to a button click

Posted on 2014-04-07
6
258 Views
Last Modified: 2014-04-08
Let us say i have

<form id="editFirst" action="editFirst.html" method="POST">

I want to call by this button below Let me know how that can achieved

<input type="button" value="Main "  class="Rights">

Thank you
0
Comment
Question by:roy_sanu
6 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39985250
not able tp copy jabascript function here
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39985266
Create one Javascript function and type this

window.location.href = "http://www.google.com";
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 39985268
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 31

Accepted Solution

by:
Marco Gasi earned 210 total points
ID: 39985323
If you're using jQuery, you can simple add a listener:

<input id="editFirstButton" type="button" value="Main "  class="Rights">

$(document).ready(function(){
    $('#editFirstButton').on('click', function(){
        window.location.href('your_page.html');
    });
}); //end jquery

Open in new window

0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39985331
function clickRights()
{
  document.forms[0].submit();
}

<form id="editFirst" action="editFirst.html" method="POST">



<input type="button" value="Main "  class="Rights" onClick='clickRights()'>

Open in new window

0
 
LVL 1

Expert Comment

by:Rajiv Lochan Padhi
ID: 39985968
<input type="button" value="Main "  onclick="location.href='editFirst.html';" class="Rights">

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now