# Button dependent upon Web Viewer URL

**URL:** <https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124>\
**Category:** Questions about Thunkable X\
**Created:** [July 3, 2018, 5:10pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124 "2018-07-03T17:10:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Josh\_Anderson](https://community.thunkable.com/u/Josh_Anderson)\
**Post date:** [July 3, 2018, 5:10pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/1 "2018-07-03T17:10:31Z")

</div>

Is there a way to make variable that checks the current URL for a webviewer so that it knows to either reload the screen or go to another screen depending on the current url when a button is clicked?

---

<div class="post-metadata">

**Author:** ![albert](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/albert/32/4077_2.png) [@albert](https://community.thunkable.com/u/albert)\
**Post date:** [July 3, 2018, 6:00pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/2 "2018-07-03T18:00:07Z")

</div>

Hi there. What do you mean by checking the current URL for a webviewer? Do you mean something like this?

[View link](https://x.thunkable.com/projects/5b3bb775a0aae5c19d8fb0c7/Web_Viewer1/blocks)

![20%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/a/2a9de59cbde1028cbe4552d58b2c9630a7bc261d.png)

---

<div class="post-metadata">

**Author:** ![Josh\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Josh\_Anderson](https://community.thunkable.com/u/Josh_Anderson)\
**Post date:** [July 3, 2018, 7:35pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/3 "2018-07-03T19:35:19Z")

</div>

That looks like it will work, but I think I am doing something wrong.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/5/959d54ce9cc9dd033a15fcd5e973e1aa00644dd0.png)  
It just goes back to the other screen and not changing webpages. Sorry, im still learning the blocks.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 4, 2018, 6:13am UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/4 "2018-07-04T06:13:35Z")

</div>

The algorithm on your image does not work correctly. Try using just one “If do else” block to create all the branches.

---

<div class="post-metadata">

**Author:** ![Josh\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Josh\_Anderson](https://community.thunkable.com/u/Josh_Anderson)\
**Post date:** [July 17, 2018, 1:04pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/5 "2018-07-17T13:04:36Z")

</div>

Sorry for the late response, I was out for the last two weeks. After looking at my code, it looked over complicated.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/4/54e5a30b4f30ef45f331ff1cab903c83d44533ab.png)  
I tried simplifying it, but it still just navigates to the other screen instead of reloading the webviewer. Any thoughts on this?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2018, 1:10pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/6 "2018-07-17T13:10:57Z")

</div>

If you give me a link to your project, then I will correct it. If this project is not for public use, then step-by-step debugging and look at the values ​​that you are comparing. If there is a transition to another screen, then the condition Web\_Viewer2.URL = text in the right block

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2018, 1:18pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/7 "2018-07-17T13:18:26Z")

</div>

I understood. WebViewer.URL stores the value you specified to it initially. When changing the site address, WebViewer.URL does not change its value! This feature of the current version of Thunkable X.

---

<div class="post-metadata">

**Author:** ![Josh\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Josh\_Anderson](https://community.thunkable.com/u/Josh_Anderson)\
**Post date:** [July 17, 2018, 1:20pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/8 "2018-07-17T13:20:31Z")

</div>

I sent you a link in a message.

Thank you!

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2018, 1:27pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/9 "2018-07-17T13:27:39Z")

</div>

Good. I already answered you here and there.

---

<div class="post-metadata">

**Author:** ![bymaho](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bymaho/32/56102_2.png) [@bymaho](https://community.thunkable.com/u/bymaho)\
**Post date:** [October 28, 2019, 4:14am UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/10 "2019-10-28T04:14:46Z")

</div>

Is there a solution yet?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [October 28, 2019, 8:18am UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/11 "2019-10-28T08:18:39Z")

</div>

Unfortunately there is no simple solution. There is only using online, Firebase, HTML and Javascript

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:01pm UTC](https://community.thunkable.com/t/button-dependent-upon-web-viewer-url/34124/12 "2024-11-08T12:01:12Z")

</div>


