Hi, I need to create frames in the same page I'm by clicking a link. I tried this but I doesn't work, all remains blank:
--- index.html --- <!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> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.2/jquery.min.js"></script> <title>Test</title> <script type="text/javascript" language="javascript"> //<![CDATA[ $(document).ready(function() { $("a").click(function() { $("body").replaceWith( '<frameset rows="17,*" framespacing="0" >'+ '<frame name="topframe" src="http://www.google.it" marginwidth="0" marginheight="0" noresize scrolling="no" frameborder="0">'+ '<frame name="" src="http://www.google.it" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">'+ '</frameset>' ); return false; }); }); //]]> </script> </head> <body> <a href="#">click</a> </body> </html> When I click the link, all turns blank, the console reports no errors/ warnings. Shoud lI issue some command to force frame to load sources? O r some other command to issue a refresh for the browser?