Information générale
Catégorie:
Applications Internet
Hi,
Not sure what you are worried about here. If I understand you correctly, you say the onclick() action is enclosed in quotes and works in FireFox and IE. So does it matter that the IE DOM shows the innerHTML with the quotes stripped ?
Regards,
Viv
>I was working through using XML to transfer an HTML string to a page (TABLE) to service a JavaScript treeview. It uses DOM and innerHTML to assign the string inside SPAN tags. It works.
>
>The string includes (A)nchor tags with onclick events. In order to build a parsable XML, things like WIDTH assignements need to have their numerical values inside quotes (WIDTH="0")
. And the onclick method requires quotes around the JavaScript function pointer to be effective onclick="myJavaFunction(this)"
>
>With FireFox innherHTML shows:(A id="ATAG" onclick="myfunction()")(/A)
>
>With IE:(A id="ATAG" onclick=myfunction())(/A)
>
>Whats amazing about this is that a server issued XML script filled with HTML tags actually fires the functions predefined in the client "pages".
>
>With Firefox, reading the innerHTML of a document (alert(document.spanobj.innerHTML);) renders the contained HTML and includes the "quote" marks.
>
>With IE the quotes are stripped from both the dimension tags and method tags. I am using IE 6.1 for this project. Is that still the case with IE. Also, IE does not allow addressing a TAG unless it is referenced by a "getElementID("spanobj").
>
>Is there a flag feature that will allow IE's implementation of innerHTML to retain the quote marks?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement