0

I changed my website into a mobile website by using the jQuery Mobile framework. To save and overwrite variables to another site, I use a frame and declare the variable like top.variable = "...";.

This was a working for me, but now I use jQuery Mobile it doesn`t keep the variable, it only stops the function.

<form id="login">
    <input href="#" name="name"  id="name" type="text"/>
</form>

<a href="#" id="next" class="ui-disabled" data-role="button" onclick="next()">Send</a>
function next() {   
    top.username = document.getElementById("name").value;
    document.getElementById("nextSite").submit();
}

Can anyone tell me why this is happening?

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339

1 Answers1

0

Why don't you try this?

top.username=document.getElementById("iframeid").contentDocument.top.username;

Community
  • 1
  • 1
Manwal
  • 23,450
  • 12
  • 63
  • 93