Variable not defined in FireFox

Discussion in 'JavaScript' started by Sushi_Master, Jan 28, 2009.

  1. #1
    I'm having a variable issue which appears in firefox (it works fine in IE)

    Here is my code:

    
    <form id="thePropertiesForm" name="thePropertiesForm" action="page-preview-properties.cfm" method="post">
    	<input name="frmAdminPIPID" type="hidden" value="1"/>
    	<input name="frmSectionID" type="hidden" value="1" />
    	<input name="frmTask" type="hidden" value="1" />
    </form>
    
    function proceedToProperties(vStructureID) {
    
    thePropertiesForm.frmAdminPIPID.value=vStructureID;
    thePropertiesForm.frmSectionID.value=document.formPreview.sectionID.value;
    thePropertiesForm.submit();
    
    }
    
    
    Code (markup):
    In firefox I get there error thePropertiesForm is not defined.

    Can anybody spot where I'm going wrong?

    Thanks
     
    Sushi_Master, Jan 28, 2009 IP
  2. lp1051

    lp1051 Well-Known Member

    Messages:
    163
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Hi,
    what if you insert document. before thePropertiesForm....?? Any better??
     
    lp1051, Jan 28, 2009 IP
  3. Sushi_Master

    Sushi_Master Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Brilliant, yes that worked :)

    Many thanks
     
    Sushi_Master, Jan 28, 2009 IP