Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3311366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:52:06+00:00 2026-05-17T21:52:06+00:00

If you look at the source code for the html you can see the

  • 0

If you look at the source code for the html you can see the combobox has an id. However when i run a loop through all hte elements on the page in vb.net it comes up as a blank instead of the id thats clearly defined. I’m thinking it has something to do with the javascript giving it a dynamic id. Anyway. I need to set this box after the page has loaded in a webbrowser object. Please help. Its driving me crazy!

<input type="hidden" name="wlw-select_key:{actionForm.dobMonth}OldValue" value="true">"
<select name="wlw-select_key:{actionForm.dobMonth}" id="dobMonth" class="dobMonth"><option" value="">Month</option>
    <option value="01">January</option>
    <option value="02">February</option>
    <option value="03">March</option>
    <option value="04">April</option>
    <option value="05">May</option>
    <option value="06">June</option>
    <option value="07">July</option>
    <option value="08">August</option>
    <option value="09">September</option>
    <option value="10">October</option>
    <option value="11">November</option>
    <option value="12">December</option></select>
<script language="JavaScript" type="text/JavaScript"> 
<!--
netui_tagIdNameMap.dobMonth="wlw-select_key:{actionForm.dobMonth}"
-->
</script>

*My Source Code Attemps ***
WebBrowser1.Document.GetElementById(“dobMonth”).SetAttribute(“selectedtext”, “March”) – dosent work

    Dim el As HtmlElement = WebBrowser1.Document.All("wlw-select_key:{actionForm.dobMonth}")
    Dim elCol As HtmlElementCollection = el.GetElementsByTagName("option")
    Dim X As Integer = 0
    For Each op As HtmlElement In elCol
        If op.InnerText = "March?" Then
            el.SetAttribute("selectedIndex", X.ToString())
            Exit For
        End If
        X += 1
    Next
  • that didnt work either

So i’m really out of options. Any ideas. I did some research on the javascript reference but didnt turn out much useful. Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:52:07+00:00Added an answer on May 17, 2026 at 9:52 pm

    as I remember, the name and id attributes are limited in the characters they can contain. curly-braces are probably not allowed. not sure if that’s your problem or not, but it’s the first thing that popped into mind… I’ll look into it some more.

    [much later…]
    OK, this works, but I hacked out a bunch of stuff, and it may not be quite what you’re looking for:

    
    <select name="dobMonth" id="dobMonth" class="dobMonth"><option value="">Month</option>
        <option value="01">January</option>
        <option value="02">February</option>
        <option value="03">March</option>
        <option value="04">April</option>
        <option value="05">May</option>
        <option value="06">June</option>
        <option value="07">July</option>
        <option value="08">August</option>
        <option value="09">September</option>
        <option value="10">October</option>
        <option value="11">November</option>
        <option value="12">December</option>
    </select>
    <script type="text/javascript">
    document.getElementById("dobMonth").selectedIndex = 3;
    </script>
    

    You had a stray double-quote in your first option tag, which may have been part of the problem. But fixing that didn’t allow the vbscript to work in my browser. I haven’t done VBscript since the mid-90s so I switched to javascript. In any case it ought to give you a basis for further development, I hope!

    [later]
    This code will set the option by text string. I tested under Firefox, it ought to work in IE also:

    
    <script type="text/javascript">
    function setSelected(month) {
     var select = document.getElementById("dobMonth");
     var options = select.getElementsByTagName("option");
     for (var i = 0; i < options.length; i++) {
      if (options[i].childNodes[0].nodeValue == month) {
       select.selectedIndex = i;
       break;
      }
     }
    }
    setSelected("March");
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was taking a look through some open-source C++ code and I noticed a
When I look at the source code for a webpage that has been rendered
I look around and see some great snippets of code for defining rules, validation,
We have been asked to look into a fully open source solution for a
Is it possible to look back through the history of a Subversion repository for
I know you can look at the row.count or tables.count, but are there other
I have a string that has HTML & PHP in it, when I pull
After several plugins got updated yesterday I saw in the source code that actually
Look at this image: alt text http://img139.imageshack.us/img139/4488/picture2ep3.png I know how to add UITableView with
Look at this situation: www.websitea.com displays an img tag with a src attribute of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.