anyone good with javascript?

Currently reading:
anyone good with javascript?

Joined
Nov 1, 2009
Messages
5,455
Points
808
Location
Harwich
can anyone tell me why this isn't working?

Code:
<HTML>
<HEAD>
<TITLE>Task 3</TITLE>

</HEAD>

<BODY>
<script language = javascript>
    
    function checkQuantity(intInput)
    {
        var intQuantity = prompt("Please enter the number of bulbs you want to order","");
        var boolFreeDelivery = false;
        
        intInput = intQuantity ;
        
    
        
        
    }
    function noCharge()
    {
        var intQuantity ;
        var boolFreeDelivery = false;
        
        intQuantity = checkQuantity() ;
        

        
        alert(intQuantity);
        alert(boolFreeDelivery);
    }

</script>
    

<center>
<form>
<input type="button" name="cmdCheckQuantity" id="cmdCheckQuantity" value="order bulbs" onclick="checkQuantity()" />
</form>
</center>
</BODY>

</HTML>

all im trying to get it to do at the moment is pass the value of the variable intQuantity from the first function to the second function, the alerts is so i can test if it has worked this will be changed later
cheers guys :)
 
Last edited:
Back
Top