We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
External html; Yup
Topic Started: Mar 19 2005, 11:14 AM (434 Views)
solinent
Member
[ *  *  * ]
Well, I've done everything to figure out how to create an external html without php, but the only way is to use javascript.

Now, on my website http://www.runescapeapocalypse.com/, I can't use php. So I need some help with the javascript. The only way is to add

document.write('htmlcodinghere');

to every single html coding line, but I have done that, and no script is showing up. Is there anything wrong with this Javascript code?

(there is no syntax errors though, at least my browser says there is none, also it would be easier to copy this code then paste and look through it on note pad, because i can't un-wrap the text.)

Code:
 
<html>
<head>
</head>
<body>
<script language="javascript">
<!--
document.write('stuff");
document.write('<title>RuneScape Apocalypse</title>");
document.write('<P align=\”center\”>");
document.write('<center>");
document.write('<fieldset class=\”fieldset\”>");
document.write('<P ALIGN=\”CENTER\”><img");
document.write('src=\”/pictures/RuneScapeApocalypse.gif\”');
document.write('width=\”700\” height=\”75\”></p>');
document.write('<center>');
document.write('<fieldset class=\”fieldset\”>');
document.write('<legend align=\”center\”><font color=\”#EE0000\”><B>Navigation</b></font></legend>');
document.write('<table cellspacing=\”0\” cellpadding=\”0\” border=\”0\”>');
document.write('<tr><td><br></td></tr>');
document.write('"<tr>");
document.write('');
document.write('<td background=\”/pictures/calculators.png\”> ');
document.write('   <a href=\”/calculators/calcs_main.html\” onMouseOver=\”JSFX.fadeIn(\’calculators\’)\” onMouseOut=\”JSFX.fadeOut(\’calculators\’)\”>');
document.write('<img name=\”calculators\” src=\”/pictures/calculators.png\” width=\”100\” height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('<td background=\”/pictures/forums.png\”> ');
document.write('   <a href=\”http://www.rsapocalypseforums.co.nr/\” onMouseOver=\”JSFX.fadeIn(\’forums\’)\” onMouseOut=\”JSFX.fadeOut(\’forums\’)\”>');
document.write('<img name=\”forums\” src=\”/pictures/home.png\” width=\”100\” height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('<td background=\”/pictures/skill_guides.png\”> ');
document.write('   <a href=\”/skills/_skillsmain.html\” onMouseOver=\”JSFX.fadeIn(\’skill_guides\’)\” onMouseOut=\”JSFX.fadeOut(\’skill_guides\’)\”>');
document.write('<img name=\”skill_guides\” src=\”/pictures/home.png\” width=\”100" height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('<td background=\”/pictures/home.png\”> ');
document.write('   <a href=\”/\” onMouseOver=\”JSFX.fadeIn(\’home\’)\” onMouseOut=\”JSFX.fadeOut(\’home\’)\”>');
document.write('<img name=\”home\” src=\”/pictures/home.png\” width=\”100\” height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('<td background=\”/pictures/quest_guides.png\”> ');
document.write('   <a href=\”/quests/_questsmain.html\” onMouseOver=\”JSFX.fadeIn(\’quest_guides\’)\” onMouseOut=\”JSFX.fadeOut(\’quest_guides\’)\”>');
document.write('<img name=\”quest_guides\” src=\”/pictures/quest_guides.png\” width=\”100\” height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('<td background=\”/pictures/clan_forums.png\”> ');
document.write('   <a href=\”http://www.theapocalypsenation.com/\” onMouseOver="JSFX.fadeIn(\’clan_forums\’)\” onMouseOut=\”JSFX.fadeOut(\’clan_forums\’)">"';
document.write('<img name=\”clan_forums\” src=\”/pictures/clan_forums.png\” width=\”100\” height=\”20\” class=\”imgFader\” border=\”0\”></a></td>');
document.write('');
document.write('</tr>');
document.write('<tr><td><br></td></tr>');
document.write('</table>');
document.write('</fieldset>');
document.write('<table width=\”770px\” bordercolor=\”#ee0000\” border=\”1\” cellspacing=\”0\”>');
document.write('<tr width=\”770\” valign=\”top\”>');
document.write('<td width=\”151\”>');
document.write('<h2 align=\”center\”> Poll </h2>');
document.write('<!-- // Begin Pollhost.com Poll Code // -->');
document.write('<form method=post action=http://poll.pollhost.com/vote.cgi>');
document.write('<table border=0 width=150 bgcolor=#000000 cellspacing=0 cellpadding=2>');
document.write('<tr><td colspan=2><font face=\”Arial\” size=-1 color="#FF0000"><b>Do you like the new magic updates?</b></font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=1></td><td><font face=\”Arial\” size=-1 color=\”#FF0000\”>Yes I'm going to train magic until I get to that level!</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=2></td><td><font face=\”Arial\” size=-1 color="#FF0000">Yes, they are ok</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=3></td><td><font face=\”Arial\” size=-1 color="#FF0000">No, not really</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=4></td><td><font face=\”Arial\” size=-1 color="#FF0000">No, absolutely not! I want better updates!</font></td></tr>');
document.write('<tr><td colspan=2>');
document.write('<input type=hidden name=config value=\”c29saW5lbnQJMTExMTE3Mzg3NgkwMDAwMDAJRkYwMDAwCUFyaWFsCVJlZA\”>');
document.write('<center><input type=submit value=Vote>  <input type=submit name=view value=\”View Results\”>');
document.write('</center>');
document.write('</td></tr>');
document.write('<tr><td bgcolor=#FFFFFF colspan=2 align=right><font face=\”Arial\” size=-2 color="#000000"><a href=http://www.pollhost.com/><font color=#000099>Free polls from Pollhost.com</font></a></font></td></tr>');
document.write('</table></form>');
document.write('<!-- // End Pollhost.com Poll Code // -->');
document.write('</td>');
document.write('<td>');
//-->
</script>
</body>
</html>


This code is allready published at www.runescapeapocalypse.com/template.html, and therefore it is COPYRIGHTED. Thank you for your time!

Hope to see this resolved

ME :P
Offline Profile Quote Post Goto Top
 
mathiaus
Member Avatar
mathiaus maximus™
[ *  *  *  *  *  * ]
ever thought of getting a host a host that allows php? And why exactly do you have to use document.write? Have i missed something? :unsure:

anyway
Code: HTML
 
<script language="text/javascript">


How are linking to this as well? You may find this topic helpful! (doesnt just apply to IF
http://support.invisionfree.com/index.php?showtopic=42682
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
What is the point of having all your HTML written out by Javascript? :huh:

Why not just use pure HTML?
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
I really wish there was some kind of Heredoc in JS.. but anyway. You had some errors in the script. You have to make sure that your line starts with document.write(' and ends with ');, you also only have to escape single quotes in this case. \" isn't needed in this case.

Fixed code:

Code:
 
<script language="javascript">
<!--
document.write('stuff');
document.write('<title>RuneScape Apocalypse</title>');
document.write('<P align="center">');
document.write('<center>');
document.write('<fieldset class="fieldset">');
document.write('<P ALIGN="CENTER"><img');
document.write('src="/pictures/RuneScapeApocalypse.gif"');
document.write('width="700" height="75"></p>');
document.write('<center>');
document.write('<fieldset class="fieldset">');
document.write('<legend align="center"><font color="#EE0000"><B>Navigation</b></font></legend>');
document.write('<table cellspacing="0" cellpadding="0" border="0">');
document.write('<tr><td><br></td></tr>');
document.write('<tr>');
document.write('');
document.write('<td background="/pictures/calculators.png"> ');
document.write('   <a href="/calculators/calcs_main.html" onMouseOver="JSFX.fadeIn(\'calculators\')" onMouseOut="JSFX.fadeOut(\'calculators\')">');
document.write('<img name="calculators" src="/pictures/calculators.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('<td background="/pictures/forums.png"> ');
document.write('   <a href="http://www.rsapocalypseforums.co.nr/" onMouseOver="JSFX.fadeIn(\'forums\')" onMouseOut="JSFX.fadeOut(\'forums\')">');
document.write('<img name="forums" src="/pictures/home.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('<td background="/pictures/skill_guides.png"> ');
document.write('   <a href="/skills/_skillsmain.html" onMouseOver="JSFX.fadeIn(\'skill_guides\')" onMouseOut="JSFX.fadeOut(\'skill_guides\')">');
document.write('<img name="skill_guides" src="/pictures/home.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('<td background="/pictures/home.png"> ');
document.write('   <a href="/" onMouseOver="JSFX.fadeIn(\'home\')" onMouseOut="JSFX.fadeOut(\'home\')">');
document.write('<img name="home" src="/pictures/home.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('<td background="/pictures/quest_guides.png"> ');
document.write('   <a href="/quests/_questsmain.html" onMouseOver="JSFX.fadeIn(\'quest_guides\')" onMouseOut="JSFX.fadeOut(\'quest_guides\')">');
document.write('<img name="quest_guides" src="/pictures/quest_guides.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('<td background="/pictures/clan_forums.png"> ');
document.write('   <a href="http://www.theapocalypsenation.com/" onMouseOver="JSFX.fadeIn(\'clan_forums\')" onMouseOut="JSFX.fadeOut(\'clan_forums\')">"');
document.write('<img name="clan_forums" src="/pictures/clan_forums.png" width="100" height="20" class="imgFader" border="0"></a></td>');
document.write('');
document.write('</tr>');
document.write('<tr><td><br></td></tr>');
document.write('</table>');
document.write('</fieldset>');
document.write('<table width="770px" bordercolor="#ee0000" border="1" cellspacing="0">');
document.write('<tr width="770" valign="top">');
document.write('<td width="151">');
document.write('<h2 align="center"> Poll </h2>');
document.write('<!-- // Begin Pollhost.com Poll Code // -->');
document.write('<form method=post action=http://poll.pollhost.com/vote.cgi>');
document.write('<table border=0 width=150 bgcolor=#000000 cellspacing=0 cellpadding=2>');
document.write('<tr><td colspan=2><font face="Arial" size=-1 color="#FF0000"><b>Do you like the new magic updates?</b></font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=1></td><td><font face="Arial" size=-1 color="#FF0000">Yes I\'m going to train magic until I get to that level!</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=2></td><td><font face="Arial" size=-1 color="#FF0000">Yes, they are ok</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=3></td><td><font face="Arial" size=-1 color="#FF0000">No, not really</font></td></tr>');
document.write('<tr><td width=5><input type=radio name=answer value=4></td><td><font face="Arial" size=-1 color="#FF0000">No, absolutely not! I want better updates!</font></td></tr>');
document.write('<tr><td colspan=2>');
document.write('<input type=hidden name=config value="c29saW5lbnQJMTExMTE3Mzg3NgkwMDAwMDAJRkYwMDAwCUFyaWFsCVJlZA">');
document.write('<center><input type=submit value=Vote>  <input type=submit name=view value="View Results">');
document.write('</center>');
document.write('</td></tr>');
document.write('<tr><td bgcolor=#FFFFFF colspan=2 align=right><font face="Arial" size=-2 color="#000000"><a href=http://www.pollhost.com/><font color=#000099>Free polls from Pollhost.com</font></a></font></td></tr>');
document.write('</table></form>');
document.write('<!-- // End Pollhost.com Poll Code // -->');
document.write('</td>');
document.write('<td>');
//-->
</script>
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
since u have no variables, why are you using js? i don't understand.

Offline Profile Quote Post Goto Top
 
solinent
Member
[ *  *  * ]
Well, I want to add some external html, so that when I change one document, they all change, but thanks for your help! Only thing is that I have found a way to do it with ASP :o I just used the asp include.

Also, the server that I'm running on is from my dad's business and I am not paying for it + it's really fast ;)

Anyways, when I asked him he told me to use ASP so....

the ASP goes something like this

<!--#Include virtual="filename.asp"-->

Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Sign-up for Free
« Previous Topic · Technology Chat · Next Topic »
Add Reply