You can only have one <title> element

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"

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top