Results 1 to 3 of 3

Thread: Combining Scripts

  1. #1
    Join Date
    Jun 2005
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Combining Scripts

    hi,

    i liked to combine 2 scripts tofether but it keeps giving me a eror, is it possible to do it??

    anyways the 2 scripts are the Thumbnail Viwer II & the left-right slideshow, would really appreciate any help.

    by the way this is the part that gives me a eror:

    edited:
    Code:
    leftrightslide[0]='<a href="#" onMouseover="modifyimage('dynloadarea', 0)"><img src="thumb_test1.jpg" border=0"></a>'
    original:
    Code:
    leftrightslide[2]='<a href="http://..."><img src="thumb_test2.jpg" border=0></a>'

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    1. Semicolon after the modifyimage() call
    2. Escape the single quotes (') by putting a backslash (\) in front of them (\')
    3. You close a double quote which isn't open after border=0, either take it out or put another before the 0.
    4. Not going to break the script, but you might want to close the <img> tag (<img src="..." onclick="..."/>)
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Semicolon after the modifyimage() call
    As is, it's not really necessary as there's just the one statement, but it doesn't hurt.

    Not going to break the script, but you might want to close the <img> tag (<img src="..." onclick="..."/>)
    XHTML should be avoided unless you have a reason or a need to serve XHTML, and then it should only be served as application/xhtml+xml. Otherwise, just stick to HTML and its syntax.

    What should be added is an alt attribute for that img element.

    Mike

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
  •