Solved

How to call a html page to a button click

Posted on 2014-04-07
6
257 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
Comment Utility
not able tp copy jabascript function here
0
 
LVL 39

Expert Comment

by:Pratima Pharande
Comment Utility
Create one Javascript function and type this

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

Expert Comment

by:Pratima Pharande
Comment Utility
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 30

Accepted Solution

by:
Marco Gasi earned 210 total points
Comment Utility
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
Comment Utility
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
Comment Utility
<input type="button" value="Main "  onclick="location.href='editFirst.html';" class="Rights">

Open in new window

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

771 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

11 Experts available now in Live!

Get 1:1 Help Now