How does application.showURL() work

Hi,
Does anyone know how application.showURL() works? According to the sample a target window can be a argument. Does target window mean the form name? Or it can only take “_self” and “_blank”?
After showing a dialog based on the main form and returning back to the main form, I called application.showURL(url, ‘_self’) but it doesn’t work. Looks like it doesn’t think the current main form is the current window (“_self”). How does the method application.showURL() find the current window?

Thanks,

_self and _blank refer to either the current window/tab in the browser or a new tab/window in the browser.

This optional parameter is only relevant for webclient purposes.

Paul

Hi happytigger,

What are you trying to achieve?

You could do something like application.showURL(“YourURL”,"_blank/_self,height=500,width=915,status=no,toolbar=no,
menubar=no,left=50,top=100,scrollbars=no,location=no,directories=no,resizable=no")
, but your output(UI) should be a web browser.

I hope that helps

bobpee:
You could do something like application.showURL(“YourURL”,“_blank/_self”,"height=500,width=915,status=no,toolbar=no,
menubar=no,left=50,top=100,scrollbars=no,location=no,directories=no,resizable=no")
, but your output(UI) should be a web browser.

I hope that helps

Thanks for replying.
My app is a web app. I want to use application.showURL(“url”,“_self”) but I don’t want to open this url in the current window becasue the current window is a popup dialog; I want to show the url on the main form. The main form opens the popup dialog and do processing and then close the popup dialog; now it goes back to the main form. I ran application.showURL(“url”,“_self”) in the main form method but the url doesn’t show up with parameter “_self”; it only works with “_blank”. So I think if I should use the parameter “webclient target”.

What is the origin of your “url”? Is it a Servoy generated one or it’s an external link that you want to embed/show/display in Servoy?

I wrote a jsp file to open a window for user downloading files from the server to their own machine.

banff.moon:
I wrote a jsp file to open a window for user downloading files from the server to their own machine.

Hi banff.moon,
I’m not so sure what you mean here with the above.
Does your jsp file use the application.showURL() method or it provides the same functionality as the latter?

I’m sorry. My page was frozen and I thought I didn’t post it successfully.
I wanted to say I have the similar situation. I wrote a jsp and use application.showURL() to display it on the calling form. But it doesn’t work.

bobpee:
What is the origin of your “url”? Is it a Servoy generated one or it’s an external link that you want to embed/show/display in Servoy?

It’s an external link that I want to display in Servoy.

Note that what application.showURL() does is like doing:

window.open(“foo.XXX”,“windowName”, “width=200,height=200,scrollbars=no”);

in javascript (see http://zz.gd/49997b).
foo.XXX could foo.html, foo.jsp, foo.jsf, foo.asp or any other presentation layer.

Achieving the above shouldn’ t be a problem, especially if you intend to only display the link.
What could be a non-trivial task is, if you intend to pass parameters from any of the above layers(assuming that they are not Servoy-generated) to Servoy.

On the hand if foo.XXX is Servoy-generated, then I suppose you’d be better off using Servoy forms and methods to achieve your objective.
Check these tutorials Introduction to Methods, Introduction to Forms, Introduction to Form Objects on http://zz.gd/df038d
and Servoy docs on http://zz.gd/cadce1

Hope that helps

bobpee:
Note that what application.showURL() does is like doing:

window.open(“foo.XXX”,“windowName”, “width=200,height=200,scrollbars=no”);

I think a windowName can be given to application.showURL() besides “_self” and “_blank” but I don’t know if the “windowName” is the form name?

happytigger:
I think a windowName can be given to application.showURL() besides “_self” and “_blank” but I don’t know if the “windowName” is the form name?

I have not done that yet, however, you may give it a try, giving a “windowName” to application.showURL() besides “_self” and “_blank” .

bobpee:
Hi happytigger,

What are you trying to achieve?

You could do something like application.showURL(“YourURL”,"_blank/_self,height=500,width=915,status=no,toolbar=no,
menubar=no,left=50,top=100,scrollbars=no,location=no,directories=no,resizable=no")
, but your output(UI) should be a web browser.

I hope that helps

Hello,
I have tried your code but it seems to have a issue and i tried this…

application.showURL("http://www.google.com","_blank","height=500,width=915,status=no,toolbar=no,menubar=no,left=50,top=100,scrollbars=no,location=no,directories=no,resizable=no") 

but it opens a normal page without the influential of the parameters

Can any one give me some help please with this ?
Thank you

Hi,

I am having some kind of the same problem here…BUT

What I would like to do is to open from the smart cliient some pdf files that are stored on the server. Is this possible?

If yes…how could I do it?

Thank you in advance!

domnulnopcea:
What I would like to do is to open from the smart cliient some pdf files that are stored on the server. Is this possible?

I faced this question in different places in the forum and all I found out is that you can buy a plug-in that would solve the problem, without further explanations. Is there a way to do this without having to appeal for another paid software?

Cheers,

Hi,

What is the name of that plugin? Is the data streamer from it2be?

Thanks

the tools plugin of IT2BE offers this (basic) functionality for free.
(for SmartClient)

Hi there,

I can’t open a web page on Mac in WebClient. Until now I used for both Smart and Web Clients application.executeProgram(‘open’, url);. This works well on my Servoy development, launching the solution on my Mac. But when I upload it on the server and launching from there, WebClient don’t open the web pages.

I tried also with application.showURL(url, “_blank”); only for the WebClient, but with no result.

Can someone help me with this.

Thanks,
Bogdan.

which browser?
did you try another browser?

Maybe your browser sees that as a popup and the popup blocker blocks this.

Hello,

Thanks for reply,

Using application.showURL(), in Safari the popup warning do not appear. On Chrome, Mozilla and Opera it does.