Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Take source from webpage, and make it one line

    Hey I ran into a problem, with a tooltip script I found on the internet.

    What I want, is a tooltip, which content is an entire other site. I got it to work, but when I try to catch the source from the specific site, it doesnt work.

    What I got is:

    Code:
    Text[0] = [<?php print($item); ?>]
    This $item is equal to more then one line of text, with line breaks. I need to make the content in $item only one line, så that [ and ] are on the same line!

    How do I do that?

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    that's an issue with your PHP output, not your javascript. Should ask in a PHP forum, but try doing a strreplace("\n", ""); or something. php.net is your friend.

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, thanks.

    I'll ask in the PHP forum too, but it isn't just a str_replace, cause I got no character to replace.

  • #4
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    new line is a character

  • #5
    New to the CF scene
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, thanks... All I needed was a little push towards the right thing.

    It works a-okay now!


  •  

    Posting Permissions

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