# Pass parameters to applet

**URL:** <https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278>\
**Category:** Ignition\
**Created:** [April 11, 2012, 10:56pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278 "2012-04-11T22:56:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [April 11, 2012, 10:56pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278/1 "2012-04-11T22:56:12Z")

</div>

in the new version 7.4.1 i am trying to pass a parameter to a project in an applet. I can get it to work with the client using

```auto
http://localhost:8088/main/system/launch/client/projectname.jnlp?param1=value
```

i have tried the following with the applet with no luck

```auto
http://localhost:8088/main/web/applet/client/projectname?param1=value
```

Thank you,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [April 12, 2012, 2:52pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278/2 "2012-04-12T14:52:39Z")

</div>

Hi Jonathan,

You have discovered the current state of development. You can pass parameters to an applet but you can’t do it in the url. You have to use the technique discussed in [this](http://www.inductiveautomation.com/forum/viewtopic.php?f=71&t=7391) thread.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [April 12, 2012, 3:30pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278/3 "2012-04-12T15:30:35Z")

</div>

I did take a look at that post and something must be wrong with the syntax in the thread because i cannot get it to work. using what that post says i used the following code in the html page

```auto
<script>
	var attributes = {
		//"codebase":"http://localhost:8088/main/system/launchbin/",
		"archive":"launchclient.jar",
		"code":"com.inductiveautomation.ignition.client.launch.BootstrapApplet",
		"width":"1660",
		"height":"1864"};
	var parameters = { "classloader_cache":"false",
		"javaws.sr.gateway.addr.0":"localhost:8088:8043/main",
		"javaws.sr.scope":"C",
		"javaws.sr.project":"Sales",
		"javaws.sr.launchts":"1334243571861",
		"javaws.sr.main":"com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook",
		javaws.launchparams=param1;param2;
		javaws.launchparam.param1=Hello
		javaws.launchparam.param2=38
		};
	deployJava.runApplet(attributes,parameters,'1.5');
</script>
```

but the page will not load.

if i change the code so it looks more like the rest of the section as follows the parameter is available, but it does not set the client tag.

```auto
<script>
	var attributes = {
		//"codebase":"http://localhost:8088/main/system/launchbin/",
		"archive":"launchclient.jar",
		"code":"com.inductiveautomation.ignition.client.launch.BootstrapApplet",
		"width":"1660",
		"height":"1864"};
	var parameters = { "classloader_cache":"false",
		"javaws.sr.gateway.addr.0":"localhost:8088:8043/main",
		"javaws.sr.scope":"C",
		"javaws.sr.project":"Sales",
		"javaws.sr.launchts":"1334243571861",
		"javaws.sr.main":"com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook",
		"param1":"Hello",
		"param2":38
		};
	deployJava.runApplet(attributes,parameters,'1.5');
</script>
```

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [April 12, 2012, 4:43pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278/4 "2012-04-12T16:43:43Z")

</div>

Your right, It doesn’t set the client tags for an applet. You have to use the Applet.getParameter call that Carl mentions at the end of the thread.

We put the call in the window InterFrameActived event to grab the values and populate the client tags.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [April 12, 2012, 4:44pm UTC](https://forum.inductiveautomation.com/t/pass-parameters-to-applet/4278/5 "2012-04-12T16:44:41Z")

</div>

thanks. i will do the same.
