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

  • Home
  • SEARCH
  • 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 7570517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:26:45+00:00 2026-05-30T15:26:45+00:00

Hey guys have her an code where i add an option to a html

  • 0

Hey guys have her an code where i add an option to a html dropdownbox with vbscript. But i want this added option set as default how can i do this. Here is the code:

Sub Window_OnLoad
        ForReading = 1
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.OpenTextFile _
            ("C:\Temp\CAD_Kunde.txt", ForReading)
        Do Until objFile.AtEndOfStream
            strLine = objFile.ReadLine
            Set objOption = Document.createElement("OPTION")
            objOption.Text = strLine
            objOption.Value = strLine
            formname.select1.Add(objOption)

        Loop
        objFile.Close
    End Sub
  • 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-30T15:26:47+00:00Added an answer on May 30, 2026 at 3:26 pm

    This should work:

    objOption.Selected = "selected"
    

    I hope you’re aware that client side VBScript is really really bad idea for any public website?

    • It was developed for Internet Explorer only very long time ago.
    • It’s still supported only by Internet Explorer.
    • Microsoft is not putting any efforts to develop new features of the client side VBScript and I won’t be surprised if some future version of IE will stop supporting it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;
Hey guys I have setup Nivo slider to my specification, but what I want
hey guys i have got this far with a chat system but now i
Hey guys I have an assigned array from mysql results and I simply want
Hey guys I have a query that selects data and organizes but not in
Hey guys! I have this little problem: I have one ViewController which adds 2
Hey guys, I have a problem (again). This time I am trying to use
Hey guys. I have a method that gets called each second which I want
Hey guys, I have a problem with a code that I've been writing. I
Hey guys i have 6 checkboxes and am using their rel= values to add

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.