You can only have one <title> element

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AAaron123

    You can only have one <title> element

    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.Http Exception: You can only have one <title>
    element within the <headelement.

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

    Thanks



    function openindex()

    {

    tmp="title"

    OpenWindow=wind ow.open("", "newwin", "height=250 ,
    width=250,toolb ar=no,scrollbar s="+scroll+",me nubar=no");


    OpenWindow.docu ment.write('<ht ml><head><title >Title Goes Here</title>');

    OpenWindow.docu ment.write('<li nk rel="stylesheet " href="style.css ">');

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

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

    OpenWindow.docu ment.write('<p> <a href="javascrip t:self.close()" >Close</a>
    the popup.</p>');

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

    OpenWindow.docu ment.close();

    self.name="main "

    }


Working...