Based on your code, GameObject1
is never defined. I think you are wanting to use obj
instead as that is the HTML object for the ID GameObject1
.
I will note however that even obj.loginurl
will still be undefined as you created the child HTML object param
called loginurl
, not a property to the HTML object obj
. (ie. You would have needed to do obj.loginurl = "xx.xx.xx.xx:8080"
to access it the way you seem to want)
To get the child element param
's value, you would want something like obj.children[0].value
which will return the value you set on your loginurl
object. Alternatively, in your current scope you could just call loginurl.value
.
When accessing child elements via obj.children[#]
, it is best to do checks to see if the element at that position exists so you don't throw exceptions everywhere.