Promet Knowledge Sharing

Archive for the ‘ajax’ tag

InnerHTML in Firefox

without comments

I ran once an error in InnerHTML when trying to display AJAX imported form fields and post the values entered for these fields. The values were being passed when the form is submitted in IE, but not in Firefox. Firefox only returns a javascript error stating that the field has no properties and thus returning an undefined value.

After much trials-and-error reconstructing the AJAX imported field and searching the net for a possible solution, I came upon this site (http://www.robertnyman.com/2006/04/20/we-all-love-innerhtml/) where the fix came from one of the readers’ comments.

You need to make the form, where the AJAX imported form fields are located, nested correctly. As for my case, it should follow the correct nesting layout between forms and table. So I changed this previous layout:

<table>
 <form> 
   …. Other elements here ..
 </form>
</table>

To this:

<form>
  <table>
   …. Other elements here ..
  </table>
</form>

And that did the trick, I was then able to submit values entered from the AJAX generated fields passed through innerHTML in Firefox.

Written by tere

August 21st, 2008 at 5:28 am

Posted in HTML, Javascript

Tagged with , , ,

Promet Knowledge Sharing Site

without comments

The Promet Knowledge Sharing Site is now live!

This blog will serve as compilation of codes, programming tips, suggestions and solutions for the common and not so ordinary problems or errors encountered by Promet Source developers and were able to create or find solution which can be of help to other programmers within and outside the team.

Articles for PHP, Javascript, AJAX, HTML, CSS and other software or application is catered as well as tips and tutorials for tools like OSCommerce, Drupal, Joomla, Wordpress and others are welcome for posting.

So, coders .. let’s post in!

Written by tere

August 20th, 2008 at 7:45 am

Posted in News

Tagged with , , , , , , , , ,