no form displayed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • the house of riddles

    no form displayed

    Hi,

    I am attempting to have a combo box with links that the user selects to go
    to that page. Here is the java code.

    <!--Change the option tags as desired-->
    <form name="c937">

    <p><select name="c614" size="1">
    <option selected value="about-me.html<about me</option>
    <option value="jokes.ht ml">jokes</option>
    <option value="books.ht ml">books</option>
    <option value="download s.html">downloa ds</option>
    <option value="links.ht ml">links<//option>

    </select>

    <input type="button" value="Go"
    onClick="locati on=document.c93 7.c614.options[document.c937.c 614.selectedInd e
    x].value"></p>
    </form>

    The problem is that when I open the page in the web browser (IE six,) no
    combo box appears. What am I doing wrong? Thanks,

    Robert

    P.S I am using Apache 1.3 as the webserver.



  • Jukka K. Korpela

    #2
    Re: no form displayed

    "the house of riddles" <captainlogic@q west.net> wrote:
    [color=blue]
    > I am attempting to have a combo box with links that the user
    > selects to go to that page.[/color]

    Stop trying that. Use links, Luke. See

    [color=blue]
    > Here is the java code.[/color]

    No, there's not a single piece of Java there. Your markup snippet
    contains one JavaScript instruction. And both Java and JavaScript are
    off-topic in this group.
    [color=blue]
    > The problem is that when I open the page in the web browser (IE
    > six,) no combo box appears. What am I doing wrong?[/color]

    Well, you have some syntax errors in your markup, to begin with. But
    the basic mistake is to try to avoid using links for linking.
    [color=blue]
    > P.S I am using Apache 1.3 as the webserver.[/color]

    Irrelevant. You are _not_ utilizing the server facilities but try to
    rely on security holes (JavaScript enabled) on browsers. But the
    the basic mistake is to try to avoid using links for linking.

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

    Comment

    • Steve Pugh

      #3
      Re: no form displayed

      "the house of riddles" <captainlogic@q west.net> wrote:
      [color=blue]
      >I am attempting to have a combo box with links that the user selects to go
      >to that page.[/color]

      Unlike a normal list of links tha is easier to use and will always
      work. Okay you like to make life difficult for yourself and your
      visitors...
      [color=blue]
      >Here is the java code.[/color]

      This isn't Java. It's HTML and a little bit of JavaScript. Java and
      JavaScript have nothing in common except the name.
      [color=blue]
      ><!--Change the option tags as desired-->
      ><form name="c937">[/color]

      No action specified for the form. Where is this form supposed to be
      submitted to?
      [color=blue]
      ><p><select name="c614" size="1">
      ><option selected value="about-me.html<about me</option>[/color]

      Missing " and < instead of >
      [color=blue]
      ><option value="jokes.ht ml">jokes</option>
      ><option value="books.ht ml">books</option>
      ><option value="download s.html">downloa ds</option>
      ><option value="links.ht ml">links<//option>[/color]

      Two / instead of one
      [color=blue]
      ></select>
      >
      ><input type="button" value="Go"
      >onClick="locat ion=document.c9 37.c614.options[document.c937.c 614.selectedInd e
      >x].value"></p>
      ></form>[/color]

      If the user doesn't have JS enabled (and 10-20% of users seem not to)
      then they can click on this button all day long but nothing will
      happen.

      The syntax errors above would have been revealed very quickly if you
      had validated your code. http://validator.w3.org/

      Steve

      --
      "My theories appal you, my heresies outrage you,
      I never answer letters and you don't like my tie." - The Doctor

      Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

      Comment

      • Eric Bohlman

        #4
        Re: no form displayed

        Steve Pugh <steve@pugh.net > wrote in
        news:anr4ovk8ab j2faoj851sifuh8 9nlqk3iml@4ax.c om:
        [color=blue][color=green]
        >><input type="button" value="Go"
        >>onClick="loca tion=document.c 937.c614.option s[document.c937.c 614.selecte
        >>dInde x].value"></p>
        >></form>[/color]
        >
        > If the user doesn't have JS enabled (and 10-20% of users seem not to)
        > then they can click on this button all day long but nothing will
        > happen.[/color]

        And search engine robots probably won't be able to follow those "links."
        And link-checking tools probably won't be able to follow them either. And
        even users with Javascript enabled will have to go through *two* steps to
        follow a link rather than just one, for no discernable benefit.

        I suspect we have an XY problem here where the author's real goal is to
        limit the amount of window real estate taken up by the links. How about an
        iframe with ordinary clickable links instead?

        Comment

        • endlesscam

          #5
          Re: no form displayed

          Jukka K. Korpela wrote:
          [color=blue]
          > "the house of riddles" <captainlogic@q west.net> wrote:
          >[color=green]
          >> I am attempting to have a combo box with links that the user
          >> selects to go to that page.[/color]
          >
          > Stop trying that. Use links, Luke. See
          > http://www.cs.tut.fi/~jkorpela/forms/navmenu.html
          >[color=green]
          >> Here is the java code.[/color]
          >
          > No, there's not a single piece of Java there. Your markup snippet
          > contains one JavaScript instruction. And both Java and JavaScript are
          > off-topic in this group.
          >[color=green]
          >> The problem is that when I open the page in the web browser (IE
          >> six,) no combo box appears. What am I doing wrong?[/color]
          >
          > Well, you have some syntax errors in your markup, to begin with. But
          > the basic mistake is to try to avoid using links for linking.
          >[color=green]
          >> P.S I am using Apache 1.3 as the webserver.[/color]
          >
          > Irrelevant. You are _not_ utilizing the server facilities but try to
          > rely on security holes (JavaScript enabled) on browsers. But the
          > the basic mistake is to try to avoid using links for linking.
          >[/color]
          You can use the java-code in the "form action" or in stad of javacode
          maybe use href:

          Comment

          Working...