SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2000
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick help please!

    Hi, I need to get the following rewritten so my shopping cart doesn't pick it up as an image tag and automatically add to the path after "src=".

    document.write('<IMG ID="WTL_146012" BORDER="0" WIDTH="1" HEIGHT="1" SRC="'+W+'">');

    My shopping cart has been parsing it to:

    document.write('<IMG ID="WTL_146012" BORDER="0" WIDTH="1" HEIGHT="1" SRC="/catalog/images/'+W+'">');

    and it's messing it all up since this is an image from off-site (WebTrends web bug). Can anyone help me rewrite this so my shopping cart parser won't recognize it, but it will still function the same? Thanks a lot!
    But what care I for praise? - Bob Dylan

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) What shopping cart software are you using?

    2) Where is it getting the "/catalog/images/" path from?

    3) At what point does it parse/modify your HTML/JS?
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2000
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    M@rco-
    Thanks for your response. It look like:

    document.write('<' + 'IMG ID="WTL_146012" BORDER="0" WIDTH="1" HEIGHT="1" SRC="'+W+'"' + '>');

    did it. Is there anything wrong with doing it this way?
    But what care I for praise? - Bob Dylan

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it works, then there's nothing wrong!!!

    But seriously, that's fine - quite a common problem, and that's usually the solution.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  5. #5
    SitePoint Evangelist
    Join Date
    Nov 2000
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks for your help!
    But what care I for praise? - Bob Dylan


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
  •