SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: Nothingness on June 14, 2010, 01:15:51 AM

Title: Javascript shows in the search bar instead of page...
Post by: Nothingness on June 14, 2010, 01:15:51 AM
The javascript code is showing in the search bar when I create a html page, it look like it's happening on all portals that have page feature so I am unsure whether this is a SMF bug or the portal itself. I want to make sure if it's not portal before I report this bug to SMF.

Code: [Select]
<html><head><title>Your Title page here</title>
<h2 align=center>Your Title page here<br>
<script language="Javascript"><!--
var tl=new Array(

texts here
);
var speed=60;
var index=0; text_pos=0;
var str_length=tl[0].length;
var contents, row;

function type_text()
{
  contents='';
  row=Math.max(0,index-7);
  while(row<index)
    contents += tl[row++] + '\r\n';
  document.forms[0].elements[0].value = contents + tl[index].substring(0,text_pos) + "_";
  if(text_pos++==str_length)
  {
    text_pos=0;
    index++;
    if(index!=tl.length)
    {
      str_length=tl[index].length;
      setTimeout("type_text()",1500);
    }
  } else
    setTimeout("type_text()",speed);

}
//--></script>
</head>
<body background="diudau.jpg" bgcolor='#FFFFFF' text='#000000' alink='#ff0000' vlink='#00007f' link='#0000ff' onLoad=type_text()>

<center><form>
<textarea rows=8 cols=60 wrap=soft></textarea>
</form></center>
</body></html>
Title: Re: Javascript shows in the search bar instead of page...
Post by: Nathaniel on June 14, 2010, 02:54:01 AM
You can't use the 'html', 'head', 'title', or 'body' tags within a page or block, they can only be used once on a HTML page and they are defined by SMF.

The bug is with your code, not with SimplePortal or SMF. Moved to the bogus bugs board.
SimplePortal 2.3.8 © 2008-2024, SimplePortal