SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form submits in Firefox but not IE

    I may be asking a lot on this one but could someone tell me why this form works in Firefox and not IE.

    In IE it actually calculates like it is suppose to but then it is suppose to go to another page but instead it just sits there.

    If you want to see it work correctly, use Firefox. After calculate, the calculations takes place and then you go to a thank you page.

    I thought this was pretty basic stuff but I can not figure this out for the life of me.

    Thanks for your time.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="submit" name="Add" value="Calculate"
    	    onClick="document.quotesheet.Total.value =
        (parseInt(document.quotesheet.Piano.value) * parseInt(document.quotesheet.mPiano.value)) +
    	(parseInt(document.quotesheet.Ent_Center.value) * parseInt(document.quotesheet.mEnt_Center.value)) +
    	(parseInt(document.quotesheet.Big_screen.value) * parseInt(document.quotesheet.mBig_screen.value)) +
    	(parseInt(document.quotesheet.TV_Large.value) * parseInt(document.quotesheet.mTV_Large.value)) +
    	(parseInt(document.quotesheet.TV_Portable.value) * parseInt(document.quotesheet.mTV_Portable.value)) +
    	(parseInt(document.quotesheet.TV_Stand.value) * parseInt(document.quotesheet.mTV_Stand.value)) +
    	(parseInt(document.quotesheet.VCR_Stereo.value) * parseInt(document.quotesheet.mVCR_Stereo.value)) +
    	(parseInt(document.quotesheet.Sofa.value) * parseInt(document.quotesheet.mSofa.value)) +
    	(parseInt(document.quotesheet.Love_Seat.value) * parseInt(document.quotesheet.mLove_Seat.value)) +
    	(parseInt(document.quotesheet.Sleeper_Sofa.value) * parseInt(document.quotesheet.mSleeper_Sofa.value)) +
    	(parseInt(document.quotesheet.Sectional_Sofa.value) * parseInt(document.quotesheet.mSectional_Sofa.value)) +
    	(parseInt(document.quotesheet.Recliner.value) * parseInt(document.quotesheet.mRecliner.value)) +
    	(parseInt(document.quotesheet.Ottoman.value) * parseInt(document.quotesheet.mOttoman.value)) +
    	(parseInt(document.quotesheet.Coffee_table.value) * parseInt(document.quotesheet.mCoffee_table.value)) +
    	(parseInt(document.quotesheet.End_table.value) * parseInt(document.quotesheet.mEnd_table.value)) +
    	(parseInt(document.quotesheet.Bookcase_Large.value) * parseInt(document.quotesheet.mBookcase_Large.value)) +
    	(parseInt(document.quotesheet.Bookcase_small.value) * parseInt(document.quotesheet.mBookcase_small.value)) +
    	(parseInt(document.quotesheet.Hall_tree.value) * parseInt(document.quotesheet.mHall_tree.value)) +
    	(parseInt(document.quotesheet.Grandfather_Clock.value) * parseInt(document.quotesheet.mGrandfather_Clock.value)) +
    	(parseInt(document.quotesheet.SmGlass_mrbl_top.value) * parseInt(document.quotesheet.mSmGlass_mrbl_top.value)) +
    	(parseInt(document.quotesheet.lgGlass_mrbl_top.value) * parseInt(document.quotesheet.mlgGlass_mrbl_top.value)) +
    	(parseInt(document.quotesheet.Dinning_table.value) * parseInt(document.quotesheet.mDinning_table.value)) +
    	(parseInt(document.quotesheet.dinning_chairs.value) * parseInt(document.quotesheet.mdinning_chairs.value)) +
    	(parseInt(document.quotesheet.buffet_server.value) * parseInt(document.quotesheet.mbuffet_server.value)) +
    	(parseInt(document.quotesheet.china_cabinet.value) * parseInt(document.quotesheet.mchina_cabinet.value)) +
    	(parseInt(document.quotesheet.Curio_Cabinet.value) * parseInt(document.quotesheet.mCurio_Cabinet.value)) +
    	(parseInt(document.quotesheet.Microwave.value) * parseInt(document.quotesheet.mMicrowave.value)) +
    	(parseInt(document.quotesheet.Refrigerator_Freezer.value) * parseInt(document.quotesheet.mRefrigerator_Freezer.value)) +
    	(parseInt(document.quotesheet.Washer_dryer.value) * parseInt(document.quotesheet.mWasher_dryer.value)) +
    	(parseInt(document.quotesheet.waterbed.value) * parseInt(document.quotesheet.mwaterbed.value)) +
    	(parseInt(document.quotesheet.King_bed.value) * parseInt(document.quotesheet.mKing_bed.value)) +
    	(parseInt(document.quotesheet.Queen_smaller.value) * parseInt(document.quotesheet.mQueen_smaller.value)) +
    	(parseInt(document.quotesheet.trundle_bed_bunk.value) * parseInt(document.quotesheet.mtrundle_bed_bunk.value)) +
    	(parseInt(document.quotesheet.Crib_babybed.value) * parseInt(document.quotesheet.mCrib_babybed.value)) +
    	(parseInt(document.quotesheet.Dresser_chest.value) * parseInt(document.quotesheet.mDresser_chest.value)) +
    	(parseInt(document.quotesheet.Armoire.value) * parseInt(document.quotesheet.mArmoire.value)) +
    	(parseInt(document.quotesheet.Nighstand.value) * parseInt(document.quotesheet.mNighstand.value)) +
    	(parseInt(document.quotesheet.Footlocker.value) * parseInt(document.quotesheet.mFootlocker.value)) +
    	(parseInt(document.quotesheet.Changing_table.value) * parseInt(document.quotesheet.mChanging_table.value)) +
    	(parseInt(document.quotesheet.Clothing.value) * parseInt(document.quotesheet.mClothing.value)) +
    	(parseInt(document.quotesheet.Mirror.value) * parseInt(document.quotesheet.mMirror.value)) +
    	(parseInt(document.quotesheet.Office_Desk.value) * parseInt(document.quotesheet.mOffice_Desk.value)) +
    	(parseInt(document.quotesheet.Small_desk.value) * parseInt(document.quotesheet.mSmall_desk.value)) +
    	(parseInt(document.quotesheet.Desk_hutch.value) * parseInt(document.quotesheet.mDesk_hutch.value)) +
    	(parseInt(document.quotesheet.Credenza.value) * parseInt(document.quotesheet.mCredenza.value)) +
    	(parseInt(document.quotesheet.Desk_chair.value) * parseInt(document.quotesheet.mDesk_chair.value)) +
    	(parseInt(document.quotesheet.Twodrawer_file.value) * parseInt(document.quotesheet.mTwodrawer_file.value)) +
    	(parseInt(document.quotesheet.Fourdrawer_file.value) * parseInt(document.quotesheet.mFourdrawer_file.value)) +
    	(parseInt(document.quotesheet.Twodrawer_lateral_file.value) * parseInt(document.quotesheet.mTwodrawer_lateral_file.value)) +
    	(parseInt(document.quotesheet.Fourdrawer_lateral_file.value) * parseInt(document.quotesheet.mFourdrawer_lateral_file.value)) +
    	(parseInt(document.quotesheet.Computer_Printer.value) * parseInt(document.quotesheet.mComputer_Printer.value)) +
    	(parseInt(document.quotesheet.sm_med_boxes.value) * parseInt(document.quotesheet.msm_med_boxes.value)) +
    	(parseInt(document.quotesheet.Lg_Boxes.value) * parseInt(document.quotesheet.mLg_Boxes.value)) +
    	(parseInt(document.quotesheet.Pictures.value) * parseInt(document.quotesheet.mPictures.value)) +
    	(parseInt(document.quotesheet.Rug.value) * parseInt(document.quotesheet.mRug.value)) +
    	(parseInt(document.quotesheet.Lamp.value) * parseInt(document.quotesheet.mLamp.value)) +
    	(parseInt(document.quotesheet.Plants.value) * parseInt(document.quotesheet.mPlants.value)) +
    	(parseInt(document.quotesheet.Vacuum_ironingboard.value) * parseInt(document.quotesheet.mVacuum_ironingboard.value)) +
    	(parseInt(document.quotesheet.Sewing_machine.value) * parseInt(document.quotesheet.mSewing_machine.value)) +
    	(parseInt(document.quotesheet.bike_bbq.value) * parseInt(document.quotesheet.mbike_bbq.value)) +
    	(parseInt(document.quotesheet.headboard_footboard.value) * parseInt(document.quotesheet.mheadboard_footboard.value)) +
    	(parseInt(document.quotesheet.pu_Stairs.value) * parseInt(document.quotesheet.mpu_Stairs.value)) +
    	(parseInt(document.quotesheet.do_Stairs.value) * parseInt(document.quotesheet.mdo_Stairs.value))
    	">
    *whistles*

    I'm not surprised that a browser had an issue with that.
    Make a separate function.

    Also, you should use the onsubmit event of <form> instead of the onclick event of <input>.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, you should use the onsubmit event of <form> instead of the onclick event of <input>.
    Even though I have made this correction, IE still does not submit the info to quote-form.cfm like it is suppose to. It just sits there.

    Here is the form


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •