Web Analytics Made Easy -
StatCounter Need To Place A Table - CodingForum

Announcement

Collapse
No announcement yet.

Need To Place A Table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need To Place A Table

    argh, this script is driving me insane, can anyone take a look at it? i need to have this script

    Result1+="body{font-family:arial,sans-serif; color:#FF9900; font-size:14px; background-color: '#6a6a6a'}\n";
    Result1+="table{font-family:arial,sans-serif; color:#FF9900; font-size:14px; background-color: '#6a6a6a'}\n";
    Result1+=".t{font-family:arial,sans-serif; color:#FF9900; font-size:13px; background-color: '#000000'; background-color: #6a6a6a;}\n";
    Result1+="a:link{color:#FF9900}\n";
    Result1+="a:visited{color:#FF9900}\n";
    Result1+="a:active{color:#FF9900}\n";
    Result1+=".h{font-size:16px}\n";
    Result1+=".l{font-size:16px}\n";
    Result1+="//-->\n";
    Result1+="</style>\n";
    Result1+="<base target='Main'>\n";
    Result1+="</HEAD>\n";
    Result1+="<BODY>\n";
    Result1+="<center><table width="105%" height="100%" border="2" align="center" cellpadding="0" cellspacing="0" bordercolor="#CC0000" bgcolor="#000000">\n";
    Result1+="<tr>\n";
    Result1+="<td valign="top" bgcolor="#000000"><div align='center'>\n";
    Result1+="<form name='JF1' action='javascript:FND(document.JF1.JT1.value)'>\n";
    Result1+="<p><strong>Keywords</strong><br>\n";
    Result1+="<input type='text' name='JT1' size=20>\n";
    Result1+="<br>\n";
    Result1+="<input type='submit' value='Search!'>\n";
    Result1+="</p>\n";
    Result1+="</form>\n";
    Result1+="</div>\n";
    Result1+="<BR>\n";
    if(SearchWord.length>=1){SearchWord=SearchWord.toLowerCase();
    while(SearchWord.indexOf("<")>-1 || SearchWord.indexOf(">")>-1 || SearchWord.indexOf('"')>-1){SearchWord=SearchWord.replace("<","&lt;").replace(">","&gt;").replace('"',"&quot;");}
    this.status="Searching, please wait...";BeginTime=new Date();
    Result1+="<table width='75%' align="center" cellpadding='10' bgcolor="6a6a6a" class='t'>";
    for(j=0;j<8;j++){k=Page[j].length-1;SamePage=false;LineNr=0;
    for(i=0;i<k-2;i++){WordPos=Page[j][i].toLowerCase().indexOf(SearchWord);
    if(WordPos>-1){
    FoundWord=Page[j][i].substr(WordPos,SearchWord.length);
    if(!SamePage){NrRes++;
    Result3+="<P>";
    Result3+=NrRes+". ";
    Result3+="<a class='l' href='"+Page[j][k-2]+"'>"+Page[j][k-3].replace(FoundWord,FoundWord.bold())+"</a><BR>\n";
    Result3+="<I>URL: "+Page[j][k-2]+"&nbsp;&nbsp;</I>";
    Result3+="<I>Size: "+Page[j][k-1]+"k&nbsp;&nbsp;</I>";
    Result3+="<I>Date: "+Page[j][k]+"&nbsp;&nbsp;</I>";
    }SamePage=true;
    if(i<k-3){LineNr++;if(LineNr>2){break;}
    if(Page[j][i].length>350){Result3+="<LI>..."+Page[j][i].substr(WordPos-100,200+FoundWord.length).replace(FoundWord,FoundWord.bold())+"...\n";}
    else{Result3+="<LI>"+Page[j][i].replace(FoundWord,FoundWord.bold())+"\n";}}
    ResFound=true;}}}
    if(!ResFound){
    Result3+="<CENTER><U>No results found!</U></CENTER>\n";}
    Result3+="<P><CENTER>"
    Result3+="<a class='h' href='javascript:history.back()'>Go Back</a>\n";
    Result3+="<a class='h' href='#'>Go to Top </a>\n";
    Result3+="</table></center></BODY></HTML>";
    Result2="<center><B>"+NrRes+"</B> result(s) found";
    Result2+=" for <B>"+SearchWord+"</B>. Search took <B>";
    Result2+=(Math.floor((new Date()-BeginTime)/10)/100)+"</B> second(s).</center><P>";
    this.status="Done";
    this.document.open();
    this.document.write(Result1+Result2+Result3);
    this.document.close();}
    else{this.status="Error: You must enter at least 1 character(s)!";}}


    Into this table,


    <body>
    <div align="center"></div>
    <table width="105%" height="100%" border="2" align="center" cellpadding="0" cellspacing="0" bordercolor="#CC0000" bgcolor="#000000">
    <tr>
    <td valign="top"><div align="center"></div></td></tr>
    </table>
    </body>


    Sorry, Just Realized Theres Not Much Info, What Im Trying To Get Is That First Script, To Write The HTML in that table i already have so that when the search script displays the html, it looks like the previous page...

    Look at the script i have here

    its to the far right
    please help!
    Last edited by Psychoman; Feb 24, 2004, 03:47 PM.

  • #2
    have you thought about using .innerHTML?
    http://www.bluephoenix.uni.cc/

    Comment


    • #3
      I really just have no idea how that works, i narrowed the html part to that, if i had to rewrite that script i have no idea how to go ahead and do that,

      basicly i found this script on hotscripts.com, and im trying to have it work the way i described...

      anyways, ill look into that, and see if i can come up with the answer keeping it in mind

      Thanks for trying, if u have any more ideas let me know
      Psycho

      Comment

      Working...
      X