SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Alert Problem

    Ok, I am making a book store and I'd like reviews to be loaded into an alert box. Here is my code:

    <a href="javascript:alert('<% response.write(cosmo_books("review")) %>');">Read Review</a>



    It looks correct to me, but when I click on "read review" an error pops up saying it expected ')'

    any ideas?
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If <% response.write(cosmo_books("review")) %> has any apostrophes in it, it'll mess up the javascript.
    ck :: bringing chris to the masses.

  3. #3
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, but there are no apostrophes in my ASP code

    ...oh, i see, like in my review text, ok thanks!!
    Free Science Homework Help
    http://www.physicsforums.com


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
  •