You can only have one <title> element

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I get this error if I include the following script. I can fix it by
replacing "title" with tmp but wonder why it is looking inside a string for
a tag. Is this a known problem? Got the code from the Internet. Presumably
the author did not have this problem! This happens when I tell vs to run.


Exception Details: System.Web.HttpException: You can only have one <title>
element within the <head> element.

Also, haven/t figured out what "self.name="main" " does. Do you know?

Thanks



function openindex()

{

tmp="title"

OpenWindow=window.open("", "newwin", "height=250,
width=250,toolbar=no,scrollbars="+scroll+",menubar=no");


OpenWindow.document.write('<html><head><title>Title Goes Here</title>');

OpenWindow.document.write('<link rel="stylesheet" href="style.css">');

OpenWindow.document.write('</head><body>');

OpenWindow.document.write('<p>This page was generated by the main
window.</p>');

OpenWindow.document.write('<p><a href="javascript:self.close()">Close</a>
the popup.</p>');

OpenWindow.document.write('</body></html>');

OpenWindow.document.close();

self.name="main"

}
 
Back
Top