Page 1 of 1

When I define "ID" attribute in DOM PHP a "Name" is also def

Posted: Sat Jan 09, 2010 12:59 am
by sneta
defined. When I try to read it I get:

"ID X already defined"

I'm quite sure it's because there's the same value for ID and name (which is defined automatically for some reason)

DOM creation code:


$el=$doc->createElement("div");
$at3=$doc->createAttribute("id");
$at3->value="innr".$Values[0];
$el->appendChild($at3);

Dom reading code:
$doc->loadHTMLFile("myfile.htm")

SECOND QUESTION:

How the !#@$# do I pass data thorough AJAX POST (some encode and decode probably) that works for WHATEVER I pass is passed OK.

"Whatever" means signs like \" \' "+", signs like ">" which CANNOT stay %&lt (because they are used as read HTML in createDocumentFragment() and appendXML() and unicode that CANNOT stay as %uxxxx.