vertical text script needed

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

    vertical text script needed

    Hello everyone.
    Im looking for java script , compatible with both IE and Netscape brwoser to
    show texts vertically writen from bottom to top ..
    I made a tempate for ecommerce website..and i like to show the product name
    vertically beside the image .. well, i can change the desigen but , i would
    greatly appreciate if anyone knows how to accomplish this.
    Also i did googling around and came crose the script, but is more intended
    for IE 5.5 + browser, due to the fact , is using Write Mode of CSS .
    Thanks in advance


  • Ivo

    #2
    Re: vertical text script needed

    "Tony" wrote[color=blue]
    > Hello everyone.
    > Im looking for java script , compatible with both IE and Netscape brwoser
    > to show texts vertically writen from bottom to top ..
    > I made a tempate for ecommerce website..and i like to show the product
    > name vertically beside the image .. well, i can change the desigen but, i
    > would greatly appreciate if anyone knows how to accomplish this.
    > Also i did googling around and came crose the script, but is more intended
    > for IE 5.5 + browser, due to the fact , is using Write Mode of CSS .
    > Thanks in advance[/color]

    Yes, to read any text with this style:
    { writing-mode:tb-rl; filter:flipH() flipV(); }
    in IE, you need to turn your head 90 degrees to the left. Thanks for
    sharing.
    There is no standard way to do this. You can display the text in an image,
    either by preparing them one by one in your favourite image editor, or by
    using a serverside script to do this on the fly. See for example:

    HTH
    Ivo






    Comment

    • Mick White

      #3
      Re: vertical text script needed

      Tony wrote:
      [color=blue]
      > Hello everyone.
      > Im looking for java script , compatible with both IE and Netscape brwoser to
      > show texts vertically writen from bottom to top ..
      > I made a tempate for ecommerce website..and i like to show the product name
      > vertically beside the image .. well, i can change the desigen but , i would
      > greatly appreciate if anyone knows how to accomplish this.
      > Also i did googling around and came crose the script, but is more intended
      > for IE 5.5 + browser, due to the fact , is using Write Mode of CSS .
      > Thanks in advance
      >
      >[/color]
      <script type="text/JavaScript">
      function backwardsAndVer tical(str){
      return str.split('').r everse().join(" <br>")
      }
      </script>

      Mick

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: vertical text script needed

        Tony wrote:[color=blue]
        > Im looking for java script ,[/color]

        Java != JavaScript. Read the FAQ <http://jibbering.com/faq/>
        [color=blue]
        > compatible with both IE and Netscape brwoser[/color]

        That would be either JScript or JavaScript. See the FAQ.
        [color=blue]
        > to show texts vertically writen from bottom to top ..[/color]

        This is a matter of the DOM, not of the scripting language.
        If the DOM of the UA provides means to accomplish this and
        if a ECMAScript-compatible interface is provided for that
        feature, it can also be accomplished with J(ava)Script.

        I know of no (X)HTML DOM to provide such a feature for text.

        Possibly SVG would be the markup language and DOM of choice,
        I have not enough experience in this field to explain it any
        further. RTFM. But built-in SVG support is at least limited
        among user agents, all UAs I know of require a SVG-capable
        plugin.

        The IE DOM along with DirectX filters (restricted to 32 bit
        Windows?) allows for rotating images clockwise and counter-
        clockwise in steps of 90°. But even if you would restrict
        access to IE users (which is a Bad Thing on the Web) it
        would be better to rotate that image previous to upload
        since not all IE versions support that feature.

        So the latter is what you should do as it works in all UAs
        that can display images, with all OSes on all platforms.


        PointedEars

        Comment

        • Andrew Thompson

          #5
          Re: vertical text script needed

          On Sun, 18 Jul 2004 17:01:57 +0200, Thomas 'PointedEars' Lahn wrote:
          [color=blue][color=green]
          >> compatible with both IE and Netscape brwoser[/color]
          >
          > That would be either JScript or JavaScript.[/color]

          Or Java 1.2+ [ ;-) ]

          And FTR - Java is overkill for this application
          and I warrant that no-one in this thread believes
          it is Java to which the references are being made.
          Whether that applies to the ten people that find
          it in the archives later, is another matter.

          The OP would be well advised to use more precise
          language in technical discussions to avoid the
          problem becoming mired in Java!=Javascrip t
          explanations.

          --
          Andrew Thompson
          http://www.PhySci.org/ Open-source software suite
          http://www.PhySci.org/codes/ Web & IT Help
          http://www.1point1C.org/ Science & Technology

          Comment

          Working...