Hi.
Is there a way to use a button to go to a url within a doc
I’m familiar with OpenWindow(), but I don’t want it to open a new window, all I want is to go to a page within the doc.
I need it to be a button because I want to use it combined with RunActions().
I thought I could use Activate(@otherpage) or Activate(“http://coda.io/doc…”) but I didn’t work.
OpenWindow('https://coda.io/doc...')
Thank you for your reply but, as I said, I don’t want it to open a new window as it takes too long to load the doc again.
It doesn’t, it opens it in the same tab. I don’t know why they call it OpenWindow, but it should really be called OpenLink
. I just tested it and it works for me.
Hi, @cnr . Are you sure? It didn’t work for me.
OpenWindow (url)
Open a link in a new tab
OpenWindow("https://www.google.com")
An action which when triggered will open a new window with the specified input.
INPUTS
The web address to open
OUTPUT
Outputs an action which (when run) will open url in a new browser tab.
Thank you, @cnr .
OpenWindow() behaves differently depending on the URL. Its opens a new tab when the web address is outside the doc (for instance openWindow(‘www.google.com’) but it opens on the same tab if it’s a URL of a page in the same doc.
I took it for granted because the coda help file doesn’t mention it. They should update it.
@cnr what happens when you publish a doc that contains an OpenWindow formula on the button? If user’s copy the doc to use themselves, does that break the openwindow button?
I don’t know… try it! Would love to hear
Hey Susan!
If you want to have a button navigate to a page within your doc, and have that button continue to work for any copied docs, simply have to button use the OpenWindow() formula on a table/control/named formula as the parameter for the ObjectLink() formula.