ThickBox передать переменную в iframe
Ребят, подскажите пожалуйста как передать переменную в модальное окно ThickBox?
По ссылке вот такого вида: pop_up.html?keepThis=true&TB_iframe=true&height=550&width=888 открывается модальное окно, как туда передать еще переменную? и как ее потом использовать? |
Add all other query parameters before the TB_iframe parameters. Everything after the "TB" is removed from the URL.
Передайте параметры GET после ? pop_up.html?myvar=777&keepThis=true&TB_iframe=true &height=550&width=888 А в окне pop_up.html можно разбирать параметры, используя, например следующую функцию
function getParam( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
|
| Часовой пояс GMT +3, время: 23:50. |