efficacious Posted September 24, 2008 Share Posted September 24, 2008 Hi all, Getting this error: Object doesn't support property or method My code: <script> function GetEmpDetails() { document.getElementById('TheForm').action='EmpHours.php'; document.getElementById('TheForm').submit(); } </script> form code: <form id='TheForm' name='TheForm' action='../Ca_info/Ceh_info.php' method='post'> thanks for you help, `eff Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/ Share on other sites More sharing options...
JasonLewis Posted September 24, 2008 Share Posted September 24, 2008 You are? How are you calling the function? Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649412 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 calling with: <select name='Employee' onchange='GetEmpDetails()' > Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649417 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 hmm it won't even let me post it.. geezuz onchange='GetEmpDetails()' Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649420 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 o-n-c-h-a-n-g-e-=-'-G-e-t-E-m-p-D-e-t-a-i-l-s-(-)-;-'- lol only way it would post for me Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649423 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 ok This is seriously screwed up.. I did a test page to see if it was just a syntax error or what.. But bare bones I threw <script> function GetEmpDetails() { alert(document.getElementById('MyForm').action); } </script> then I put in <form id='MyForm' action='mypage.php' method='post'> <select name='Select' onchange='GetEmpDetails();'> <option value='1'>Opt1</option> <option value='2'>Opt2</option> </select> </form> RESULTS IN: mypage.php why will it work there but then on my page I get [Object] as my result???? The only difference between above script and myne is that myne in echoed out to the page through php? But the html looks fine in ViewSource so whats the problem? Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649460 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 omg this is driving me crazy... I put the test through every conceivable thing so that it matches the other page. SAME FRIKIN RESULT... Works on testing.php but not on EmpHours.php Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649473 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 Bump... I'm at a dead stop until this is resolved.. Thankz Lets hear some ideas... anything.... There has got to be a reason this is doing this. Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649527 Share on other sites More sharing options...
efficacious Posted September 24, 2008 Author Share Posted September 24, 2008 THIS TOPIC IS SOLVED THE ERRORS HERE ARE CONTRIBUTED TO A SERIOUS JS FLAW Visit this topic for further info: http://www.v7n.com/forums/coding-forum/100116-js-form-wackjob.html Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-649781 Share on other sites More sharing options...
JasonLewis Posted September 25, 2008 Share Posted September 25, 2008 Well there you go, yeah I was confused because I tested you code on a blank page and it worked. Link to comment https://forums.phpfreaks.com/topic/125606-solved-object-doesnt-support-property-or-method/#findComment-650257 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.