New Line Help Needed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralph Freshour

    New Line Help Needed

    I'm trying to insert a newline character into the string below for an
    <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image
    I see the string but without a newline break in the string - how do I
    get the line to break?

    $php_floating_t ip = "Member Name: $php_row2->displayed_memb er_name
    \\nPersonality Ranking: $php_row2->ranking"


    Thanks...

  • Terence

    #2
    Re: New Line Help Needed

    Ralph Freshour wrote:
    [color=blue]
    > I'm trying to insert a newline character into the string below for an
    > <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image
    > I see the string but without a newline break in the string - how do I
    > get the line to break?
    >
    > $php_floating_t ip = "Member Name: $php_row2->displayed_memb er_name
    > \\nPersonality Ranking: $php_row2->ranking"
    >
    >
    > Thanks...
    >[/color]

    "use the source, Luke."

    you'll see that the line break is really there but the browser is
    ignoring it when rendering the tooltip.



    Comment

    • Terence

      #3
      Re: New Line Help Needed

      Terence wrote:
      [color=blue]
      > Ralph Freshour wrote:
      >[color=green]
      >> I'm trying to insert a newline character into the string below for an
      >> <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image
      >> I see the string but without a newline break in the string - how do I
      >> get the line to break?
      >>
      >> $php_floating_t ip = "Member Name: $php_row2->displayed_memb er_name
      >> \\nPersonality Ranking: $php_row2->ranking"
      >>
      >>
      >> Thanks...
      >>[/color]
      >
      > "use the source, Luke."
      >
      > you'll see that the line break is really there but the browser is
      > ignoring it when rendering the tooltip.
      >
      >
      >[/color]

      you really want overlib



      if you are generating javascript string literals from PHP, be sure to
      escape the strings.

      replace ' with '' if inside single quotes
      and " with "" if inside double quotes

      Might be an idea to use PHP to generate a JS array containing all your
      quotes (string literals) and then use the array throughout the HTML
      otherwise things can get very yucky indeed.
      $strJs = "arrQuotes = {";
      foreach($arrQuo tes AS $key => $quote) {
      $strJs .= $key.":'".str_r eplace("'","''" ,$quote)."',";
      }
      $strJs .= "};\n";

      also, considder using
      <script language="JavaS cript" src="quote_js.p hp"
      type="text/javascript"></script>

      where the js soruce file is actually a PHP script.


      Comment

      • Alvaro G Vicario

        #4
        Re: New Line Help Needed

        *** Ralph Freshour wrote/escribió (Wed, 19 Nov 2003 05:07:57 GMT):[color=blue]
        > I'm trying to insert a newline character into the string below for an
        > <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image
        > I see the string but without a newline break in the string - how do I
        > get the line to break?[/color]

        The purpose of ALT tag is providing an alternative text for cases in which
        image is *not* shown. For tooltips you have to use TITLE tag. However, the
        way TITLE info is shown depends on browser so there is normally no way of
        formatting that text. Try overlib as suggested by Terence.

        --
        --
        -- Álvaro G. Vicario - Burgos, Spain
        --

        Comment

        • Guest's Avatar

          #5
          Re: New Line Help Needed

          "Ralph Freshour" <ralph@primemai l.com> wrote in message
          news:hgulrvo8o6 4s50lgkmdg1fftb 4p0mgfeub@4ax.c om...[color=blue]
          > I'm trying to insert a newline character into the string below for an
          > <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image
          > I see the string but without a newline break in the string - how do I
          > get the line to break?[/color]

          Try substituting the entity --

          Netscape will ignore it though... possibly other browsers too.


          Comment

          Working...