Dynamic Select List Allowed Values

Howdy Folks,
I am trying to allow end users to select their username. The usernames are generated from a rule library, and displayed in a select form element. I am doing this by having the allowedValues call the rule that generates the possible names directly. The rule returns a list of valid names. The problem I am currently having, is that if the page reloads or refreshes, then the allowedValues calls the rule again. Some of the username choices involve random numbers, so it is possible (and very likely), that separate calls to the rule will generate different potential values. So what is now happening, is that when a user selects the value, the page reloads, and the end user sees an error that looks like this:
( ) - Warning: Selected value for field 'Select a Valid User Name' does not match any of the allowed values.
The reason I am reloading the page, is that I am also trying to show the user what their email address will look like with the new value. So I have a different form element that is loading is value dynamically, and referencing the select form element. This mostly works, but the warning above is unacceptable.
Is there a way I can load the dynamically created list only once, the first time the form is viewed, and not load it again every time the page refreshes?
Another thing I tried to do (but didn't have luck with, so I sorta gave up on it) was to use the onChange of the select to change the value of email display field. This way the page never reloads and I don't have to deal with that issue. I'm thinking the onChange might actually work, but I would need to execute javascript or something, and not just use an express <set/> command to set the value of the field name that displays the email text.
Does anyone have advice on how to make the values only load once? Or how to change the value on the onChange event?
Thanks!
Jim

Mike,
Thanks for the feedback. I actually did try that eventually. I created a variable in the form, and initialized that variable to the list of possible values. Then I referenced the variable in the 'allowedValues' of the select form item. At that point in time I still had the select box set as an action, so it would reload the page, hoping to reload the value in the email display field. This still did not work. Each time the action fired off, the variable was re-initializing itself. I eventually tried to put in a check, so it would not re-initialize itself if it had already been initialized. That caused a syslog error.
I ended up solving the problem using javascript. I changed the field that reported the potential email address to an html element. Then for the html attribute I made a div with an ID. I then set a line of javascript into the onChange attribute of the select form element. This worked when ever the select form value changed. I then added the same line of javascript to the onLoad attribute of the jsp pages body element. This worked for loading the page.
This solved the problem of the page reloading and the select getting new values. That still happens if you actually reload the page, but all the form elements work without the reload now.
Thanks!
Jim

Similar Messages

  • Default value dynamic select list

    Hi everybody,
    I have a question concerning dynamic select lists.
    I have a report of a table that shows some records. Each record has different versions of data. So when you click on a record you get to another page where you get some information about this record and where you can select the version of this information (with the help of a select list).
    The select list works fine and is defined dynamically as follows:
    select distinct a.name display_value,
    a.version_id return_value
    from cn_pl_version a,
    cn_pl_std_peplanung b
    WHERE a.version_ID = b.version_id AND
    b.pe_id = '&P6_HELP_PRODET.'
    order by a.version_id desc
    My problem is that when I click on a record I always get the report filled with the oldest version of the current record, so I always have to choose the newest version in the select list manually. I would prefer always to have the newest version in the report.
    The query for the report is as follows:
    select
    (select sum(stunden) from cn_pl_std_peplanung t02
    where abt_id = '10'
    and t02.pe_id = t1.pe_id
    and t02.version_id = t1.version_id
    and t02.idee_id = t1.idee_id) stunden_ir,
    (select name from cn_pl_version u01
    where u01.version_id = t1.version_id) Version
    from cn_pl_std_peplanung t1, cn_pl_projektelemente z1, cn_pl_version u1, cn_pl_projektidee s1
    where t1.version_id = '&P6_VERSION_WAHL.'
    and t1.pe_id = z1.pe_id
    and z1.pe_id='&P6_HELP_PRODET.'
    group by t1.pe_id, t1.version_id, t1.idee_id
    '&P6_VERSION_WAHL.' is the item of the select list
    '&P6_HELP_PRODET.' is the ID of the current record
    I'm not sure if you understood my problem, my english isn't the best...
    Thanks for any kind of help!!
    Patrick

    Hi Patrick,
    what value does you select list show, when you branch to the page? Is it the correct one?
    If not you should change your select list, that the correct version is selected as default. You can define a "default value" when you set the source of the element.
    Otherwise you can maybe set up an example application at http://apex.oracle.com.
    Best Regards
    chrissy

  • Creating dynamic select list

    I have a dynamic select list populated by site names and URLs from a map; when a user clicks on an entry the site name and URL will fill two text boxes. There are also buttons to add, update, and delete entries. These buttons lead to actions within my JPF file.
              When I select an entry to delete, the script runs a delete SQL statement again my Ora db instance, then the page content is repopulated. I want to know how come when I do that I always get the sequence ID of the just deleted entry at the end of my select list.
              Here is a snippet of what I've got:
              JSP:
                        <netui:select
                dataSource="{actionForm.siteList[0]}"
                optionsDataSource="{actionForm.itemOptions}"
                size="4"
                tagId="siteList">
              <netui:textBox
                dataSource="{actionForm.title}"
                size="30" maxlength="200" tagId="title"/>
              <netui:textBox
                dataSource="{actionForm.url}"
                size="30" maxlength="200" tagId="url"/>
              <netui:hidden dataSource="{actionForm.key}"
                tagId="key"/>
              <script language="javascript">
                <!--
                <%=session.getAttribute("jsArray")%>
                  function siteClicked()
                    var index =
                      document[getNetuiTagName("process",this)]
                      [getNetuiTagName("siteList",this)][
                        document[getNetuiTagName("process",this)]
                        [getNetuiTagName("siteList",this)]
                        .selectedIndex]
                      .value
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("key",this)].value
                      = index;
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("title",this)].value
                      = siteArray[ index ][0];
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("url",this)].value
                      = siteArray[ index ][1];
                -->
              </script>
                                  JPF:
                        Connection conn = null;
              query = "delete from stlnt_other_ref_sites " +
                      "where stlnt_ors_site_id = " + form.getKey();
              try {
                pstmt = conn.prepareStatement( query );
                pstmt.executeUpdate();
              } catch (SQLException ex) {
              try {
                Map map = new LinkedHashMap();
                while ( rs.next() )
                  map.put(new Integer(rs.getInt(1)), rs.getString(2));
                  jsArray += "siteArray[" + rs.getInt(1)
                    + "]=new Array(\"" + rs.getString(2)
                    + "\",\"" + rs.getString(3) + "\");";
                  hasResults = true;
                options = map;
                getSession().setAttribute("jsArray",jsArray);
                getSession().setAttribute("hasResults",
                  String.valueOf(hasResults));
              } catch (SQLException ex) {
              

    OK I got it working... Mostly... I don't know if it was a combination of changes that made the difference, but I'll put down what I did. First, I switched my select object in the form bean into just a string type from a string array (it was allowing the selection of one entry anyways). Second, rather than just blanking out the options map, I also blanked out the select object [eg form.setSelect("")].
              Now when I select an entry and click delete, the resulting select list is short one visible element. However, you can still select the blank spot where that last entry used to be. However, this is not a huge issue for me now; I will investigate this at a later time.

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Dynamic Select List - XML and umlaut

    Hi, I've recently implement a dynamic select list as per [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=327306], however it seems to break if I have any words containing an umlaut. I've tried setting the header on the Application Process to UTF-8 (OWA_UTIL.mime_header ('text/xml', FALSE, 'utf-8');) but it doesn't seem to make any difference. The word in particular giving me problems is Kühne - it's the only non english entry so far, but I would expect others in the future.
    Does anyone have any ideas how to allow this character to be parsed correctly? Short of using replace to check for this and every other possible character I'm not sure what else to do.
    Thanks

    Pete88 wrote:
    Hello
    I would like to create a dynamic select list where you can start entering a name and select list reduces with each character entered.
    E.g. A list of towns in the UK where you want to select London. This list is delay as normal and as start typing by the time you have entered “Lon” the list only has few names starting with “Lon”
    I expect I need a JavaScript to active this?Not in APEX 4.x. Use a Text Field with autocomplete item.

  • Dynamic Select List in Reports

    Hi,
    I have come across solutions to implement dynamic Select Lists. But can the same be implemented in a report.
    I have a report of 2 columns which are select lists. The Value of one depends of the other.
    Can this be done?
    Thanks in Advance

    Hi Abdullah,
    Thanks for the Tip. However, couple of queries.
    1) The first modification involves changing the query to : select lov_pkg.savekey() , colA, colB, ... But the function savekey takes a value.
    Ideally, I need this function to be called while loading and when the first select list is changed. How can this be done.
    2) Also, To make this change in query, I had to use (Use Generic Column Names (parse query at runtime only)) option. Now my Add Row button doesnt work? Can you tell me how that can be customized.
    Thanks,
    Sunil

  • Dynamic select list crashes with php

    HI All,
    I can't seem to get a dynamic select list to work in
    dreamweaver. It completly crashes everytime I try adding it to my
    page. I found someone else in the forum who had the same problem
    but no one ever responded. I've tried several things including
    putting just the record set and dynamic select on it's own page
    with no other code on it. It still crashes DW. I also tried coding
    it myself by making a listmenu and modifying it so that the option
    value equals a PHP echo of a value. It crashed there too. Does
    anyone have a piece of code with a working dynamic select list that
    uses a record set that I could look at? That way I can see where
    I'm going wrong. All I'm trying to do is get a simple drop down
    select list of employee names so someone can choose their name to
    get commission. It's a one table, 2 fields (first & last name)
    record set.
    Using DW CS3, php & MySQL.,windows XP Pro
    Any help would be really appreciated!

    AthroughZ wrote:
    > I can't seem to get a dynamic select list to work in
    dreamweaver. It
    > completly crashes everytime I try adding it to my page.
    It looks as though you have a corrupt cache file. Follow
    troubleshooting
    step 4 in the following technote:
    http://www.adobe.com/go/tn_19105
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamic select list: link to another page

    Hi
    Have following dynamic select list at the bottom in "product.php" page (www.dolls.com.sg)
    <div id="selectcat">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>"<?php if (!(strcmp($row_rsCategories['categoryName'], $row_rsCategories['categoryName']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
    My target is, whenever a visitor clicks on a category in the pull down menu, he is forwarded to the respective "categories.php" page.
    How can I do that?
    Thanks
    Helmut

    Change your code to this:
    <div id="selectcat">
    <form method="get" action="categories.php">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>">
        <?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
      <input type="submit" value="View Dolls">
    </form>
    </div>
    In categories.php, use $_GET['Categories'] to filter the recordset.

  • Dynamic select list with one static 'not_listed" option

    Hi guys,
    I want to create a dynamic select list with one static 'not_listed' option.
    One possible alternative is to add the 'not_listed' record into database, but I really dont want to go that way unless there is no other way around.
    Can anyone shed some lights on this?
    Many thanks,
    William

    As usual : "It depends"...
    If you have a foreign key defined on that field, Scott's reply won't work - unless you define '0 - Not listed' in the database. You can use selec 'not listed' d, to_number(null) r from dual though...
    Another - more declarative way - is in the on 'Edit Page Item' page, in the 'List of Values' region set 'Display Null' to 'Yes' and 'Null Display Value' to ' - Not listed - '.
    Roel

  • Cannot make a dynamic  select list

    I couldn't make a dynamic select list in a jsp. please help

    <select name='item'>
                   <option value='-1'>Select Option</option>
    <%
                   rs=stmt.executeQuery("select * from item_master");
                   while (rs.next())
    %>
                             <option value='<%= rs.getString("item_code") %>'
    <%
                             if (rs.getString("item_code").equals(stritemcode))
                                  out.println(" selected ");
    %>
                             ><%= rs.getString("item_description") %></option>
    <%
    %>
                   </select>
    Hope the code snippet helps you. Here stritemcode is the value that should be selected. Amol

  • Select lists - remember values after submit not working in IE7

    I have two dynamic select lists that are populated using .csv
    files.
    On submit, a set of results is returned based on the two
    options that were chosen.
    In IE7 when the results are returned the select lists default
    back to the last option in the select list. I would like it to
    default to what ever option was just chosen.
    I'm using the code below and it works as I would like it to
    in both Firefox and Safari, but just defaults to the last option in
    the list for IE7.
    The variable "actualLitType" is pulled from the URL and
    should be part of the id of the selected option.
    Any ideas why it doesn't work like I would like it to in IE7?
    Thanks in advance,
    Jesse

    I posted this in another forum and received an answer that
    fixed the issue. See the link below for more information:
    http://www.dynamicdrive.com/forums/showthread.php?t=35473

  • Multiple-Selection List Box Values in Multiple Columns

    I am using InfoPath 2010 with SharePoint 2013. I have a form with a multiple-selection list box which has A LOT of choices. Instead of displaying all the choices in one column, is it possible to display the values of my list box in several
    columns? 

    Hi Andrea,
    I agree with Brij, one multiple-selection list box is associated with one list field, we cannot use the one multiple selection list box value for other multiple selection list boxes, we need to create multiple choices for each multiple-selection list box
    control in InfoPath form.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Dynamic select list with more than one value?

    I am creating a simple CRUD component for our company's Joomla site. This component allows our users to create discount bundles for our cart according to shopper group and products.  I've been using Dreamweaver to author the administrator forms and have run into a bit of a problem.  All of my forms work properly, but I need to be able to collect two values from each chosen multi-select listing. 
    Right now, when a user chooses an item under 'products', the site pushes back product_id, one of the variables I need.  I would also like product_parent_id to return with each result as well.  I need to be able to insert product_parent_id after the user has chosen their desired products.  product_parent_id is located in the same table as product_id.
    In the end, I need those two values to be pushed to another table, essentially creating a new entry for each product in the bundle.  Referenced by ID and parent ID.
    Pasted below is the administrator form code.  Any suggestions would be wonderful.
    Thanks!
    <?php require_once('Connections/SQLTest.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_related_products (product_id, related_product_id) VALUES (%s, %s)",
                           GetSQLValueString($_POST['products'], "int"),
                           GetSQLValueString($_POST['products'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations (discount_type, discount, shopper_group_id) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['amount_off_total'], "text"),
                           GetSQLValueString($_POST['dollar_amount'], "int"),
                           GetSQLValueString($_POST['shoper_group'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations_messages (discount_message) VALUES (%s)",
                           GetSQLValueString($_POST['discount_message'], "text"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    $maxRows_Products = 10;
    $pageNum_Products = 0;
    if (isset($_GET['pageNum_Products'])) {
      $pageNum_Products = $_GET['pageNum_Products'];
    $startRow_Products = $pageNum_Products * $maxRows_Products;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_Products = "SELECT * FROM jos_vm_product";
    $query_limit_Products = sprintf("%s LIMIT %d, %d", $query_Products, $startRow_Products, $maxRows_Products);
    $Products = mysql_query($query_limit_Products, $SQLTest) or die(mysql_error());
    $row_Products = mysql_fetch_assoc($Products);
    if (isset($_GET['totalRows_Products'])) {
      $totalRows_Products = $_GET['totalRows_Products'];
    } else {
      $all_Products = mysql_query($query_Products);
      $totalRows_Products = mysql_num_rows($all_Products);
    $totalPages_Products = ceil($totalRows_Products/$maxRows_Products)-1;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_shopper_group = "SELECT * FROM jos_vm_shopper_group";
    $shopper_group = mysql_query($query_shopper_group, $SQLTest) or die(mysql_error());
    $row_shopper_group = mysql_fetch_assoc($shopper_group);
    $totalRows_shopper_group = mysql_num_rows($shopper_group);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
      <p>
        <label for="products"></label>
      Choose the product(s) you would like to add to your new discount bundle.</p>
      <p>
        <select name="products" size="1" multiple="MULTIPLE" id="products">
          <option value=""></option>
          <?php
    do { 
    ?>
          <option value="<?php echo $row_Products['product_id']?>"><?php echo $row_Products['product_name']?></option>
          <?php
    } while ($row_Products = mysql_fetch_assoc($Products));
      $rows = mysql_num_rows($Products);
      if($rows > 0) {
          mysql_data_seek($Products, 0);
      $row_Products = mysql_fetch_assoc($Products);
    ?>
        </select>
      </p>
    <p>
      <input type="hidden" name="hiddenField" id="hiddenField" />
      </p>
      <p>Choose the subscriber group that you would like this discount to apply to.</p>
      <p>
        <select name="shoper_group">
          <?php
    do { 
    ?>
          <option value="<?php echo $row_shopper_group['shopper_group_id']?>"><?php echo $row_shopper_group['shopper_group_name']?></option>
          <?php
    } while ($row_shopper_group = mysql_fetch_assoc($shopper_group));
      $rows = mysql_num_rows($shopper_group);
      if($rows > 0) {
          mysql_data_seek($shopper_group, 0);
      $row_shopper_group = mysql_fetch_assoc($shopper_group);
    ?>
        </select>
      </p>
      <p>Please enter the dollar amount that you would like to adjust.
        <label for="dollar_amount"><br />
        </label>
        <input type="text" name="dollar_amount" id="dollar_amount" />
      </p>
      <p>
        <input name="amount_off_total" type="hidden" id="amount_off_total" value="amount_off_total" />
      </p>
      <p>Enter any message you would like the shopper to view during shopping and checkout when this discount is applied.</p>
      <p>
        <label for="discount_message"></label>
        <textarea name="discount_message" id="discount_message" cols="45" rows="5"></textarea>
      </p>
      <p>
        <input type="hidden" name="MM_insert" value="form1" />
      </p>
      <p>
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <br />
    </body>
    </html>
    <?php
    mysql_free_result($Products);
    mysql_free_result($shopper_group);
    ?>

    Thanks guys for you reply , [Cor Ligthert] I post this in Visual basic section, I appreciate your solution [dbasnett],
    Thanks for that idea of attribute <Flags> [Blackwood] ,
    Dictionary will not work in IF Statement as I want it , also ParamArray tbl() , thanks guys.
    Here is the code
    Module myModule
    <Flags()>
    Enum Table As Integer
    Table1 = 2
    Table2 = 4
    Table3 = 8
    Table4 = 16
    Table5 = 32
    End Enum
    Public Sub MySub(ByVal Table As Table)
    If (Table And Table.Table1) = Table.Table1 Then
    MsgBox((Table And Table.Table1))
    End If
    If (Table And Table.Table2) = Table.Table2 Then
    MsgBox((Table And Table.Table2))
    End If
    If (Table And Table.Table3) = Table.Table3 Then
    MsgBox((Table And Table.Table3))
    End If
    If (Table And Table.Table4) = Table.Table4 Then
    MsgBox((Table And Table.Table4))
    End If
    If (Table And Table.Table5) = Table.Table5 Then
    MsgBox((Table And Table.Table5))
    End If
    End Sub
    End Module
    Class Myclass
    Private sub CallTables()
    MySub(Table.Table1 Or Table.Table2)
    MySub(Table.Table2 Or Table.Table3 Or Table.Table4)
    MySub(Table.Table1 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table3 Or Table.Table4 Or Table.Table5)
    end sub
    end Class

  • Dynamic Select List not displaying correct value

    Hi there!
    I have a page with a dynamic repeat region.
    As I press one record I get up all the details based on id on an edit page.
    The problem is that the info that is inserted via a Select List is not displaying correct on edit page.
    All the other values are correct, also the values in the repeat region on index page,
    but the value from the Select List on edit page is just displaying the initially selected item.
    Have tried using SELECT DISTINCT in the SQL statement, but no luck.
    Any other ideas?
    Cut and paste from form:
    <select name="Vegtype" class="ProvDet" id="Vegtype" title="<%=(rsAs.Fields.Item("VegType").Value)%>">
                        <option value="Ev" selected="selected">Ev</option>
                        <option value="Fv">Fv</option>
                        <option value="Rv">Rv</option>
                        <option value="Kv">Kv</option>
                      </select>
    Recordset
    <%
    Dim rsAs
    Dim rsAs_cmd
    Dim rsAs_numRows
    Set rsAs_cmd = Server.CreateObject ("ADODB.Command")
    rsAs_cmd.ActiveConnection = MM_LabCon_STRING
    rsAs_cmd.CommandText = "SELECT DISTINCT DatoM, DatoR, DatoU, Distr, FagFelt, Felt, IntNr, Km, KontrNr, Kontrollor, Masse, MasseBK, Punkt, Resept, TestID, UserID, VegHp, VegNavn, VegNr, VegType FROM tblTest WHERE TestID = ?"
    rsAs_cmd.Prepared = true
    rsAs_cmd.Parameters.Append rsAs_cmd.CreateParameter("param1", 5, 1, -1, rsAs__MMColParam) ' adDouble
    Set rsAs = rsAs_cmd.Execute
    rsAs_numRows = 0
    %>
    Regards,
    Christian
    DWCS5 | .Asp | MS Access

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

Maybe you are looking for