|
External html; Yup
|
|
Topic Started: Mar 19 2005, 11:14 AM (434 Views)
|
|
solinent
|
Mar 19 2005, 11:14 AM
Post #1
|
- Posts:
- 445
- Group:
- Members
- Member
- #46,903
- Joined:
- March 6, 2005
|
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
|
|
|
| |
|
mathiaus
|
Mar 19 2005, 11:57 AM
Post #2
|
- Posts:
- 3,112
- Group:
- Members
- Member
- #27,710
- Joined:
- August 19, 2004
|
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
|
|
|
| |
|
FearKiller
|
Mar 19 2005, 12:26 PM
Post #3
|
- Posts:
- 1,257
- Group:
- Members
- Member
- #1,769
- Joined:
- May 21, 2003
- I'm Browsing With
- Firefox
|
What is the point of having all your HTML written out by Javascript? :huh:
Why not just use pure HTML?
|
|
|
| |
|
Gornakle
|
Mar 19 2005, 12:45 PM
Post #4
|
- Posts:
- 1,304
- Group:
- Members
- Member
- #3,899
- Joined:
- August 7, 2003
|
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>
|
|
|
| |
|
kingy
|
Mar 19 2005, 03:23 PM
Post #5
|
1 in 10 people understands binary, the other 1 doesn't
- Posts:
- 3,192
- Group:
- Members
- Member
- #19,118
- Joined:
- May 16, 2004
|
since u have no variables, why are you using js? i don't understand.
|
|
|
| |
|
solinent
|
Mar 20 2005, 09:51 AM
Post #6
|
- Posts:
- 445
- Group:
- Members
- Member
- #46,903
- Joined:
- March 6, 2005
|
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"-->
|
|
|
| |
| 1 user reading this topic (1 Guest and 0 Anonymous)
|