Passing a variable to jsp when reloading an iframe using javascript

Posted by Vee on Stack Overflow See other posts from Stack Overflow or by Vee
Published on 2010-04-28T18:53:29Z Indexed on 2010/04/28 18:57 UTC
Read the original article Hit count: 280

Filed under:
|
|
|
|

In my javascript code I load a jsp page in an iframe and pass some variables like this:

htmlData[i++]="<iframe id=\"mapframe\" frameborder=\"0\" style=\"width:330px;height:300px\" src=\"" + "mapURL.jsp" +"&lat=" + AjxStringUtil.urlComponentEncode("33.65") +"&lng=" + AjxStringUtil.urlComponentEncode("-84.42") +"&accord=" + AjxStringUtil.urlComponentEncode(accord) +"\"></iframe>";

Then I have to reload that jsp page after an action, and I do this:

accord = ui.newHeader.text(); document.getElementById('mapframe').contentWindow.location.reload();

The reload works except that the "accord" variable is not getting updated. When I call it from the jsp, it still has its original value. How do I pass the new value when reloading the iframe/jsp?

It shouldn't make any difference, but I am working with jquery and this is for a Yahoo zimlet.

Thanks.

© Stack Overflow or respective owner

Related posts about js

Related posts about JavaScript