Help with relative URL on web

Greetings,

the following formula is in a button on a form on web

@URLOpen(“v_view?OpenView”)

Why does this opens the correct view when the button is clicked from a new document but it opens the document’s parent view when its clicked from a saved document?

I actually use this link for src attribute of iframe, it does the same thing.

I am new in web development, sorry if its a basic question - I fiddled with it one day with no success

Thank in advance

Subject: Help with relative URL on web

If there is no leading slash, then the URL is relative to the current path. Try this instead.

@URLOpen(“/” + @WebDbName + “/v_view?OpenView”)

This will open an URL relative to the server path.

Subject: Help with relative URL on web

Watch the URL on the address line as you navigate in your database.

When you are in a view or in a document, the URL is different.

Now if your URL link is relative to the current URL, it will behave differently depending on where you call it from. Relative URL are basically added to the end of the current URL, and sometimes that will provoke unusual results!

It’s a lot safer to compute the full URL using either @formulas such as @WebDbName, or javascript and CGI variables. Start the URL with a / to make it relative to the root path, or start it with http:// to make it fully absolute.

hth

Nicolas Abesdris

Subject: Help with relative URL on web

Thanks guys - the relative to the root url worked great for me