Fetstil Fetstil Kursiv Understrykning linje färgläggning tabellverk Punktlista Nummerlista Vänster Centrerat högerställt Utfyllt Länk Bild htmlmode
  • Forum & Blog
    • Forum - översikt
      • .Net
        • asp.net generellt
        • c#
        • vb.net
        • f#
        • silverlight
        • microsoft surface
        • visual studio .net
      • databaser
        • sql-server
        • databaser
        • access
        • mysql
      • mjukvara klient
        • datorer och komponenter
        • nätverk, lan/wan
        • operativsystem
        • programvaror
        • säkerhet, inställningar
        • windows server
        • allmänt
        • crystal reports
        • exchange/outlook
        • microsoft office
      • mjukvara server
        • active directory
        • biztalk
        • exchange
        • linux
        • sharepoint
        • webbservers
        • sql server
      • appar (win/mobil)
      • programspråk
        • c++
        • delphi
        • java
        • quick basic
        • visual basic
      • scripting
        • asp 3.0
        • flash actionscript
        • html css
        • javascript
        • php
        • regular expresssion
        • xml
      • spel och grafik
        • DirectX
        • Spel och grafik
      • ledning
        • Arkitektur
        • Systemutveckling
        • krav och test
        • projektledning
        • ledningsfrågor
      • vb-sektioner
        • activeX
        • windows api
        • elektronik
        • internet
        • komponenter
        • nätverk
        • operativsystem
      • övriga forum
        • arbete karriär
        • erbjuda uppdrag och tjänster
        • juridiska frågor
        • köp och sälj
        • matematik och fysik
        • intern information
        • skrivklåda
        • webb-operatörer
    • Posta inlägg i forumet
    • Chatta med andra
  • Konto
    • Medlemssida
    • Byta lösenord
    • Bli bonsumedlem
    • iMail
  • Material
    • Tips & tricks
    • Artiklar
    • Programarkiv
  • JOBB
  • Student
    • Studentlicenser
  • KONTAKT
    • Om pellesoft
    • Grundare
    • Kontakta oss
    • Annonsering
    • Partners
    • Felanmälan
  • Logga in

Hem / Forum översikt / inlägg

Posta nytt inlägg


Göra om vbScript till ASP.

Postades av 2003-10-30 16:28:31 - Axel S, i forum asp - allmänt, Tråden har 2 Kommentarer och lästs av 451 personer

Jag klarar inte av att göra om mitt vbScript till ASP. Kan någon vänlig själ hjälp mig?

<script language="VBScript">

Option Explicit
Sub cmdUpdate_OnClick
Dim TheForm
Dim dblHomeGoalsProduced, dblHomeGoalsAgainst
Dim dblAwayGoalsProduced, dblAwayGoalsAgainst
Dim dblVectorHomeGoalsProduced(9), dblVectorHomeGoalsAgainst(9), dblVectorHomeGoalsAverage(9)
Dim dblVectorAwayGoalsProduced(9), dblVectorAwayGoalsAgainst(9), dblVectorAwayGoalsAverage(9)
Dim dblHomeWinPercent, dblAwayWinPercent, dblTiePercent
Dim dblHomePercent, dblAwayPercent
Dim intFactorial, i, j
set TheForm = document.test

If IsNumeric(TheForm.txtHomeMatches.Value) = -1 and IsNumeric(TheForm.txtHomeGoalsProduced.Value) = -1 and IsNumeric(TheForm.txtHomeGoalsAgainst.Value) = -1 and IsNumeric(TheForm.txtAwayMatches.Value) = -1 and IsNumeric(TheForm.txtAwayGoalsProduced.Value) = -1 and IsNumeric(TheForm.txtAwayGoalsAgainst.Value) = -1 Then

If TheForm.txtHomeMatches.Value >= 3 and TheForm.txtHomeGoalsProduced.Value >= 0 and (TheForm.txtHomeGoalsProduced.Value / TheForm.txtHomeMatches.Value) <= 5 and TheForm.txtHomeGoalsAgainst.Value >= 0 and (TheForm.txtHomeGoalsAgainst.Value / TheForm.txtHomeMatches.Value) <= 5 and TheForm.txtAwayMatches.Value >= 3 and (TheForm.txtAwayGoalsProduced.Value / TheForm.txtAwayMatches.Value) <= 5 and TheForm.txtAwayGoalsProduced.Value >= 0 and (TheForm.txtAwayGoalsAgainst.Value / TheForm.txtAwayMatches.Value) <= 5 and TheForm.txtAwayGoalsAgainst.Value >= 0 Then

dblHomeGoalsProduced = TheForm.txtHomeGoalsProduced.Value / TheForm.txtHomeMatches.Value
dblHomeGoalsAgainst = TheForm.txtHomeGoalsAgainst.Value / TheForm.txtHomeMatches.Value

osv.......

TACK!


Svara

Sv: Göra om vbScript till ASP.

Postades av 2003-10-30 20:21:31 - Axel S

det funkar inte att bara sätta ut <%

vad är det som måste ändras?


Svara

Sv: Göra om vbScript till ASP.

Postades av 2003-10-31 00:42:43 - Pelle Johansson

Du måste hämta in värden som TheForm.txtHomeMatches.Value först när sidan submittats. Lägg allting inom en form och låt sidan submitta till sig själv.

Sen kan du fånga alla värden genom att exempelvis skriva:

txtHomeMatches = Request.form("txtHomeMatches")


Svara

Nyligen

  • 14:23 Fotboll i Sverige 2026: En Komplet
  • 12:36 Gaveidé: Black Wood Collector's Se
  • 10:58 Introducing Korea’s Unique Squirre
  • 10:12 Smart Online Safety: Why Doubt, Ve
  • 10:00 Verification Checklist: A Practica
  • 09:57 How Torrent Protocol Really Works:
  • 09:04 Real Online Scam & Fraud Cases Arc
  • 09:02 My Personal Guide to Using Online

Sidor

  • Hem
  • Bli bonusmedlem
  • Läs artiklar
  • Chatta med andra
  • Sök och erbjud jobb
  • Kontakta oss
  • Studentlicenser
  • Skriv en artikel

Statistik

Antal besökare:
Antal medlemmar:
Antal inlägg:
Online:
På chatten:
4 573 480
28 055
260 260
562
0

Kontakta oss

Frågor runt konsultation, rådgivning, uppdrag, rekrytering, annonsering och övriga ärenden. Ring: 0730-88 22 24 | pelle@pellesoft.se

© 1986-2013 PelleSoft AB. Last Build 4.1.7169.18070 (2019-08-18 10:02:21) 4.0.30319.42000
  • Om
  • Kontakta
  • Regler
  • Cookies