Link to home
Start Free TrialLog in
Avatar of overgroove
overgroove

asked on

What am i doing wrong?

<HTML>
<HEAD>
</HEAD>
<SERVER>
<!--
function replaceString(oldS,newS,fullS) {
   for (var i=0; i<fullS.length; i++) {
      if (fullS.substring(i,i+oldS.length) == oldS) {
         fullS =
fullS.substring(0,i)+newS+fullS.substring(i+oldS.length,fullS.length)
      }
   }
   return fullS
}

function makenew(searchText,oldS,newS,fullS)
source = "http://www.webcrawler.com/cgi-bin/WebQuery?"+ searchText +""
source.open("r")
info = source.read(999999)
replaceString(oldS,newS,fullS)
if (source.open("r")) {
   target = ""+ searchText +".html"
   target.open("w")
   while (!source.eof()) {
      data = source.read(1)
      target.write(data);
   }
   source.close();
}
   target.flush()
   target.close()
window.location="http://www.spiritone.com/~groovy/" + searchText +".html"
//-->
</SCRIPT>
</SERVER>
<BODY>
<form>
<INPUT TYPE="text" NAME="searchText" SIZE="30"><INPUT TYPE="submit"
VALUE="Search"
onSubmit="makenew(searchText,"Webcrawler","Webscrewed",info)">
</form>
</BODY>
</HTML>

Avatar of rigansen
rigansen

sometimes there's no need to execute the code to see what the error is... so if you just could tell!
ASKER CERTIFIED SOLUTION
Avatar of tecbuilder
tecbuilder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of overgroove

ASKER

ok....  I think that I assumed that the person answering would know what I was trying to do... ok this is a server side javascript program that saves incoming html, replaces certain words and then lets the person load the edited html.. this is the true question...  
I would suggest reposting your question and include a description of the problem (what it's supposed to do and what it's not doing), any errors you are getting, the code, and state that this is a server-side problem.  You also need to watch your email and respond to answers and comments as they are made.  I am not sure if you graded this question or not (I don't believe you did) and after 20 days the question was automatically graded.  I have no control over this.

99% of all JavaScript questions relate to the client-side and unless the description specifically says that the question relates to server-side most people (including myself) believe the question relates to client-side.  Many of the options and tags that server-side has are not known on the client-side (for obvious reasons).

I am sorry that your question was not resolved and I wish I could help more, but I don't know server-side JavaScrip.  I am sure that if you re-post the information I mentioned above, you will get an answer that will work for you.