<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1505" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Jan,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This line:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>$szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">";</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>should be</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>$szValue = " <INPUT TYPE=HIDDEN NAME='".$szVariable."'
VALUE=\"\">";</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You actually included the variable reference as
part of the string. So $<FONT face="Times New Roman" size=3>szVariable would not
have been picked up as a variable name. Probably if you check the source code of
the page, you could see it being written out as $szVariable. I also put some
quotes.</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jacob</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>--------------------------------------------------------------------------------<BR>From:
<A
href="mailto:chameleon-bounces@lists.maptools.org">chameleon-bounces@lists.maptools.org</A>
[mailto:chameleon-bounces@lists.maptools.org] On Behalf Of Jan Jansen<BR>Sent: 5
August 2005 00:05<BR>To: <A
href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</A><BR>Subject:
[Chameleon] problem accessing HTML Hidden Variable</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>Hello list,</DIV>
<DIV> </DIV>
<DIV>I have a problem accessing an HTML hidden variable in my wigdet. Please can
anyone tell me what I am missing here?</DIV>
<DIV> </DIV>
<DIV>I include the custom Hidden variable as follows (this all works
fine):</DIV>
<DIV> </DIV>
<DIV><BR> function GetHTMLHiddenVariables()<BR>
{<BR> // parent::GetHTMLHiddenVariables();</DIV>
<DIV> </DIV>
<DIV> $szVariable =
"CUR_PPC";<BR> $szValue = " <INPUT
TYPE=HIDDEN NAME=$szVariable
VALUE=\"\">";<BR>
$aReturn[$szVariable] = $szValue;<BR>
return $aReturn;<BR> }</DIV>
<DIV> </DIV>
<DIV>*****</DIV>
<DIV> </DIV>
<DIV>a javascript function on my template fills the hidden var with a value
(this all works fine):</DIV>
<DIV> </DIV>
<DIV>******</DIV>
<DIV> </DIV>
<DIV> /**<BR> * get the javascript functions for
this widget<BR> */<BR> function
GetJavascriptFunctions()<BR>
{<BR> $aReturn =
array();<BR> $szJsFunctionName =
"zoom24ppc";<BR> $szFunction =
<<<EOT<BR>/**<BR> * {$szJsFunctionName}<BR> * called when the
ppc value is set.<BR> */<BR>function
{$szJsFunctionName}(obj)<BR>{<BR>
<BR> {$this->mszHTMLForm}.CUR_PPC.value = obj;
<BR> //alert({$this->mszHTMLForm}.CUR_PPC.value);<BR>
{$this->mszHTMLForm}.submit();<BR>
<BR>
return;<BR>}<BR>EOT;<BR>
$aReturn[$szJsFunctionName] = $szFunction;</DIV>
<DIV> </DIV>
<DIV> return
$aReturn;<BR> }</DIV>
<DIV> </DIV>
<DIV>******</DIV>
<DIV> </DIV>
<DIV>But when I try to access the variable in ParseUrl function, it fails to
read out the value:</DIV>
<DIV> </DIV>
<DIV>******<BR> function ParseURL()<BR>
{<BR> // Check if HIDDEN input is set </DIV>
<DIV> </DIV>
<DIV> $szVariable =
"CUR_PPC";<BR> if
($this->isVarSet($szVariable))<BR>
{<BR> $CURPPC
= $this->getVar( "CUR_PPC" );</DIV>
<DIV> </DIV>
<DIV>etc, etc.. What am I forgetting here? Any help would be highly
appreciated</DIV>
<DIV> </DIV>
<DIV>regards, </DIV>
<DIV> </DIV>
<DIV>Jan</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="mailto:jacob.delfos@maunsell.com"></A></FONT> </DIV></BODY></HTML>