View Full Version : Property list

02-12-2007, 05:02 PM
I'm sending arrays of results from my server in response to an xmlhttprequest like so:


I know I could use an associative or indexed array, but this is just how I wrote it as I'm using the prototype library and I'm in the habit.

Anyway, I want to know if I can reference 'key'. If so, umm, how?

02-12-2007, 05:31 PM
post you a std snippet which uses keys

function zxcES(zxcele,zxcstyle,zxcp,zxctxt){
if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
if (zxcp){ zxcp.appendChild(zxcele); }
if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
return zxcele;

var zxcimg=zxcS('IMG',{position:'absolute',left:zxcw1+'px',top:(zxcImgAry1[zxc0][3]+476)+'px',width:zxcImgAry1[zxc0][1]+'px',height:zxcImgAry1[zxc0][2]+'px'},zxcp);