Click here to Skip to main content
15,889,867 members
Home / Discussions / Web Development
   

Web Development

 
QuestionSite Crashes with IE7, 8 and addons enabled Pin
nickmaroulis1-May-09 18:36
nickmaroulis1-May-09 18:36 
AnswerRe: Site Crashes with IE7, 8 and addons enabled Pin
Marc Firth4-May-09 22:07
Marc Firth4-May-09 22:07 
Questioncrystal report logon Pin
amaaal1-May-09 15:48
amaaal1-May-09 15:48 
QuestionIE: innerHTML to table id Pin
LordLothar1-May-09 3:21
LordLothar1-May-09 3:21 
GeneralRe: IE: innerHTML to table id Pin
led mike1-May-09 4:30
led mike1-May-09 4:30 
GeneralRe: IE: innerHTML to table id Pin
LordLothar1-May-09 6:11
LordLothar1-May-09 6:11 
GeneralRe: IE: innerHTML to table id Pin
led mike1-May-09 7:52
led mike1-May-09 7:52 
GeneralRe: IE: innerHTML to table id Pin
LordLothar1-May-09 17:24
LordLothar1-May-09 17:24 
My bad, what I mean is, first I tried it in JavaScript (never mind about this).

Since I use session in php thus I will loop my array and put it in DOM. I should try this before asking, below are example I have to create DOM in php. I will change the element name as html table later.

What concern me this will also return string or xml format? to xhr.responseText, in the end I have to display this using innerHTML to tag id I have in my html page. Will that still work in IE?

ECHO (toXml($myCart));

function toXml($aCart)
{ 
	$doc = new DomDocument('1.0');
	$cart = $doc->createElement('cart');
	$cart = $doc->appendChild($cart);
	
	foreach ($aCart as $Item => $ItemName)
	{ 
		$book = $doc->createElement('book');
		$book = $cart->appendChild($book);
		$title = $doc->createElement('title');
		$title = $book->appendChild($title);
		$value = $doc->createTextNode($Item);
		$value = $title->appendChild($value);
		$quantity = $doc->createElement('quantity');
		$quantity = $book->appendChild($quantity);
		$value2 = $doc->createTextNode($ItemName);
		$value2 = $quantity->appendChild($value2);
	}
$strXml = $doc->saveXML(); // this serializes the XML as a string
return $strXml;
}


This is my previous post of php code that return string with element tr and td (which doesnt work in IE of course):

function toHTML($aModel,$aMaker,$aPrice,$aQty)
{ 
	$tableString="<tr>
						<th>Manufacturer</th>
						<th>Model</th>
						<th>Price</th>
						<th>Qty</th>
						<th>Total Price</th>
					</tr>";
	foreach ($aModel as $item)
	{
		$tableString .="<tr id='".$aModel[$item]."'>
							<td>".$aMaker[$item]."</td>
							<td>".$aModel[$item]."</td>
							<td>".$aPrice[$item]."</td>
							<td>".$aQty[$item]."</td>
							<td>".$aPrice[$item]*$aQty[$item]."</td>
							<td><a href='#' onclick='RemoveItem(\"Remove\",\"".$aModel[$item]."\")';>Remove Item</a></td>
						</tr>";
	}

return $tableString;
}

GeneralRe: IE: innerHTML to table id Pin
led mike4-May-09 7:25
led mike4-May-09 7:25 
AnswerRe: IE: innerHTML to table id Pin
Reelix12-May-09 20:59
Reelix12-May-09 20:59 
QuestionHow Disable Right Click on Webpage ?? Pin
denishverma30-Apr-09 18:35
denishverma30-Apr-09 18:35 
AnswerRe: How Disable Right Click on Webpage ?? Pin
saanj30-Apr-09 19:51
saanj30-Apr-09 19:51 
RantRe: How Disable Right Click on Webpage ?? Pin
nickmaroulis1-May-09 18:50
nickmaroulis1-May-09 18:50 
GeneralRe: How Disable Right Click on Webpage ?? Pin
saanj1-May-09 18:54
saanj1-May-09 18:54 
GeneralRe: How Disable Right Click on Webpage ?? Pin
nickmaroulis1-May-09 19:26
nickmaroulis1-May-09 19:26 
QuestionDesign issue---SEO activities Pin
Amit Kumar G30-Apr-09 13:30
Amit Kumar G30-Apr-09 13:30 
AnswerRe: Design issue---SEO activities Pin
PauloCastilho12-May-09 3:01
PauloCastilho12-May-09 3:01 
Questionhow to copy a file machine A into Machine B Pin
Bibhash Mishra30-Apr-09 2:39
Bibhash Mishra30-Apr-09 2:39 
AnswerRe: how to copy a file machine A into Machine B Pin
nickmaroulis1-May-09 19:25
nickmaroulis1-May-09 19:25 
AnswerRe: how to copy a file machine A into Machine B Pin
Aman Bhullar3-May-09 20:07
Aman Bhullar3-May-09 20:07 
AnswerRe: how to copy a file machine A into Machine B Pin
PauloCastilho12-May-09 2:50
PauloCastilho12-May-09 2:50 
QuestionVisual WebGUI--Win Forms to Web Forms migration Pin
RaviShankerb29-Apr-09 20:36
RaviShankerb29-Apr-09 20:36 
AnswerRe: Visual WebGUI--Win Forms to Web Forms migration Pin
SeMartens29-Apr-09 23:34
SeMartens29-Apr-09 23:34 
GeneralRe: Visual WebGUI--Win Forms to Web Forms migration Pin
RaviShankerb5-May-09 19:26
RaviShankerb5-May-09 19:26 
GeneralRe: Visual WebGUI--Win Forms to Web Forms migration Pin
SeMartens5-May-09 21:04
SeMartens5-May-09 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.