Есть такая проблема:
создаю новое окно по нажатию на кнопку в html форме.
приведенный ниже код работает нормально
str = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>"
+ "Poker" + "</title> </head> "
+ "<body bgcolor='#000000' leftmargin='0' marginheight='0' marginwidth='0' rightmargin='0' topmargin='0'>"
+ content + "</body></html>";
wnd.document.write(str);
wnd.document.close();
return false;
но когда пишу вот так:
то данные окна выводятся Html при загрузке ( а должно после на onclick)
str = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"
+"<html xmlns='http://www.w3.org/1999/xhtml'>"
+"<head>"
+"<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />"
+"<title>Roulette</title>"
+"<script s rc='<{$config.site.url}>js/menu/SpryMenuBar.js' type='text/javascript'></script>"
+"<link href='<{$config.site.url}>css/menu/SpryMenuBarHorizontal.css' rel='stylesheet' type='text/css' />"
+"</head>"
+"<body>"
+"<div style='z-index:1;position: absolute;'>"
+"<table border='2' cellpadding='0' cellspacing='0' >"
+" <tr><td style='background-color:#fff' >"
+" <div style='z-index:-10;padding:0;margin:0'>"
+" <applet code='Roulette' archive='<{$game.jar}>' width='907' height='585'>"
+" <param name='sid' value='<{$game.session_id}>'/>"
+" <param name='lang' value='en' />"
+" </applet>"
+" </div>"
+" </td></tr>"
+" <tr><td>"
+" <div style='z-index:50'>"
+" <ul id='MenuBar1' class='MenuBarHorizontal'>"
+" <li><a class='MenuBarItemSubmenu' href='#'>Games</a>"
+" <ul>"
+" <li><a href='<{$config.site.url}>game/game_roulette' >Roulette</a></li>"
+" <li><a href='<{$config.site.url}>game/game_blackjack'>Blackjack</a></li>"
+" <li><a href='<{$config.site.url}>game/game_starfish' >Starfish slot</a></li>"
+" <li><a href='<{$config.site.url}>game/game_pirates' >Pirates slot</a></li>"
+" </ul>"
+" </li>"
+" <li> </li>"
+" <li><a href='/buy_chips/'>Buy chips</a></li>"
+" <li style='width:200px'><a href='#'>Play for real money</a></li>"
+" <li> </li>"
+" <li><a class='MenuBarItemSubmenu' href='#'>Menu</a>"
+" <ul>"
+" <li><a href='/show_info_using_smth'>Game info</a></li>"
+" <li><a href='<{$config.site.url}>logout'>Log out</a></li>"
+" <li><a href='<{$config.site.url}>cash_out'>Cash out</a></li>"
+" </ul>"
+" </li>"
+" <li style='width:68px;'> </li>"
+"</ul>"
+" <{$game.session_id}>"
+"</DIV>"
+"</td></tr></table>"
+"<script type='text/javascript'>"
+" var MenuBar1 = new Spry.Widget.MenuBar('MenuBar1', {imgDown:'<{$config.site.url}>css/menu/SpryMenuBarDownHover.gif', imgRight:'<{$config.site.url}>css/menu/SpryMenuBarRightHover.gif'});"
+"</script>"
+"</div>"
+"</body>"
+"</html> ";
wnd.document.write(str);
wnd.document.close();
return false;
}
в результате в страницу вылазят левые плюсы:
" +"
" +"
" +"
" +"
* " +" Games" +"
o " +" Roulette
o " +" Blackjack
o " +" Starfish slot
o " +" Pirates slot
" +" " +"
* " +"
* " +" Buy chips
* " +" Play for real money
* " +"
* " +" Menu" +"
o " +" Game info
o " +" Log out
o " +" Cash out
" +" " +"
* " +"
" +"
" +" " +"