javascript - Operations with window.open -
i have javascript code opens page doing following: location.href("newpage.cfm?param1=xxx¶m2=yyy");
the "newpage" must return previous, passgin parameters, this:
location.href("prevpage.cfm?param1=www¶m2=kkk")
.
now, want same thing, open newpage, using:
window.open
my question is: how can return previous page, closing new 1 (window.close
), passing new parameters?
you can access previous window using window.opener
. http://www.w3schools.com/jsref/prop_win_opener.asp
so need change code to:
window.opener.location.href("prevpage.cfm?param1=www¶m2=kkk"); window.close();
this in opened window.
Comments
Post a Comment