Forum Moderators: coopster
I've been comparing the source code of my app to the demo and I can't see any reason why it doesn't work. The only thing that is really different is that in my code my ID field is generated dynamically by looping through a SQL result set. And my Javascript function calls a written by print/echo statements Like this:
print"\r\r<!-- BEGIN EXCHANGE -->";
print "\r<tr id=\"Trader".$Trader."\" style=\"";
echo getState('Trader".$Trader."');
print "\"><td colspan=\"9\" rowspan=\"1\">";
print "\r<table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\"><tbody>";
which generates code in the Source that looks fine to me:
<!-- BEGIN EXCHANGE -->
<tr id="TraderJTS" style="display:none;"><td colspan="9" rowspan="1">
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"><tbody>
Here is the value of the cookie:
TraderJTS1%3D1%2C%25TraderRWD1%3D1%2C%25TraderDPK1%3D1%2CDPKCME%3D1%2CDPKICE_IPE%3D1%2Cobj1%3D1%
2CTraderEVT%3D1%2CTraderJTS1%3D1%2CTraderJTS1%3D1%2CTraderMHR1%3D1%2CTraderJCR1%3D1%2CTraderJTS1%
3D1%2CJTSCME1%3D1%2CTraderJTS1%3D1%2CTraderNMY%3D1%2CTraderGSR%3D1%2CTraderJMY%3D1%2CTraderJJE%3D1 %2CTraderDPK%3D1%2CTraderMBS%3D1%2CTraderJCR%3D1%2CTraderMHR%3D1%2CTraderJTS1%3D1%2CJTSCMECL%3D1 %2CJTSCMEHO%3D1%2CTraderJTS%3D1%2CJTSCME%3D1%2CJTSCMERB%3D1%2CJTSICE_IPE%3D1%2CJTSICE_IPEICE %20WTI%3D1%2C
It looks like the % are popping up in the wrong place... Any idea how to fix this.
________________________________________________________
Here are the included javascripts and php in case you are curious. This does seem to work with the demo so I don't think the problem is here.
[edited by: jatar_k at 3:00 pm (utc) on Dec. 15, 2007]
[edit reason] Removed unnecessary code [/edit]
This:
$E = 0;
> print "\r\r<!-- BEGIN EXCHANGE -->";
> print "\r<tr id=\"Trader".$Trader."\" style=\"";
> echo getState('Trader".$Trader."');
> print "\"><td colspan=\"9\" rowspan=\"1\">";
> print "\r<table style=\"text-align: left; width: 100%;\" border=
> \"0\" cellpadding=\"2\" cellspacing=\"2\"><tbody>";
Needed to be:
$E = 0;
$TraderID = "Trader".$Trader;
echo "\r\r<!-- BEGIN EXCHANGE -->";
echo "\r<tr id=\"Trader".$Trader."\" style=\"";
echo getState($TraderID);
echo "\"><td colspan=\"9\" rowspan=\"1\">";
echo "\r<table style=\"text-align: left; width: 100%;\" border=\"0\"
cellpadding=\"2\" cellspacing=\"2\"><tbody>";