# How to get URL parameters from the address bar (SOLVED)

**URL:** <https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767>\
**Category:** Questions\
**Created:** [July 29, 2018, 7:24am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767 "2018-07-29T07:24:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![buddhika](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/b/f05b48/32.png) [@buddhika](https://forum.defold.com/u/buddhika)\
**Post date:** [July 29, 2018, 7:24am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/1 "2018-07-29T07:24:16Z")

</div>

Is there a method to retrieve parameters in a URL, for an example, get the “user” param from the a URL like this.

```
http://localhost:2453/html5/index.html/?user=asdfresdfgh

```

I tried to follow the steps given [here](https://forum.defold.com/t/how-to-get-application-start-parameters-in-html5-solved/5888/7) but it seems difficult to understand. Some clear help on this regard is really valuable at the moment.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 29, 2018, 9:06pm UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/2 "2018-07-29T21:06:10Z")

</div>

I would suggest that you get the URL like this:

```
local url = html5.run("location.href")

```

---

<div class="post-metadata">

**Author:** ![buddhika](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/b/f05b48/32.png) [@buddhika](https://forum.defold.com/u/buddhika)\
**Post date:** [August 10, 2018, 10:12am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/3 "2018-08-10T10:12:21Z")

</div>

thanx for helping @britzl😃

---

<div class="post-metadata">

**Author:** ![Nguy\_n\_D\_c](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nguy_n_d_c/32/25240_2.png) [@Nguy\_n\_D\_c](https://forum.defold.com/u/Nguy_n_D_c)\
**Post date:** [January 31, 2024, 8:28am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/4 "2024-01-31T08:28:28Z")

</div>

@britzl hi sir ! how way to parse parameter of url ?

---

<div class="post-metadata">

**Author:** ![Insality](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/insality/32/39737_2.png) [@Insality](https://forum.defold.com/u/Insality)\
**Post date:** [January 31, 2024, 8:55am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/5 "2024-01-31T08:55:57Z")

</div>

There is the example of parsing URL params:

[https://github.com/Insality/druid/blob/master/example/example.gui\_script#L228](https://github.com/Insality/druid/blob/master/example/example.gui_script#L228)

Also you can manipulate current user URL args with this:  
[https://github.com/Insality/druid/blob/master/example/example.gui\_script#L28](https://github.com/Insality/druid/blob/master/example/example.gui_script#L28)

---

<div class="post-metadata">

**Author:** ![Nguy\_n\_D\_c](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nguy_n_d_c/32/25240_2.png) [@Nguy\_n\_D\_c](https://forum.defold.com/u/Nguy_n_D_c)\
**Post date:** [January 31, 2024, 9:15am UTC](https://forum.defold.com/t/how-to-get-url-parameters-from-the-address-bar-solved/25767/6 "2024-01-31T09:15:26Z")

</div>

@Insality oh my sir ! this is result i wish !
