VBS calculator - Why wont it work in firefox??

Discussion in 'Programming' started by quad_design, Aug 20, 2008.

  1. #1
    Here's the code from the vbs file and it works fine in Explorer so i know its set up correctly.

    Any ideas why it wont work in firefox??


    vbs....

    Sub WorkItOutVB0()

    if not IsNumeric(form.width.value) then
    MsgBox("Please Enter A Valid Width")
    exit sub
    end if

    if not IsNumeric(form.height.value) then
    MsgBox("Plese Enter A Valid Height")
    exit sub
    end if

    n_width = CDbl(Form.width.value)/100
    n_height = CDbl(Form.height.value)/100

    if abs(n_width - Int(n_width)) > 0 then
    n_width = Int(n_width) + 1
    end if

    if abs(n_height - Int(n_height)) > 0 then
    n_height = Int(n_height) + 1
    end if

    n_total = n_width * n_height
    n_total = n_total + 100
    n_total = n_total - (n_total*0.20)
    n_total = n_total + 10


    n_total = n_total + n_extra

    Form.width.value = n_width * 100
    Form.height.value = n_height * 100

    Form.Price.Value = FormatNumber(n_total,2)
    End Sub


    html...

    <script type="text/VBScript" src="form0.vbs"></script> (in head)

    <script language="VBScript" for="Button" event="onClick">WorkItOutVB0()</script>
     
    quad_design, Aug 20, 2008 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    IE is the only browser that supports client side VBScript. Firefox, Safari and Opera will not.
     
    blueparukia, Aug 20, 2008 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Use Javascript or a server side scripting language like PHP.

    Peace,
     
    Barti1987, Aug 20, 2008 IP
  4. egoldseller

    egoldseller Guest

    Messages:
    213
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello ,

    you can keep your code in VBScript , and use web server who they provide ASP ,

    if you haven't , host your asp file in a free ASP web hosting and call it from your webserver via php !

    this is like my situation , I've a file called websms.asp I've hosted this file in www.webng.com (free asp hosting) and I call this file via my php page ...

    Regards

    Egoldseller.
     
    egoldseller, Aug 20, 2008 IP