开发者

Generating form element with javascript and POSTing them to php works in EI not in Chrome and Firefox

开发者 https://www.devze.com 2023-03-22 14:22 出处:网络
I can\'t get my head around this problem. I have a page on which there is a form generated by php. Then I\'m using Javascript to track number of selected checkboxes and in a real time generating a tex

I can't get my head around this problem. I have a page on which there is a form generated by php. Then I'm using Javascript to track number of selected checkboxes and in a real time generating a text with this information as well hidden input with this very same value I tried to use both jQuery and raw Javascript.

var message=first+'<input name="first_credit" type="hidden" value="'+first+'"/>';

$('#render_second').html(message).show();
document.getElementById('render_second').inn开发者_StackOverflowerHTML = message;    

The value that is stored in variable first gets displayed correctly in all browsers, but when I post the form only in EI I get the value of first_credit. In FireFox and Chrome its as if that hidden element is not a part of form.

Thank you for your time chaps.

And here is the solution ... I opened the table tag, then the form opening tag and then trs and tds one of which contained the div in to which I was rendering the input field. All I did is, first open the form tag and then table tag and it all works fine :-) Sorry to waste your time folks...


And here is the solution ... I opened the table tag, then the form opening tag and then trs and tds one of witch contained the div in to witch I was rendering the input field. All I did is, first open the form tag and then table tag and it all works fine :-) Sory to waste your time folks...

0

精彩评论

暂无评论...
验证码 换一张
取 消