Possibly off-topic VBSCRIPT question. 
Author Message
 Possibly off-topic VBSCRIPT question.

Hi All,

Sorry if this is off-topic, but I am having problems using the VBScript
newsgroups on news.microsoft.com. I figured maybe someone here could help
with what should be a simple problem.

What I am trying to do is create a simple price quote page using VBscript.
The entire page is enclosed below. Where I have problems is accessing the
value of selections withing HTML select boxes. Everytime I try to set some
string variables to the values of the selections, MS Explorer gives me a
"Object doesn't support this property or method" error. This happens during
this line in the script:

intCpuType = Myform.cmbCpuType.Selected

Thanks in advance for any help you can give.

                                                        Don Whitlow

p.s. Pricing in this form is just for testing. :)


<title>Custom Quote Generator</title>
<meta name="GENERATOR" content="Microsoft FrontPage 1.1">

<body background="images/paperw.gif">

<font face="Arial" size=4>
<h2 align=center>Custom Configuration and Quote Generator</h2>
<p>Simply select the hardware and software components you would like on
your next pc, click 'Submit', and watch your custom
quote appear. For additional information, or for components not listed
here, go to the extended information page.</p>
<form name="frmQuoter">
<p>CPU Type: <select name="cmbCpuType" size=1>
<option value="166">486DX-66</option>
<option value="200">Pentium 90</option>
<option value="250">Pentium 133</option>
<option value="300">Pentium 166</option>
<option value="340">Pentium-Pro 133</option>
<option value="400">Pentium-Pro 166</option>
<p>Memory: <select name="cmbRam" size=1>
<option value="8">8 MB</option>
<option value="12">12 MB</option>
<option value="16">16MB</option>
<option value="32">32 MB</option>
<p>Monitor: <select name="cmbMonitor" size=1>
<option value="250">14 " Display</option>
<option value="450">15" Display</option>
<option value="800">17" Display</option>
<option value="1600">20" Display</option>
<p>Hard Drive: <select name="cmbHardDrive" size=1>
<option value="200">800 MB IDE</option>
<option value="200">1.2 GB IDE</option>
<option value="340">1.2 GB SCSI</option>
<option value="600">2.1 GB SCSI</option>
<p><input type="BUTTON" NAME="cmdGenQuote" VALUE="Generate Quote"></p>
<script language="VBScript">

   Sub cmdGenQuote_OnClick()

   Dim MyForm
   Set MyForm = Document.frmQuoter

   Dim intCpuType
   Dim intRam
   Dim intMonitor
   Dim intHardDrive
   rem Dim In1, In2

   intCpuType = Myform.cmbCpuType.Selected
   intRam = cmbRam.Selected
   intMonitor = cmbMonitor.Value
   intHardDrive = cmbMonitor.Value  

   Dim intAvgRamPrice
   Dim lngPcQuotePrice

   intAvgRamPrice       = 10
   lngPcQuotePrice = (intCpuType + intRam + intMonitor + intHardDrive)

   MsgBox lngPcQuotePrice, 64+0

   End Sub




Wed, 24 Mar 1999 03:00:00 GMT  
 Possibly off-topic VBSCRIPT question.

> MS Explorer gives me a
> "Object doesn't support this property or method" error. This happens
> this line in the script:

> intCpuType = Myform.cmbCpuType.Selected

I believe the following is the correct syntax according to Micrsoft's IE
Object Model:

        where Index is the element in your list.

The bad news is that Microsft's syntax doesn't work yet-hopefully the next
release will correct this.

Steve Shier

Mon, 29 Mar 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. an off the topic question...

2. Can anybody answer OFF TOPIC QUESTION ?

3. Off topic: A question about web pages.

4. Question (Off topic)

5. Domain Question (DNS2Go) <off topic>

6. Off-topic IE question

7. Off topic question for programming consultants...

8. Hey Neila!!! Off the Topic Question

9. Off topic: A question about web pages.

10. Project 98 question - Off Topic

11. Off topic question - Windows95 security, etc.


Powered by phpBB® Forum Software