<SELECT> problem in text browsers

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

    <SELECT> problem in text browsers

    Hi.

    I want to change language on my site online. So, I wrote this:

    <form action="<?= preg_replace("/&/", "&amp;", $_SERVER['REQUEST_URI'])
    ?>" method="post" name="change_la ng_form">
    <p style="display: none;"><input type="hidden" name="change_la ng" value="1">
    <label for="lang" accesskey="l">= = <?= CHOOSE_LANG ?> ==</label></p>
    <p class="margin"> <select id="lang" name="lang" class="langsect ion"
    onChange="if (this.options[this.selectedIn dex].value != 'null')
    {document.chang e_lang_form.sub mit()}">
    <option value="">== <?= CHOOSE_LANG ?> ==</option>
    <option value="pl"><?= PL ?></option>
    <option value="en"><?= EN ?></option>
    </select></p>
    </form>

    but this not working in text only browsers. I was tested it in Lynx
    browser. How can I change it ? Maybe is there any other solution to
    change language ?

    Any suggestion?

    Regards,
    Cezar
  • David Dorward

    #2
    Re: &lt;SELECT&g t; problem in text browsers

    Cezary wrote:
    [color=blue]
    > I want to change language on my site online. So, I wrote this:[/color]
    [color=blue]
    > {document.chang e_lang_form.sub mit()}">[/color]

    It isn't a problem with text only browsers, the problem is with a dependency
    on JavaScript.

    Use a submit input.

    --
    David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is

    Comment

    • Stephen Poley

      #3
      Re: &lt;SELECT&g t; problem in text browsers

      On Sat, 14 Aug 2004 20:48:51 +0100, David Dorward <dorward@yahoo. com>
      wrote:
      [color=blue]
      >Cezary wrote:
      >[color=green]
      >> I want to change language on my site online. So, I wrote this:[/color]
      >[color=green]
      >> {document.chang e_lang_form.sub mit()}">[/color][/color]
      [color=blue]
      >It isn't a problem with text only browsers, the problem is with a dependency
      >on JavaScript.
      >
      >Use a submit input.[/color]

      Or, depending on what the OP really wanted, a couple of straightforward
      links to the version in each language.

      --
      Stephen Poley

      Deze pagina bestaat niet of is niet meer beschikbaar. Oude XS4ALL-homepages zijn soms nog terug te vinden via webarchieven.

      Comment

      • Sam Hughes

        #4
        Re: &lt;SELECT&g t; problem in text browsers

        Cezary <cezaryk@imail. net.pl> wrote in
        news:cflpmd$ria $1@atlantis.new s.tpi.pl:
        [color=blue]
        > Hi.
        >
        > I want to change language on my site online. So, I wrote this:
        >
        > <form action="<?= preg_replace("/&/", "&amp;",
        > $_SERVER['REQUEST_URI']) ?>" method="post" name="change_la ng_form">
        > <p style="display: none;"><input type="hidden" name="change_la ng"
        > value="1"> <label for="lang" accesskey="l">= = <?= CHOOSE_LANG ?>
        > ==</label></p> <p class="margin"> <select id="lang" name="lang"
        > class="langsect ion" onChange="if
        > (this.options[this.selectedIn dex].value != 'null')
        > {document.chang e_lang_form.sub mit()}"> <option value="">== <?=
        > CHOOSE_LANG ?> ==</option> <option value="pl"><?= PL ?></option>
        > <option value="en"><?= EN ?></option>
        > </select></p>
        > </form>
        >
        > but this not working in text only browsers. I was tested it in Lynx
        > browser. How can I change it ? Maybe is there any other solution to
        > change language ?[/color]

        Most browsers do not understand javascript. You will need a submit
        button.

        Better yet, something radical:

        <a href="document_ pl.html">Polish </a> | <a href="document_ en.html">
        English</a>

        Of course, I wouldn't use the text "Polish," I'd use the native word
        for the Polish language.

        --
        How to make it so visitors can't resize your fonts:
        <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_tex t.html>

        Comment

        • Alan J. Flavell

          #5
          Re: &lt;SELECT&g t; problem in text browsers

          On Sun, 15 Aug 2004, Sam Hughes wrote:
          [color=blue]
          > Most browsers do not understand javascript.[/color]

          Most browsers do, however, understand language negotiation. Sadly,
          though, their users mostly don't, and the most prevalent (the
          browser-like operating system component) seems to do its best to
          hinder them. So, although language negotiation works and can be a
          useful feature, it's strongly advisable to include an alternative.

          (I even have a web page on the topic, as I guess the usual search
          engines would reveal...)
          [color=blue]
          > You will need a submit button.[/color]

          I'd recommend some straighforward links.
          [color=blue]
          > Better yet, something radical:
          >
          > <a href="document_ pl.html">Polish </a> | <a href="document_ en.html">
          > English</a>[/color]

          Aha, so would you ;-)
          [color=blue]
          > Of course, I wouldn't use the text "Polish," I'd use the native word
          > for the Polish language.[/color]

          Indeed.

          Comment

          • Jukka K. Korpela

            #6
            Re: &lt;SELECT&g t; problem in text browsers

            Sam Hughes <hughes@rpi.edu > wrote:
            [color=blue]
            > <a href="document_ pl.html">Polish </a> | <a href="document_ en.html">
            > English</a>
            >
            > Of course, I wouldn't use the text "Polish," I'd use the native word
            > for the Polish language.[/color]

            Or, better still, the name of the page in both languages, with the
            language code in parentheses after the link, or before it.

            It's best to give the user some food (such as a title saying _something_
            about the content, in a language he might understand) as soon as
            possible, as opposite to just offering abstract menus.

            What would you think about a restaurant that had a list of language names
            only on their front door or advertisement? You would have to go inside to
            see their actual menu, in one of the languages, to see whether it's a
            beef restaurant or a vegetarian restaurant, for example. If there's a
            reasonable option of checking the next restaurant's ad, I'd take that.

            --
            Yucca, http://www.cs.tut.fi/~jkorpela/
            Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

            Comment

            • Cezary

              #7
              Re: &lt;SELECT&g t; problem in text browsers

              David Dorward napisał(a):
              [color=blue]
              > It isn't a problem with text only browsers, the problem is with a dependency
              > on JavaScript.
              >
              > Use a submit input.
              >[/color]

              Of course ! That's solution. Thank You.

              Regards,
              Cezar

              Comment

              • Lachlan Hunt

                #8
                Re: &lt;SELECT&g t; problem in text browsers

                Cezary wrote:
                [color=blue]
                > Hi.
                >
                > I want to change language on my site online. So, I wrote this:[/color]

                Just set up content negotiation, and save each file with a .lang
                extension. You can use Apache Multiviews to achieve this.
                eg.
                file.html.en or file.en.html
                file.html.pl or file.pl.html

                If it isn't static files, then look into mapping those URIs to the
                dynamic resource, so that it is generated with the right language, but
                the exact implementation of that is outside the scope of HTML, and thus
                not appropriate for ciwah.

                [color=blue]
                > <form action="<?= preg_replace("/&/", "&amp;", $_SERVER['REQUEST_URI'])
                > ?>" method="post" name="change_la ng_form">[/color]

                What is that? the <?=...?> looks a bit like PHP or something. Whateve
                r it is, it's invalid HTML. It may have helped if you included the real
                HTML output from this instead.

                --
                Lachlan Hunt


                Please direct all spam to abuse@127.0.0.1
                Thank you.

                Comment

                Working...