Solved

put this function behind a button not a link

Posted on 2011-09-08
8
196 Views
Last Modified: 2012-05-12
I got this javascript that creates a link,however I need it to place behind button for consistency of design.

<a href="javascript: history.go(-1)">Cancel</a>
0
Comment
Question by:zachvaldez
  • 2
  • 2
  • 2
8 Comments
 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 100 total points
Comment Utility
you should be able to place a button in the href like this or do an onclick on the button
<a href="javascript: history.go(-1)"><input type="button" value = "Cancel"></a>
<input type="button" value="Cancel" onClick="javascript: history.go(-1)">

Open in new window

0
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 100 total points
Comment Utility
<input type="button" onclick="history.go(-1)" value="Cancel"/>
0
 

Author Comment

by:zachvaldez
Comment Utility
Does it matter if my other button is server side?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
did you tried the code?
0
 
LVL 13

Expert Comment

by:haloexpertsexchange
Comment Utility
it should not matter if the other button is server side.
0
 

Author Comment

by:zachvaldez
Comment Utility
That was exactly true. I would equally share the points if I can redo the point allocation again.That was my error and I regret for it. Halo's answer was correct to.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now