Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Off-Topic > I got a major VBScript problem, someone help!
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
20.Sep: FOURTH CHAPTER IN `HISTORY OF...` PUBLISHED
13.Sep: NEWS ON THE FLY
06.Sep: APOLYTON DONATES TO HURRICANE RELIEF

bottom of page
   - CIVILIZATION 3 $9.99 - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - ALPHA CENTAURI + ALIEN CROSSFIRE (laptop collection) from $19.99 - ALPHA CENTAURI PC $9.99 -->
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Sn00py is offline Sn00py
King
From New Zealand
Aug 2001
time: 13:33
  Old Post 27-03-2005 21:07 Visit Sn00py's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
I got a major VBScript problem, someone help! Support Apolyton buy from Amazon

Okay, I am new to VBScript, so go easy on me.

I have this webpage that has a form on it that collects data from a user; The typical name, address, etc.

However, the form also requires the user to choose which hotel they want to go to. (they are in drop down menu's). You hit submit then it goes to another page which pulls all the information together and also gives you a price tag.

The costs for all the hotels are in the dbm file. So when you select "whatever hotel" and hit submit, it will go into the dbm file, find "whatever hotel" find its price and then place that in the 2nd page (where you confirm the details).


Okay, that I have got working fine, but the problem lies in the fact that there is a SECOND price that needs to be ADDED to the hotel price.

Lets say for example that the user also selects a tour guide that costs $250. The information is in the database; so how to get the script to add the tour guide price and the hotel price for the confirmation page?



I'm not entirely sure, but I think this portion of the code is the bit I have to change:


if (chk1 <> 0 or chk1 <>"") then
cost_st = chk1 * cost1
else
cost_st = 0
end if
if (chk2 <> 0 or chk2 <>"") then
cost_nd = chk2 * cost2
else
cost_nd = 0
end if
if (rc_reg <> 0 and temp <> 0) then

fee_rate = objrsreg("fee_rate")
cur_type = objrsreg("cur_type")
reg_amount = cost_st + cost_nd
reg_amount = (reg_amount + (no_reg * fee_rate))



At the moment, this piece of code just does the hotel price, (no_reg is actually the number of people going to the hotel, so if the user puts in 2, it will be the cost of the hotel X 2 which is why it says "no_reg * fee_rate".

Urban Ranger is offline Urban Ranger
Apolyton Duke of Off-Topic

Donate to the Red Cross
The City State of Noosphere, CPA special envoy
May 1999
time: 13:33
  Old Post 27-03-2005 21:15
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Why would you want to use VB Script since it only works on IE?

Sn00py is offline Sn00py
King
From New Zealand
Aug 2001
time: 13:33
  Old Post 27-03-2005 21:23 Visit Sn00py's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Why do you spam every thread I make?

If you see "Sn00py" under "Thread Starter" just ignore it.

Don't reply to this! Spammer.

Urban Ranger is offline Urban Ranger
Apolyton Duke of Off-Topic

Donate to the Red Cross
The City State of Noosphere, CPA special envoy
May 1999
time: 13:33
  Old Post 27-03-2005 21:31
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Tired of ads?

Why do you consider a legitmate question spam?

Sn00py is offline Sn00py
King
From New Zealand
Aug 2001
time: 13:33
  Old Post 27-03-2005 21:36 Visit Sn00py's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Browse Apolyton AD-FREE

Okay, you see, I asked a question, and in return I got another question.


VBS does work under other browsers, I have tested it.

I just want my question answered, if you want to know the answer to your question start a thread and name it "Why do people use VBS when it only works for IE?".

Sn00py is offline Sn00py
King
From New Zealand
Aug 2001
time: 13:33
  Old Post 28-03-2005 06:12 Visit Sn00py's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Come on, someone must know!

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:33.
Apolyton Time is 00:33.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0368 seconds (86.77% PHP - 13.23% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net