[Phpwm] Javascript / IE / prototype issues.

Paul Matthews paul.matthews.86 at gmail.com
Fri May 25 22:03:24 BST 2007


On 5/25/07, Greg Jones <greg.jones at gmail.com> wrote:
>
> If I have some time tomorrow, I will give a longer answer if you're still
> wanting one, but a couple of your points are quick:
>
> On Fri, 25 May 2007 17:45:52 +0100, Paul Matthews
> <paul.matthews.86 at gmail.com> wrote:
>
>
> > 1) There's no HTML Object to HTML code, though innerHTML is close, it's
> > not
> > the entirely there.
> > 2) all of prototype's DOM insert methods take in html strings (and use
> > string id's for inserting before / after / above / down).
>
> I very rarely use Insertion.X as they're not much use. If you're using
> scriptaculous already, then Builder.node() is useful (you could just use
> the Builder.js part). Prototype has code in SVN for 'var div = new
> Element('div',{className:'some_class',id:'some_id'});' if using that's an
> option. It looks nice, but haven't tried it yet myself.
>
> > 3) When I've tried to use the methods with innerHTML I've got from other
> > objects, nothing happens.
> > 4) IE seems to not like innerHTML very much, I've come across a lot of
> > problems, trying to do it, of course none of the errors are helpful
> > either.
>
>
>
> > 5) When trying to clone the objects for obj.appendChild(cloned_obj), the
> > objects are shallow cloned, which to all intents and purposes is
> > pointless!
>
> passing 'true' to cloneNode() should cause it to do a deep copy.
>
> > 6) I can't seem to appendChild() on a select element with option
> > elements,
> > god knows why but even Firefox doesn't like that one, it gives an error
> > 'Node
> > cannot be inserted at the specified point in the hierarchy" code: "3'
>
> I tend to add option-nodes to the options array of the select:
>
> $('select_id').options[$('select_id').options.length]=new_option;
>
> I seem to remember a time when adding the options to the select, before
> the select is added to the document worked, when the other way round
> didn't
>
>
> If you want to include/paste-bin the html of the table you're using, then
> if (when) I get bored tomorrow, I can check that what I reply with
> actually works :)
>
> Greg
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>


Thaks greg,
Not that I've tried it yet but I think you've answered enough for what I
need to do.

If I can't get it to work (though I doubt it'll be tomorrow) I'll send you a
paste bin and ask if you can take a look at what I'm doing wrong.


Once again mate, thankyou for replying.

>From Paul


More information about the Phpwm mailing list