I want to get redirect by click on button, I use:
<inputtype="submit" onclick="location.href='first';" value="goSomewhere1"/>
<inputtype="submit" onclick="location.href='second';" value="goSomewhere2"/>
and it workf if is clicked on page http://ADDRESS
but if is clicked when url
is like http://ADDRESS/something
it redirects to http://ADDRESS/something/first
How is it possible to get redirect just before ADDRESS
but not put this value (ADDRESS
) because it could change? (for this example it should get http://ADRESS/first
insted of http://ADDRESS/something/first
)