# Using application.showURL problem

**URL:** <https://forum.servoy.com/t/using-application-showurl-problem/7373>\
**Category:** Classic Servoy\
**Created:** [April 20, 2007, 1:42pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373 "2007-04-20T13:42:21Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitty](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kitty](https://forum.servoy.com/u/kitty)\
**Post date:** [April 20, 2007, 1:42pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/1 "2007-04-20T13:42:21Z")

</div>

Hello.

In my Servoy application, I use the application.showURL function to open a web browser with the following URL:

[http://www2.studiebijbel.nl/scripts/Web … n&email=…](http://www2.studiebijbel.nl/scripts/WebObjects.exe/CVBWeb.woa/wa/emailCDROM?name=Test%20for%20CDROM%20application&email=..).

This is a valid URL and on my computer it works corectly.  
I tested the application on another computer and the browser do not open and I have a red message in Servoy bottom bar:

> “If running in client this url is shown in browser : …the url”

Do you have any idea what could be happening?

Thank you,  
Cristina.

---

<div class="post-metadata">

**Author:** ![Jan\_Aleman](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jan\_Aleman](https://forum.servoy.com/u/Jan_Aleman)\
**Post date:** [April 21, 2007, 7:56am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/2 "2007-04-21T07:56:49Z")

</div>

Servoy Developer doesn’t open the URL but if you would run the same method in Servoy Client it will. Try running it in Client.

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [April 21, 2007, 8:06am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/3 "2007-04-21T08:06:48Z")

</div>

We have the same issue IN the client.

for some reason if you have spaces (%20) or so in the url, the url won’t open in the client also.

I have talked to Johan about it and he would look into that.

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 23, 2007, 1:19pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/4 "2007-04-23T13:19:21Z")

</div>

Are you talking about the web client of the smart client.  
And what Servoy/OS/java/browser versions are you using?

I created a simple solution with a button that call showUrl with the above URL and this worked fine.

Rob

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [April 23, 2007, 1:27pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/5 "2007-04-23T13:27:34Z")

</div>

I’m talking about the smart-client!

---

<div class="post-metadata">

**Author:** ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)\
**Post date:** [April 23, 2007, 2:00pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/6 "2007-04-23T14:00:32Z")

</div>

Hi Cristina,

does your url start with “http://” in the method and not with ‘www’ ?

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [April 23, 2007, 2:07pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/7 "2007-04-23T14:07:17Z")

</div>

I have to be precise:

We use it with a link like this:

```auto
application.showURL('file://c:/Offerte test.pdf')

```

This does not work in developer AND smart-client.

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 24, 2007, 8:57am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/8 "2007-04-24T08:57:45Z")

</div>

Try this:

```auto
var f = "file:///tmp/file with space.html"
application.showURL(encodeURI(f))

```

Rob

---

<div class="post-metadata">

**Author:** ![kitty](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kitty](https://forum.servoy.com/u/kitty)\
**Post date:** [April 24, 2007, 11:40am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/9 "2007-04-24T11:40:05Z")

</div>

I run the application after I build it with Servoy runtime builder. In developer the link works ok, in the runtime it doesn`t work.

Is encodeURL() a Servoy function or how can I define it? I have to try it.

Cristina

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 24, 2007, 12:11pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/10 "2007-04-24T12:11:43Z")

</div>

I used encodeURI, with an I, not encodeURL.  
It is a javascript built-in function.

Rob

---

<div class="post-metadata">

**Author:** ![kitty](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kitty](https://forum.servoy.com/u/kitty)\
**Post date:** [April 24, 2007, 1:20pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/11 "2007-04-24T13:20:25Z")

</div>

I solved the problem.

I use instead of  
application.showURL(globals.url)

> application.executeProgram(‘rundll32’, ‘url.dll,FileProtocolHandler’, globals.url)

and now it works fine in runtime.

Cristina

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 24, 2007, 2:29pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/12 "2007-04-24T14:29:04Z")

</div>

Cristina,

Please note that this is very windows-specific.

Rob

---

<div class="post-metadata">

**Author:** ![kitty](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kitty](https://forum.servoy.com/u/kitty)\
**Post date:** [April 25, 2007, 7:49am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/13 "2007-04-25T07:49:11Z")

</div>

Yes, I know but our application is meant to run only on windows.  
Anyway I can`t find a better solution so for the moment it`s ok.

Cristina

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [April 25, 2007, 8:41am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/14 "2007-04-25T08:41:14Z")

</div>

you can do this also for Windows & Mac:

```auto
if(utils.stringMiddle(application.getOSName(),1,7) == "Windows")
{
   application.executeProgramInBackground('rundll32', 'url.dll,FileProtocolHandler',globals.url)
} else
{
if (utils.stringLeftWords(application.getOSName(), 1) == "Mac")
{
   application.executeProgram('open', globals.url);
}
}

```

---

<div class="post-metadata">

**Author:** ![Providence1](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Providence1](https://forum.servoy.com/u/Providence1)\
**Post date:** [March 17, 2010, 6:53pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/15 "2010-03-17T18:53:23Z")

</div>

There seems to be a 2000 character limit to the length of characters you can pass with application.executeProgramInBackground(‘rundll32’, ‘url.dll,FileProtocolHandler’,globals.url)?

Anyone else seeing this?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [March 18, 2010, 8:35am UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/16 "2010-03-18T08:35:32Z")

</div>

thats a limitation of a browser.  
A get request (url in the browser) are max 2000 chars yes for the most browsers.

---

<div class="post-metadata">

**Author:** ![Jan\_Aleman](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jan\_Aleman](https://forum.servoy.com/u/Jan_Aleman)\
**Post date:** [March 18, 2010, 12:18pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/17 "2010-03-18T12:18:23Z")

</div>

> jcompagner:  
> thats a limitation of a browser.  
> A get request (url in the browser) are max 2000 chars yes for the most browsers.

In most cases you can address by changing to post. The http plugin can do posts as well.

---

<div class="post-metadata">

**Author:** ![Providence1](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Providence1](https://forum.servoy.com/u/Providence1)\
**Post date:** [March 18, 2010, 2:28pm UTC](https://forum.servoy.com/t/using-application-showurl-problem/7373/18 "2010-03-18T14:28:29Z")

</div>

So I assume, since I’m passing to Outlook, it acts exactly the same way as if I were passing to, say, Firefox.

Thanks for the 411 on http plugin!
