Solved

How to call a html page to a button click

Posted on 2014-04-07
6
260 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Link not working 6 41
Getting selected value using Jquery 3 20
Html using "Or" in condition 3 24
Hide and Unhide Table 6 24
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
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…
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.

740 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