How can I change url location in same window onlick without script for this button:
<button type="submit" name="select" value="true" onclick="window.open('/newurl')" class="btn btn-default2 btn-block"><i class="fa fa-car"></i>Search</button>
Now it goes back 1, but instead I want it to go to some url.
EDIT: how can I do it with javascript instead? HTML
Advertisement
Answer
changing the script
'onclick="location='somewhereelse.html'; return false ', 'cancel');
using a link
<a href="somewhereelse.html" class="styledlikeabutton">Cancel</a>
Best solution if you need to submit the form: redirect from server using a redirect header