SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2001
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mile-long URL not accepted by Javascript?

    document.write("<font size=3 face='Trebuchet MS'><a HREF='http://[ip removed]/bin/findwhat.dll?clickthrough&y=11111&x=IfHOqnzd4fjgnhufbK:Cq16IuK:CGUCSlnhHtBjBlUScfJh55AT7hkYvXhU2dkwxXpuGsmUUb1hIoBMgX94DsfUgov3$C'><font color=#DF3716><b>Quality 1X DVDRs $0.69, +R $2.29; 16X CDRs $0.15</b></font></a></font>"); document.write("<font size=3 face='Trebuchet MS'><a HREF='http://[ip removed]/bin/findwhat.dll?clickthrough&y=11111&x=IfHOqnzd4fjgnhufbK:Cq16IuK:CGUCSlnhHtBjBlUScfJh55AT7hkYvXhU2dkwxXpuGsmUUb1hIoBMgX94DsfUgov3$C'><font color=#DF3716><b>Get your DVD here</b></font></a></font>");

    When I try to output this line, I got a blank page. Do you think it's because of the mile-long URL? I cannot modify anything inside the URL, unforunately.

    FYI, this part of the code only works with there's ONLY ONE document.write.

    Could anyone help?

    Thanks!
    Last edited by d-net; Jan 7, 2003 at 00:40.

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code that you have there seems to work for me in IE6, although I was quite surprised when it did. I expected to have to put escape characters in the string.

    Check this out for more info on escaping quotes etc.

    If it is the length of the string that is causing problems in some browsers, have you tried assigning parts of the string to several variables e.g. part1, part2, part3 etc. and then concatenating them in the document.write statement?


    Andy
    From the English nation to a US location.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •