Forum Moderators: open

Message Too Old, No Replies

resolution detection

javascript problem

         

macrost

11:16 pm on Oct 4, 2003 (gmt 0)

10+ Year Member



Hello all,
I need to detect what resolution the client is and depending on the resolution show ads in a different section of the site. The problem I have is this:
Error Type:
Active Server Pages, ASP 0138 (0x80004005)
A script block cannot be placed inside another script block.
/grassis/html/index.asp, line 68
I'm trying to document.write an external js script, I guess I can't do that eh? Would the best solution to be is to redirect to another page?

Mac

Sinner_G

1:26 pm on Oct 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



macrost, from just reading the error text, I think your problem is just that you call your exernal JS from another JS, which for the browser results in having embedded script tags. Try just removing the <script> and </script> tags from the external JS.