# Creating a variavble to be recognized gloabally

**URL:** <https://forum.kirupa.com/t/creating-a-variavble-to-be-recognized-gloabally/323713>\
**Category:** Uncategorized\
**Created:** [July 13, 2011, 6:11pm UTC](https://forum.kirupa.com/t/creating-a-variavble-to-be-recognized-gloabally/323713 "2011-07-13T18:11:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazerbrains](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lazerbrains](https://forum.kirupa.com/u/lazerbrains)\
**Post date:** [July 13, 2011, 6:11pm UTC](https://forum.kirupa.com/t/creating-a-variavble-to-be-recognized-gloabally/323713/1 "2011-07-13T18:11:56Z")

</div>

I have a site that has button selectable backgrounds. SO you click a button, and it sets the background appropriately. Now later in the site, I want a button send you to a certain frame dependent on which background you chose.

So I think what I need to do is set a Variable when the background is selected, and check for that variable with a conditional statement. however, I don’t know where to begin.

I need to the variable to be global, and I am unsure of the best syntax to use to do this. And also i am not sure how to check for it, and write the conditional statement for it to work.

Can anyone help?
