problem with select menu

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

    problem with select menu

    I have a problem that I hope someone can explain why it is happening
    and how to fix it.
    In order to explain my problem, I am going to define the word
    "container" which i will use often in this post. A container is this:
    <CONTAINER>, in other words all the characters between the < and > and
    including the < and > signs. (What is the correct term for this
    anyhow?) The container is used for placing data from a cgi script on
    to a webpage.

    Here is my problem: when I put 2 of the same containers very close
    together on a page, the first container is filled with data and the
    second isn't.
    Here is an example:
    <select name=PROV>
    <option name="value" value="<PROV>" selected><PROV> </option>

    In the above example there are 2 <PROV> containers that I want to get
    filled with the same data. However, only the first container is filled
    and the second is left unfilled. This is what it looks like when I
    view source of the page:
    <select name=PROV>
    <option name="value" value="BC" selected><PROV> </option>

    Yet, if I separate the <PROV> containers by putting the second one
    somewhere else on the page, both containers are filled with the data
    "BC". WHY?

    Is this a widely known problem or is it a unique problem that I am
    having because I have a coding error somewhere the page.

    All questions and comments are greatly appreciated.
    Blaine
  • Harlan Messinger

    #2
    Re: problem with select menu


    "blaine YOung" <byoung@ynotbid .com> wrote in message
    news:dc5989cc.0 408111329.7feb3 24@posting.goog le.com...[color=blue]
    > I have a problem that I hope someone can explain why it is happening
    > and how to fix it.
    > In order to explain my problem, I am going to define the word
    > "container" which i will use often in this post. A container is this:
    > <CONTAINER>, in other words all the characters between the < and > and
    > including the < and > signs. (What is the correct term for this
    > anyhow?)[/color]

    "Tag". I'm curious how you learned HTML without this most basic HTML term!
    [color=blue]
    > The container is used for placing data from a cgi script on
    > to a webpage.
    >
    > Here is my problem: when I put 2 of the same containers very close
    > together on a page, the first container is filled with data and the
    > second isn't.
    > Here is an example:
    > <select name=PROV>
    > <option name="value" value="<PROV>" selected><PROV> </option>[/color]

    To include the < and > symbols in an HTML page as text or as attribute
    values, you need to replace them with &lt; and &gt; respectively.

    <option name="value" value="&lt;PROV &gt;" selected>&lt;PR OV&gt;</option>[color=blue]
    >
    > In the above example there are 2 <PROV> containers[/color]

    What do you mean by <PROV> containers? You have two SELECT lists with the
    same name?

    [color=blue]
    > that I want to get
    > filled with the same data. However, only the first container is filled
    > and the second is left unfilled. This is what it looks like when I
    > view source of the page:
    > <select name=PROV>
    > <option name="value" value="BC" selected><PROV> </option>
    >
    > Yet, if I separate the <PROV> containers by putting the second one
    > somewhere else on the page, both containers are filled with the data
    > "BC". WHY?
    >
    > Is this a widely known problem or is it a unique problem that I am
    > having because I have a coding error somewhere the page.
    >
    > All questions and comments are greatly appreciated.
    > Blaine[/color]

    Comment

    • Neal

      #3
      Re: problem with select menu

      On 11 Aug 2004 14:29:21 -0700, blaine YOung <byoung@ynotbid .com> wrote:
      [color=blue]
      > I have a problem that I hope someone can explain why it is happening
      > and how to fix it.
      > In order to explain my problem, I am going to define the word
      > "container" which i will use often in this post. A container is this:
      > <CONTAINER>, in other words all the characters between the < and > and
      > including the < and > signs. (What is the correct term for this
      > anyhow?) The container is used for placing data from a cgi script on
      > to a webpage.[/color]

      It's a tag.
      [color=blue]
      > Here is my problem: when I put 2 of the same containers very close
      > together on a page, the first container is filled with data and the
      > second isn't.
      > Here is an example:
      > <select name=PROV>
      > <option name="value" value="<PROV>" selected><PROV> </option>[/color]

      Problem is that < means a tag has started. When you write <PROV> you are
      using poor syntax. The first instance is seemingly a tag within a tag,
      which makes no sense. The second is an apparent empty <PROV> tag, which
      doesn't exist.

      Who taught you that <PROV> would ever be legitimate in a webpage? Shoot
      them.

      Comment

      • blaine YOung

        #4
        Re: problem with select menu

        byoung@ynotbid. com (blaine YOung) wrote in message news:<dc5989cc. 0408111329.7feb 324@posting.goo gle.com>...[color=blue]
        > I have a problem that I hope someone can explain why it is happening
        > and how to fix it.
        > In order to explain my problem, I am going to define the word
        > "container" which i will use often in this post. A container is this:
        > <CONTAINER>, in other words all the characters between the < and > and
        > including the < and > signs. (What is the correct term for this
        > anyhow?) The container is used for placing data from a cgi script on
        > to a webpage.
        >
        > Here is my problem: when I put 2 of the same containers very close
        > together on a page, the first container is filled with data and the
        > second isn't.
        > Here is an example:
        > <select name=PROV>
        > <option name="value" value="<PROV>" selected><PROV> </option>
        >
        > In the above example there are 2 <PROV> containers that I want to get
        > filled with the same data. However, only the first container is filled
        > and the second is left unfilled. This is what it looks like when I
        > view source of the page:
        > <select name=PROV>
        > <option name="value" value="BC" selected><PROV> </option>
        >
        > Yet, if I separate the <PROV> containers by putting the second one
        > somewhere else on the page, both containers are filled with the data
        > "BC". WHY?
        >
        > Is this a widely known problem or is it a unique problem that I am
        > having because I have a coding error somewhere the page.
        >
        > All questions and comments are greatly appreciated.
        > Blaine[/color]

        Thanks Harlan and Neal for your replies.

        A little background info: a programmer wrote the cgi script (C) and
        html for me. He has since moved on and now I am learning it for
        myself, by looking at his his work and by reading books.

        I know what a tag is. I believe tags are predined and one can't make
        up their own - correct me if I'm wrong. I intentionally called <PROV>
        a container because when the page it is used in is generated by the
        cgi script, the parse script looks for <PROV> and fills it with data
        from the database. Here is the specific line that does that:

        else if (ParseHtml(stdo ut,command,"<PR OV>")==1) printf("%s",
        province);

        Since I posted yesterday though, I decided to just delete that section
        of the page because it was somewhat redundant and I can make do
        without it.

        That said, I am still interested to know the correct term for
        <I_AM_A_SPOT_TH AT_GETS_FILLED_ WITH_DATA_FROM_ THE_DB>. Is it still a
        tag? Should I ask on the cgi authoring group instead?

        Blaine

        Comment

        Working...