Results 1 to 9 of 9

Thread: Image Thumbnail Viewer II-help with title length

  1. #1
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer II-help with title length

    1) Script Title: Image Thumbnail Viewer II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem:
    is it possible to change the length of the title that is showed beneath the enlarged image?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It can be as long as you want it to be.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I think he wants to know how..

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Nile View Post
    I think he wants to know how..
    This would be short:

    Code:
    title="Short One"
    This would be long:

    Code:
    title="A rather long title that can be even longer if want it to be longer"
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    i see,but for some reason it cut the text string

    ok thank you all for your time and the great script,i forgot that the string in the db can contain double quotes,thats the reason.


    thanks again.
    Last edited by genia; 01-27-2008 at 12:02 PM.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Ugh, can it contain single quotes or an apostrophe, basically this character:

    '

    If not, you could delimit with that:

    Code:
    title='Some title'
    Otherwise, you would need to escape whatever you use as a delimiter. The most convenient way of doing this that I can think of would be on the server side, like converting all " to \" before passing the value for title off to the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    your solution is not right because the problem was that in the html code the text string was with " so it looked like:
    title="text"dsfkjkljlsf"hsdfjkhdsfw'"

    and as result it showed only text.
    to solve this i made the string to output the spiceal chars as codes like: > and stuff like this so that the html parser wont be confused with the original quotes

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Ooops, I confused a javascript string with an HTML one. I'm just glad you found a way that works for you.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    thanks anyway for the help and for everything you do here.

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
  •