VBScript to Javascript

wxdqz

New Member
A problem...in a forum...uh-oh!

Here it is:
I have been thinking myself clever by writing all unneccessary code with VBScript and keeping it in a seperate this.vbs file. That way I could load it into the HTML without it being parsed, thus allowing me to create a Robots.txt file to hide the external file from Search Engine Spiders.
Sounds brilliant from an SEO point of view. Unfortuanately VBScript doesn't work in Netscape unless a paid-for plug-in is installed or is run server-side(not likely on most unix). Nice catch for those 10% of baby boomers using it.

I'm not too great at javascript. the conept I am trying unsuccessfully to translate is:

####seperate .vbs file####
Sub text()

DOCUMENT.WRITE "Hello World"

end Sub
***************************



And somewhere in the document you want to call the text write :

<script language="VBScript">
call text()

</script>


seems simple enough. yet I can't seem to translate this concept into javascript to bring into the document.

yes, I have gone the
}
document.write("<H1>Hello World</H1>");
}
then calling it into a
<BODY onLoad="writingjavascript()">
or
<Span(or Div) onClick="writingjavascript()"></div>

both within the HTML and in a seperate file.
Always problems....
Once this is figured out(I know I am close somewhere....)
then I can do the same with image maps, etc leaving only the body content and copywriting for the Spiders to see.

If anyone has a sample of this concept I could use as a guide....much appreciated. Perhaps a sample with
<table>
<tr>
<td>somthing</td>
<td>something else</td>
</tr>
<tr>

leaving the remaining tags in the html to be closed there. Being brought in with
<script language="JavaScript" src=http://www.webdeveloper.com/forum/archive/index.php/"this.js"></script>

Help with this and I will be more then glad to educate on Search Engine Optimization in exchange
 
Back
Top