I Have one register form that I need to be submitted to subdomain, subdomain register form its using security token key. What I need is to take the security token from subdomain and use it on main domain using javascript.
Example of subdomanin token key:
<input name="security_token" value="7ba88acf1fade1e1c26d7f7a885564f2" type="hidden">
I need to get the above key and use it on main domanin registration form :
<input type="hidden" name="security_token" value="security key" />
I tried this on main domain but failed :
<input name="security_token" value="searchTxt" type="text" id="searchTxt">
<script>
var input = document.getElementsByName("security_token")[0].value;
function searchURL() {
window.location = "http://www.subodmain.myurl.com/register" + input.value;
}
</script>
Anyone can edit my script in and make it work ? Thank you.