< Back

Document Subject: Change URL with a button or javascript
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#ChangeUrl or http://A555F9/nn.nsf/ByAlias/ChangeUrl

If you want to change a url using a button or javascript here's how:




You need to set  the property window.location

and for best results use window.location.protocol and window.location.host

 

<input type=button value="Close" class="blackBold" onClick="window.location=window.location.protocol +'//'+ window.location.host+'<Computed Value>';">

where computed value could be

"/"+@WebDbName+"/AllCallsByStatusAndOwnerAndVolunteer"

Using window.protocol covers you if the url may be https instead of http.

Notes Domino usually can work out tat http should be https, but it is nice to stick it in.

Hope that is useful.