[Chameleon] problem accessing HTML Hidden Variable

Jan Jansen jansen at nieuwland.nl
Thu Aug 4 12:05:06 EDT 2005


Hello list,

I have a problem accessing an HTML hidden variable in my wigdet. Please can anyone tell me what I am missing here?

I include the custom Hidden variable as follows (this all works fine):


 function GetHTMLHiddenVariables()
    {
      // parent::GetHTMLHiddenVariables();

        $szVariable = "CUR_PPC";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">";
        $aReturn[$szVariable] = $szValue;
        return $aReturn;
    }

*****

a javascript function on my template fills the hidden var with a value (this all works fine):

******

 /**
     * get the javascript functions for this widget
     */
    function GetJavascriptFunctions()
    {
        $aReturn = array();
        $szJsFunctionName = "zoom24ppc";
        $szFunction = <<<EOT
/**
 * {$szJsFunctionName}
 * called when the ppc value is set.
 */
function {$szJsFunctionName}(obj)
{
    
 {$this->mszHTMLForm}.CUR_PPC.value = obj; 
 //alert({$this->mszHTMLForm}.CUR_PPC.value);
   {$this->mszHTMLForm}.submit();
        
    return;
}
EOT;
        $aReturn[$szJsFunctionName] = $szFunction;

        return $aReturn;
    }

******

But when I try to access the variable in ParseUrl function, it fails to read out the value:

******
  function ParseURL()
   {
    // Check if HIDDEN input is set 

        $szVariable = "CUR_PPC";
       if ($this->isVarSet($szVariable))
   {
            $CURPPC = $this->getVar( "CUR_PPC" );

etc, etc.. What am I forgetting here? Any help would be highly appreciated

regards, 

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050804/a4bbd2e5/attachment.html


More information about the Chameleon mailing list