Web Hosting Talk







View Full Version : Javascript problem


HakonHoy
10-17-2007, 06:10 AM
Why doesn't this javascript function work to display this:

<script language="JavaScript"> var strCode = '';</script>
<script src="http://www.test.com/webmaster/newsbox/webmaster.php?target=&prefiximage=&prefix=on&style=&color=%23000000&font=Verdana&size=0&top=17&category=1&ReturnAs=html"></script>
<script language="JavaScript">document.write(strCode);</script>

Can you see any problems with the javascript "code"?

zacharooni
10-17-2007, 06:27 AM
Because there's nothing to display ('')

HakonHoy
10-17-2007, 06:36 AM
there is something to display ;)

http://www.otmmedia.com/webmaster/newsbox/webmaster.php?target=&prefiximage=&prefix=on&style=&color=%23000000&font=Verdana&size=0&top=17&category=1&ReturnAs=html
<--- that is the real address -

<script language="JavaScript"> var strCode = '';</script> <script src="http://www.otmmedia.com/webmaster/newsbox/webmaster.php?target=&prefiximage=&prefix=on&style=&color=%23000000&font=Verdana&size=0&top=17&category=1&ReturnAs=html"></script> <script language="JavaScript">document.write(strCode);</script>

What i'm trying to do is to display the content there without the need of iframe, so that you can put that code on other websites and it will display the content... Understand?

HakonHoy
10-17-2007, 07:31 AM
problem fixed ;)

ThatScriptGuy
10-17-2007, 10:25 AM
Please explain so other can benefit.