Load Runner, Drop Down List

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

    #1

    Load Runner, Drop Down List

    Can anyone send me the script for supplying the values in drop down
    list of the web page?
    I have couple of drop down list controls in my web page. I need to
    supply multiple values for each dropdown list in my script. How can i
    do that? can you send me the script for this?

    Thanks in advance
    reddy

  • Erwin Moller

    #2
    Re: Load Runner, Drop Down List

    kavi wrote:
    [color=blue]
    > Can anyone send me the script for supplying the values in drop down
    > list of the web page?
    > I have couple of drop down list controls in my web page. I need to
    > supply multiple values for each dropdown list in my script. How can i
    > do that? can you send me the script for this?
    >
    > Thanks in advance
    > reddy[/color]

    Hi,

    What is excactly not working right now?

    What kind of script do you want?

    Here is one:

    <select name="age">
    <?
    for ($i=1;$i<100;$i ++){
    ?>
    <OPTION value="<?= $i ?>"><?= $i ?>
    <?
    }
    ?>
    </select>

    Does that help?

    Erwin Moller

    Comment

    • Erwin Moller

      #3
      Re: Load Runner, Drop Down List

      Erwin Moller wrote:
      [color=blue]
      > kavi wrote:
      >[color=green]
      >> Can anyone send me the script for supplying the values in drop down
      >> list of the web page?
      >> I have couple of drop down list controls in my web page. I need to
      >> supply multiple values for each dropdown list in my script. How can i
      >> do that? can you send me the script for this?
      >>
      >> Thanks in advance
      >> reddy[/color]
      >
      > Hi,
      >
      > What is excactly not working right now?
      >
      > What kind of script do you want?
      >
      > Here is one:
      >[/color]

      Aha, I think I know what you mean now: You want a selectbox where the user
      can select MULTIPLE values?

      Just add the word MULTIPLE to the select, like this:

      <select name="age[]" MULTIPLE>

      Also, if you want a PHP-script to receive the values, change the name of the
      element in something that ends with [], like I did with age.

      If you want to retrieve the values in your php-script, get them like this:

      $receivedage = $_POST["age"];

      Now $receivedage contains an array (containing 0,1, or more elements)
      Regards,
      Erwin Moller



      [color=blue]
      > <select name="age">
      > <?
      > for ($i=1;$i<100;$i ++){
      > ?>
      > <OPTION value="<?= $i ?>"><?= $i ?>
      > <?
      > }
      > ?>
      > </select>
      >
      > Does that help?
      >
      > Erwin Moller[/color]

      Comment

      Working...