My Account   Contact Us    
  
» HomeProductsSupportDeveloper CommunityCompany
Setting Background Color of ActivEdit from a drop-down list

Sets the background color of the control


<?php
  require ('ActivEdit.inc');
  $ae = new ActivEdit;
  $ae->attributes["inc"]       = "/aephp/inc/index.html";
  $ae->attributes["name"]      = "aecontone";
  $ae->attributes["image"]     = "1";
  $ae->attributes["baseurl"]   = "http://localhost/";
  $ae->attributes["imageurl"]  = "/aephp/inc/images/index.html";
  $ae->attributes["imagepath"] = "/support/kb/indexcfm/fuseaction/single/id/1025/c/inetpub/wwwroot/aephp/inc/images/index.html";
  $ae->attributes["upload"]    = "yes";
  $ae->attributes["tabview"]   = "true";

  $ae_control = $ae->printAE();

   //   Place the $ae_control within the form you want to use with ActivEdit
?>
<html>
<title> CFDEV.COM | ActivEdit Demo</title>

 <script>
 <!--
     function changeColor(newColor) {
     DHTMLSafe=aeObjects["aecontone"];
     DHTMLSafe.DOM.body.style.backgroundColor = newColor;
  document.all.colorPicker.selectedIndex = 0;
    }
 //-->
 </script>


<body>

<form name="test" action="/support/kb/indexcfm/fuseaction/single/id/1025/save.html" method="POST">
 
 <select id="colorPicker" onChange="changeColor(this.options[this.selectedIndex].value)">
  <option>Background Color
  <option value="0000FF">Blue
  <option value="FF0000">Red
  <option value="00FF00">Green
  <option value="000000">Black
 </select>

  <? print($ae_control); ?>
  <input type="submit" value="Click To View Submission">
</form>
</body>
</html>

Search Knowledge Base:
Sign up for our newsletter: | Subscribe with RSS: RSS
© ActivSoftware 1999 to 2005 | Privacy Statement