?
Solved

How to call a html page to a button click

Posted on 2014-04-07
6
Medium Priority
?
263 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
[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
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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
LVL 31

Accepted Solution

by:
Marco Gasi earned 840 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This article discusses how to implement server side field validation and display customized error messages to the client.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

762 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