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
Solved

put this function behind a button not a link

Posted on 2011-09-08
8
199 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
ID: 36503290
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
ID: 36503294
<input type="button" onclick="history.go(-1)" value="Cancel"/>
0
 

Author Comment

by:zachvaldez
ID: 36514121
Does it matter if my other button is server side?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 40

Expert Comment

by:gurvinder372
ID: 36515810
did you tried the code?
0
 
LVL 13

Expert Comment

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

Author Comment

by:zachvaldez
ID: 36527102
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to read data from SQL server  to sharepoint 2013 ? 3 26
Please explain purpose of GZIP 4 34
Copying table data to one another 15 29
Search Item in Table 2 19
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

856 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