[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

put this function behind a button not a link

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
zachvaldez
Asked:
zachvaldez
  • 2
  • 2
  • 2
2 Solutions
 
haloexpertsexchangeCommented:
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
 
Gurvinder Pal SinghCommented:
<input type="button" onclick="history.go(-1)" value="Cancel"/>
0
 
zachvaldezAuthor Commented:
Does it matter if my other button is server side?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Gurvinder Pal SinghCommented:
did you tried the code?
0
 
haloexpertsexchangeCommented:
it should not matter if the other button is server side.
0
 
zachvaldezAuthor Commented:
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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now