Avatar billede cpccorp Juniormester
08. maj 2004 - 22:10 Der er 3 kommentarer og
1 løsning

Mangler hjælp til beregning af sum

Jeg har følgende side og jeg kan ikke rigtigt få den til at beregne summen

<html>
<script type="text/vbscript">
'dato = DateSerial(Year(date),Month(Date)+1,30)
'do while weekday(dato) = 1 or weekday(dato) = 7
'  dato = DateAdd("d",-1,dato)
'loop


function findtal(inputstreng)
dim regcon
set regcon = new RegExp
regcon.ignoreCase = true
regcon.Global = true
regcon.pattern = "([^\d])"
findtal = regcon.replace(inputstreng,"")
end function

function addnum1()
tal = findtal(document.online.D1.value)
document.online.ital1.value = CInt(tal)
end function
function addnum2()
tal = findtal(document.online.D2.value)
document.online.ital2.value = CInt(tal)
end function
function addnum3()
tal = findtal(document.online.D3.value)
document.online.ital3.value = CInt(tal)
end function
function addnum4()
tal = findtal(document.online.D4.value)
document.online.ital4.value = CInt(tal)
end function
function addnum5()
tal = findtal(document.online.D5.value)
document.online.ital5.value = CInt(tal)
end function
function addnum6()
tal = findtal(document.online.D6.value)
document.online.ital6.value = CInt(tal)
end function
function addnum7()
tal = findtal(document.online.D7.value)
document.online.ital7.value = CInt(tal)
end function

</script>
<head>
<script type="text/javascript" src="images/webfxlayout.js"></script>
<link id="webfx-tab-style-sheet" type="text/css" rel="stylesheet" href="images/tab.webfx.css"/>
<style type="text/css">

.dynamic-tab-pane-control .tab-page {
    height:        295px;
}

.dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page {
    height:        50px;
}

html, body {
    background:    ThreeDFace;
}

form {
    margin:        0;
    padding:    0;
}

/* over ride styles from webfxlayout */

body {
    margin:        10px;
    width:        100%;
    height:        100%;
}

.dynamic-tab-pane-control h2 {
    text-align:    center;
    width:        auto;
}

.dynamic-tab-pane-control h2 a {
    display:    inline;
    width:        auto;
}

.dynamic-tab-pane-control a:hover {
    background: transparent;
}



</style>
<script type="text/javascript" src="images/tabpane.js"></script>
<script type="text/javascript">

function tjeksign(mm){
if (mm.value==""){
}
else {
    if (mm.value=="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *"){
    firstsign.innerHTML = "*";
    firsttext.innerHTML = "excl. morgenmad - Husk sovepose";
    document.online.firstsigner.value = "excl. morgenmad - Husk sovepose";
    calculatesummen();
    }
    if (mm.value=="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **"){
    secondsign.innerHTML = "**";
    secondtext.innerHTML = "incl. linned - excl. morgenmad";
    document.online.secondsigner.value = "incl. linned - excl. morgenmad";
    calculatesummen();
    }
    if (mm.value=="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***"){
    thirdsign.innerHTML = "***";
    thirdtext.innerHTML = "excl. morgenmad - HUSK liggeunderlag og sovepose";
    document.online.thirdsigner.value = "excl. morgenmad - HUSK liggeunderlag og sovepose"
    calculatesummen();
    }

}

}

function calculatesummen(){
al = document.online
        if (document.online.I1.value!=""){
        document.online.summen.value = CInt(document.online.summen.value) + CInt(document.online.I1.value*document.online.ital1.value)
        }

}
</script>
<meta http-equiv="Content-Language" content="da">
<LINK href="images/VUCfyn.css" type=text/css rel=stylesheet>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Velkommen til</title>
</head>

<body style="background-color: #FFFFFF"><form name="online" style="margin: 0px;">
<input type="hidden" name="firstsigner">
<input type="hidden" name="secondsigner">
<input type="hidden" name="thirdsigner">
<input type="hidden" name="ital1">
<input type="hidden" name="ital2">
<input type="hidden" name="ital3">
<input type="hidden" name="ital4">
<input type="hidden" name="ital5">
<input type="hidden" name="ital6">
<input type="hidden" name="ital7">

<TABLE cellSpacing=13 cellPadding=0 width="100%" border=0 style="border-collapse: collapse" bordercolor="#111111">
        <TBODY>
        <TR>
          <TD class=objlinknormal vAlign=top>
          <font size="2"><u>Online bestilling af indkvartering/bespisning/aftenfest<br>
          <br>
          </u><div class="tab-pane" id="tabPane1">

<script type="text/javascript">
tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ) );
//tp1.setClassNameTag( "dynamic-tab-pane-control-luna" );
//alert( 0 )
</script>

    <div class="tab-page" id="tabPage1">
        <h2 class="tab">Indkvartering</h2>
       
        <script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage1" ) );</script>
       
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="413" id="AutoNumber1">
          <tr>
            <td width="25">
            <input type="text" name="I1" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></td>
            </font>
            <td width="968"><b><font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font></b>
          <font size="2"><font face="Verdana, Arial, Helvetica, sans-serif">
            <select size="1" name="D1" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I2" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><font size="1"><b>&nbsp;</b></font><b><font size="2">X</font><font size="1">
            </font></b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D2" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>

          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I3" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><b>
          <font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font> </b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D3" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I4" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><b>
          <font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font> </b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D4" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I5" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><b>
          <font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font> </b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D5" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I6" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><b>
          <font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font> </b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D6" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="I7" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><b>
          <font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            </font> </b>
            <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
            <select size="1" name="D7" style="font-family: Verdana; font-size: 10; font-weight: bold" onchange="tjeksign(document.online.D1)">
            <option selected>VÆLG INDKVARTERING</option>
            <option>----------------------------------------------------------
            </option>
            <option value="enkeltværelser á kr. 750,00 ( Hotel Schaumburg )">enkeltværelser á kr. 750,00 ( Hotel Schaumburg )</option>
            <option value="dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )">dobbeltværelser á kr. 900,00 ( Hotel Schaumburg )</option>
            <option value="enkeltværelser á kr. 735,00 ( Hotel Royal )">enkeltværelser á kr. 735,00 ( Hotel Royal )</option>
            <option value="dobbeltværelser á kr. 860,00 ( Hotel Royal )">dobbeltværelser á kr. 860,00 ( Hotel Royal )</option>
            <option value="4-personers hytter á kr. 300,00 ( Mejdal Camping ) *">4-personers hytter á kr. 300,00 ( Mejdal Camping ) *</option>
            <option value="4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **">4-sengs lejligheder á kr. 125,00 pr. person ( IC Vest ) **</option>
            <option value="overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***">overnatninger á kr. 60,00 pr. personer ( IC Vest Hal 1 ) ***</option>
            </select></font></td>
          </tr>
          <tr>
            <td width="25">&nbsp;</td>
            <td width="968">&nbsp;</td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="R1" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968">&nbsp;<b><font size="2">X</font><font size="1">
            RESERVATIONSGEBYR Á KR. 50,00 PR. HOLD</font></b></td>
          </tr>
          <tr>
            <td width="25">&nbsp;</td>
            <td width="968">&nbsp;</td>
          </tr>

          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="P1" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968">&nbsp;<font size="1"><b>PERSONER IALT</b></font></td>
          </tr>
          <tr>
            <td width="25">&nbsp;</td>
            <td width="968">&nbsp;</td>
          </tr>

          <tr>
            <td width="25" id="firstsign">&nbsp;</td>
            <td width="968" id="firsttext">&nbsp;</td>
          </tr>
          <tr>
            <td width="25" id="secondsign">&nbsp;</td>
            <td width="968" id="secondtext">&nbsp;</td>
          </tr>
          <tr>
            <td width="25" id="thirdsign">&nbsp;</td>
            <td width="968" id="thirdtext">&nbsp;</td>
          </tr>
         
        </table>
       
    </div>

    <div class="tab-page" id="tabPage2">
        <h2 class="tab">Bespisning</h2>
       
        <script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage2" ) );</script>
       
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="413" id="AutoNumber1">
          <tr>
          <font size="2">
            <td width="25">
            <font size="2">
            <input type="text" name="B1" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            </font>
            <td width="968"><b><font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            DAGENS STÆVNERET - Á KR. 55,00 PR. PERSON ( LØRDAG )</font></b></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="B2" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"> </font></td>
            <td width="968"><b><font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            MORGENCOMPLET - Á KR. 46,00 PR. PERSON ( SØNDAG )</font></b></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="B3" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            <td width="968"><font size="1"><b>&nbsp;</b></font><b><font size="2">X</font><font size="1">
            DAGENS STÆVNERET - Á KR. 55,00 PR. PERSON ( SØNDAG )</font></b></td>
          </tr>
        </table>
       
    </div>

    <div class="tab-page" id="tabPage3">
        <h2 class="tab">Aftenfest</h2>
       
        <script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage3" ) );</script>
       
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="413" id="AutoNumber1">
          <tr>
          <font size="2">
            <td width="25">
          <font size="2">
            <input type="text" name="A1" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"></font></td>
            </font>
            <td width="968"><b><font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            AFTENFEST Á KR. 165,00 PR. PERSON ( LØRDAG ) <a href="menuen.asp">SE
            MENUEN</a></font></b></td>
          </tr>
          <tr>
            <td width="25">
          <font size="2">
            <input type="text" name="A2" size="3" style="font-size: 10; font-family: Verdana; font-weight: bold; text-align:center"> </font></td>
            <td width="968"><b><font size="1">&nbsp;</font><font size="2">X</font><font size="1">
            BUSTRANSPORT - TIL/FRA FESTEN - Á 30,00 PR. PERSON</font></b></td>
          </tr>
        </table>
        <br>
        <font size="1">HUSK BUSSEN MEDTAGER KUN PERSONER MED GYLDIG BILLET
        </font>
    </div>

    <div class="tab-page" id="tabPage4">
        <h2 class="tab">Afslut bestilling</h2>
       
        <script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage4" ) );</script>
       
       
        <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
          <tr>
            <td width="147"><font size="1">Forening</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Firma/klub</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Kontaktperson</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Adresse(privat)</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Adresse(arbejde)</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Telefon/mobil (privat)</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Telefon/mobil (arbejde)</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Email</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147">&nbsp;</td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Ankomstdato</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Afrejsedato</font></td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147">&nbsp;</td>
            <td width="591">&nbsp;</td>
          </tr>
          <tr>
            <td width="147"><font size="1">Sum iilat</font></td>
            <td width="591"><input type="text" name="summen" size="20"></td>
          </tr>
        </table>
        <input type="submit" value="Send" name="B4" style="float: right"></div>

</div>
<script type="text/javascript">
//<![CDATA[

setupAllTabs();

//]]>
          </script></TD></TR></TBODY></TABLE></form>
</body>

</html>
Avatar billede ellebaek Nybegynder
08. maj 2004 - 22:30 #1
vil sige at du skal udbygge den her funktion:

function calculatesummen(){
al = document.online
        if (document.online.I1.value!=""){
        document.online.summen.value = CInt(document.online.summen.value) + CInt(document.online.I1.value*document.online.ital1.value)
        }

}

så den indeholder alle tallene fra 1-7 altså:

function calculatesummen(){
al = document.online
        if (document.online.I1.value!=""){
        document.online.summen.value = CInt(document.online.summen.value) + CInt(document.online.I1.value*(document.online.ital1.value+document.online.ital2.value+document.online.ital3.value+document.online.ital4.value+document.online.ital5.value+document.online.ital6.value+document.online.ital7.value)
        }

}
Avatar billede ellebaek Nybegynder
08. maj 2004 - 22:54 #2
Hmm.. Den ødelagde ikke lige linien når der ikke var nogen mellemrum.. Og så manglede der lige en slut parentes..

function calculatesummen(){
al = document.online
        if (document.online.I1.value!=""){
        document.online.summen.value = CInt(document.online.summen.value) + CInt(document.online.I1.value*(document.online.ital1.value+document.online.ital2.value+ document.online.ital3.value+document.online.ital4.value+document.online.ital5.value+ document.online.ital6.value+document.online.ital7.value))
        }

}
Avatar billede cpccorp Juniormester
21. maj 2005 - 13:35 #3
læg et svar
Avatar billede ellebaek Nybegynder
21. maj 2005 - 23:46 #4
jamen et svar i din retning :-)

..Ellebæk!
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester