Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][JavaScript]Problem z obliczaniem
uczysie
post 27.07.2008, 13:35:25
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 27.07.2008

Ostrzeżenie: (0%)
-----


Witam! Aktualnie skrypt przelicza wartości wpisane automatycznie, chciałbym aby przeliczanie nastąpiło po kliknięciu na przycisk.

KOD:
Kod
<html>
<head>
<title>OCS Resolution Security Order Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../Jarvis/default.css" rel="stylesheet" type="text/css">        <!-- attaches a stylesheet .-->

<script LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<style type="text/css">
<!--
.style1 {
     color: #000000;
     font-weight: bold;
}
-->
</style>

<script LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!--
function currentDate()
         {
             var today = new Date()
             var year = today.getYear()
             if (year < 2000)
             year = year + 1900
             var month = today.getMonth() + 1
             var day  = today.getDate()
             if (month <= 9) month = "0" + month;
             if (day <= 9) day = "0" + day;
             date = day + "/" + month + "/" + year
             document.uniform.Date.value  = date
         }

function numeralsOnly(evt)
         {
         evt = (evt) ? evt : event;
         var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.ehich) ? evt.which : 0));
         if (charCode>32 && (charCode <48 || charCode > 57 ))
             {
                 alert("Must be a quantity");
                 return false;
             }
             return true;
         }




function checkform(form)
     {

            if (uniform.costcentre.value =="")
     {
         alert("Please select your Invoice address from the available list")
         uniform.costcentre.focus()
         return false;
     }


     if (uniform.firstname.value =="")
     {
         alert("Please enter your First name")
         uniform.firstname.focus()
         return false;
     }

     if (uniform.lastname.value =="")
     {
         alert("Please enter your Surname")
         uniform.lastname.focus()
         return false;
     }

     if (uniform.email.value =="")
     {
         alert("Please enter a valid email address, we need this to send your order confirmation.")
         uniform.email.focus()
         return false;
     }

    if (uniform.ponum.value =="")
     {
         alert("Please enter a valid Purchase Order Number.")
         uniform.ponum.focus()
         return false;
     }

     if (uniform.phoneno.value =="")
     {
         alert("Please enter your telephone number")
         uniform.phoneno.focus()
         return false;
     }
     if (uniform.managersname.value =="")
     {
         alert("Please enter the name of the person ordering")
         uniform.managersname.focus()
         return false;
     }
}




<!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL:  http://fineline.xs.mw -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=40
,height=680');");
}
// End -->

</SCRIPT>


Ten post edytował uczysie 27.07.2008, 13:39:44
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 09:41