Link to home
Start Free TrialLog in
Avatar of kevques
kevques

asked on

Ajax form won't submit in ie after modifying css with javascript

I have a form that submits, in both IE7 and FF, but only works in FF. I have isolated the case down to two lines of code in the javascript, however, i need to hide these fields and have the form function as normal.
The reason i can't muck with the HTML/PHP, is because these fields I'm trying to hide need to be on the form, but the data is pulled from another field and placed into those.

//javascript jquery code
$j('#titlediv').attr({ style: "position:absolute;top: -1000px;" }); //hide title div
$j('#postdivrich').attr({ style: "position:absolute;top: -1000px;"}); //hide post div

I've tried doing this the same way with document.getElementById(element).className = 'hideme', but the exact same results occur.
ASKER CERTIFIED SOLUTION
Avatar of bansidhar
bansidhar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i don't like some element at top: -1000px; creating unnecessary load on the browser when there is much cleaner methods available for hiding an element :)