generating xml templet using cakephp
Hi All, How to generate a XML template dynamically and parse it. Thanks in advance, Rakesh yadav -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problem with xml- cakephp
HI All, i am trying to generate XML template on my report generated data. the stuff related to generate XML i keep in view page as below. ?php //example i am pushing data to $Data $Data = array('storetype' = $store['st']['store_type']); App::import('Helper', 'Xml'); App::import('Core', 'File'); $xml = new XmlHelper(); $file = $xml-header(); // We need the XML header before our data. $file .= $xml-serialize($Data, array('whitespace' = true)); // Write the file. $xmlFile =new File('/tmp' .'/filename.xml'); $xmlFile-write($file, 'w'); $xmlFile-close(); ? for this i am getting out put as below ?xml version=1.0 encoding=UTF-8 ? std_class subcategorys=Cake , biscuits, dognuts / std_class storetype=Checkers / std_class banchcode=262 / std_class branchname=CC LADYSMITH - OVAL / std_class bookedDates= / (But this is not the way i want result). i want to generate templet file example as below report-contents th tr text align=center Sub Category-1 /text td Store Type /td td Branch Code /td td Branch Name /td td Dates Booked /td td align=left Dates Available /td /tr /th tr td Checkers Hyper /td td 6983 /td td CH HY Centurion /td td /td td align=left 15-02-2011,14-03-2013, /td /tr tr td =bgclor=red' DELI /td /tr /report-contents can any one worked on this type of solution please suggest me the right way to archive. Thanks in Advance , Rakesh -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problem with insertBitmap function PEAR - cakephp
Hi all, I am using PEAR classes to export my reports to excel i have some problem with open office wile exporting bitmap images. i keep my PEAR files in /app/vendors/Pear and my view file to export image to excel is ?php $workbook = new Spreadsheet_Excel_Writer(); $workbook-send('Search_Export.xls'); $worksheet=$workbook-addWorksheet('Export'); $worksheet-setRow(0,50); $worksheet-setColumn(0,1,50); $worksheet-insertBitmap ( 0 , 5, '/tmp/shoprite1.bmp',0, 0, 1.25, 1); $workbook-close(); exit(); ? The code i mention above is good while working with MS Office (i am able to view the image). but problem with Open office i am not able to view image it is showing blank cell. Here i am using 24bit bitmap image (as per PEAR Instructions). Any suggestions thank full. Thanks Regards Rakesh -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
export to excel openable in Microsoft Excel and Open office
Hi all, i am trying to export my data to excel in binary xls format using below helper ?php /** * This xls helper is based on the one at * http://bakery.cakephp.org/articles/view/excel-xls-helper * * The difference compared with the original one is this helper * actually creates an xml which is openable in Microsoft Excel. * * Written by Yuen Ying Kit @ ykyuen.wordpress.com * */ class XlsHelper extends AppHelper { /** * set the header of the http response. * * @param unknown_type $filename */ function setHeader($filename) { header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header(Content-Type: application/vnd.ms-excel; charset=UTF-8); header(Content-Type: application/force-download); header(Content-Type: application/download);; header(Content-Disposition: inline; filename=\.$filename..xls\); } /** * add the xml header for the .xls file. * */ function addXmlHeader() { echo ?xml version=\1.0\ encoding=\UTF-8\?\n; echo \n; return; } /** * add the worksheet name for the .xls. * it has to be added otherwise the xml format is incomplete. * * @param unknown_type $workSheetName */ function setWorkSheetName($workSheetName) { echo \n; echo \n; return; } /** * add the footer to the end of xml. * it has to be added otherwise the xml format is incomplete. * */ function addXmlFooter() { echo \t\n; echo \t\n; echo \n; return; } /** * move to the next row in the .xls. * must be used with closeRow() in pair. * */ function openRow() { echo \t; return; } function splitRow($Value){ echo #808000.$Value; return; } /** * end the row in the .xls. * must be used with openRow() in pair. * */ function closeRow() { echo \t\n; return; } /** * Write the content of a cell in number format * * @param unknown_type $Value */ function writeNumber($Value) { if (is_null($Value)) { echo \t ; } else { echo \t.$Value; } return; } /** * Write the content of a cell in string format * * @param unknown_type $Value */ function writeString($Value) { echo \t.$Value; return; } } ? but i don't know how to get colors to cell and how to split the cell if anyone use this helper please tell me how to get my requirements if u use any other functions in this helper please post it. Thanks A. Rakesh -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
How to get colors and split cell
Hi all, i am trying to export my data to excel in binary xls format using below helper ?php /** * This xls helper is based on the one at * http://bakery.cakephp.org/articles/view/excel-xls-helper * * The difference compared with the original one is this helper * actually creates an xml which is openable in Microsoft Excel. * * Written by Yuen Ying Kit @ ykyuen.wordpress.com * */ class XlsHelper extends AppHelper { /** * set the header of the http response. * * @param unknown_type $filename */ function setHeader($filename) { header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header(Content-Type: application/vnd.ms-excel; charset=UTF-8); header(Content-Type: application/force-download); header(Content-Type: application/download);; header(Content-Disposition: inline; filename=\.$filename..xls\); } /** * add the xml header for the .xls file. * */ function addXmlHeader() { echo ?xml version=\1.0\ encoding=\UTF-8\?\n; echo \n; return; } /** * add the worksheet name for the .xls. * it has to be added otherwise the xml format is incomplete. * * @param unknown_type $workSheetName */ function setWorkSheetName($workSheetName) { echo \n; echo \n; return; } /** * add the footer to the end of xml. * it has to be added otherwise the xml format is incomplete. * */ function addXmlFooter() { echo \t\n; echo \t\n; echo \n; return; } /** * move to the next row in the .xls. * must be used with closeRow() in pair. * */ function openRow() { echo \t; return; } function splitRow($Value){ echo #808000.$Value; return; } /** * end the row in the .xls. * must be used with openRow() in pair. * */ function closeRow() { echo \t\n; return; } /** * Write the content of a cell in number format * * @param unknown_type $Value */ function writeNumber($Value) { if (is_null($Value)) { echo \t ; } else { echo \t.$Value; } return; } /** * Write the content of a cell in string format * * @param unknown_type $Value */ function writeString($Value) { echo \t.$Value; return; } } ? but i don't know how to get colors to cell and how to split the cell if anyone use this helper please tell me how to get my requirements if u use any other functions in this helper please post it. Thanks A. Rakesh -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: export to excle
hi all, till now i try to genarate reports and export to excel by rendering the genarated report by calling layout $this-layout = 'export_xls'; and then export my report $this-render('buyersearchxls','export_xls'); and the lay out export_xls contais the falloing ?php header (Expires: Mon, 28 Oct 2008 05:00:00 GMT); header (Last-Modified: . gmdate(D,d M YH:i:s) . GMT); header (Cache-Control: no-cache, must-revalidate); header (Pragma: no-cache); header (Content-type: application/vnd.ms-excel); //header (Content-Type: application/x-msexcel); header (Content-Disposition: attachment; filename=\Report.xls ); header (Content-Description: Generated Report ); //header(Content-Transfer-Encoding: binary ); ? ?php echo $content_for_layout ? ?php //print $content_for_layout; ? but my client is experting to genarate binary xls files can any one plese clarify me whst is dif b/w xls file and binery xls file and how can i achive it in cakephp thanks in advance rakesh On Mon, Jan 3, 2011 at 12:38 PM, Ryan Schmidt google-2...@ryandesign.comwrote: On Jan 3, 2011, at 01:04, rakeshyadav rakeshyadav wrote: i am trying to export my report related data to excle in .xls format i want exact result and view in both msexcel and openoffice What have you researched on your own so far? What have you tried? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
export to excle
hi, happy new year to all i am trying to export my report related data to excle in .xls format i want exact result and view in both msexcel and openoffice please suggest a way to achive this Thanks rakesh A. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Export to MSExcel
Hi All, i am trying to export my reports to excel in .xls formate and i need to maintain same view in both MSExcel and Openoffice can any one please suggest me the easy way to achive this Thanks in Advance Rakesh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to Create and use dummy table in cakephp
Hi All, In my application i am trying to use one table it is dummy table dynamicaly created by me and push some data and do some operations in that and finely i want to delete that table form database.Here i dont have chance to create modal for that table below i will give u php related stuf please help me in cake $sql = CREATE VIEW filtered_campaign_stores AS SELECT DISTINCT store_id, campaign_id FROM campaign_store_dates WHERE date BETWEEN '$weekStartDate' AND '$weekEndDate' AND store_id IN ($storeIdList); $this-sql($sql); dummy table is : filtered_campaign_stores $sql = SELECT store_id, COUNT(campaign_id) as count FROM filtered_campaign_stores GROUP BY store_id; $campaigns = $this-select($sql); After doing the above operation i am running the below query $sql = DROP VIEW filtered_campaign_stores; $this-sql($sql); HELP ME HOW TO RUN DYNAMIC TABLE WITH CREATION OF MODAL. THANKS IN ADVANCE A.RAKESH Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Hi i have a problem with Ajax related to cakephp
Hi Good Morning All, I am using Ajax submit button like ?php echo $ajax-submit('Search',array( 'url'= array( 'controller'='reports', 'action'='activitysearch'), 'update' = 'activitydiv')); ? and i am getting resulst on perticulsr div activitydiv everything is fine but when com to error handiling i am giving some flash messge. my requirement is to set that flash message on top of the page. but it is giving on the same division. Thanks in advance Rakesh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
checking posted data
hi all, I am trying to execute query with some posted value the query is like this $sql = SELECT DISTINCT `csd`.`store_id` ,`csd`.`campaign_id`, `csd`.`date` , `c`.`campaign_id` ,`c`.`supplier_id` , `cm`.`sub_category_id` FROM `campaign_store_dates` AS `csd` LEFT JOIN `campaigns` AS `c` ON `csd`.`campaign_id` = `c`.`campaign_id` LEFT JOIN `campaign_media` AS `cm` ON `c`.`campaign_id` = `cm`.`campaign_id` WHERE `c`.`status` NOT IN ( 'request', 'cancelled' ) AND `csd`.`store_id` != '0' ; if (!empty($strDate) and !empty($endDate)){ $sql .= AND `csd`.`date` BETWEEN '$strDate' AND '$endDate'; } if (isset($sub_category_id)){ $sql .= AND `cm`.`sub_category_id` = {$sub_category_id}; } in if condition i am checking wether the value is there r not the query is working fine when value is set. if value is not set at that time the query is not working and giving error like *SQL Error:* 1054: Unknown column 'empty' in 'where clause' please give me sugitions Thanks in advance A.RAKESH Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: checking posted data
On Tue, Jul 20, 2010 at 9:48 PM, cricket zijn.digi...@gmail.com wrote: On Tue, Jul 20, 2010 at 9:20 AM, rakeshyadav rakeshyadav rakeshyadav@gmail.com wrote: hi all, I am trying to execute query with some posted value the query is like this $sql = SELECT DISTINCT `csd`.`store_id` ,`csd`.`campaign_id`, `csd`.`date` , `c`.`campaign_id` ,`c`.`supplier_id` , `cm`.`sub_category_id` FROM `campaign_store_dates` AS `csd` LEFT JOIN `campaigns` AS `c` ON `csd`.`campaign_id` = `c`.`campaign_id` LEFT JOIN `campaign_media` AS `cm` ON `c`.`campaign_id` = `cm`.`campaign_id` WHERE `c`.`status` NOT IN ( 'request', 'cancelled' ) AND `csd`.`store_id` != '0' ; if (!empty($strDate) and !empty($endDate)){ $sql .= AND `csd`.`date` BETWEEN '$strDate' AND '$endDate'; } if (isset($sub_category_id)){ $sql .= AND `cm`.`sub_category_id` = {$sub_category_id}; } in if condition i am checking wether the value is there r not the query is working fine when value is set. Which value? I am sorry the value is $sub_category_id if value is not set at that time the query is not working and giving error like SQL Error: 1054: Unknown column 'empty' in 'where clause' please give me sugitions debug($sql); It's a somewhat complicated query but, at a glance, it looks like you could do this same thing using find() and ContainableBehavior. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
problem with JOINs
hi all, i am trying to join more than one table using joins but i am unable to check conditions in that one. anybody tell me what is best to write joins. and tell me any one cakerelated query.. SELECT DISTINCT `csd`.`store_id` , `csd`.`date` , `c`.`campaign_id` , `c`. `supplier_id` , `cm`.`sub_category_id` FROM `campaign_store_dates` AS `csd` LEFT JOIN `campaigns` AS `c` ON `csd`.`campaign_id` = `c`.`campaign_id` LEFT JOIN `campaign_media` AS `cm` ON `c`.`campaign_id` = `cm`.`campaign_id` WHERE `c`.`status` NOT IN ( 'request', 'cancelled' ) LIMIT 0 , 30 Thanks in Advance, Rakesh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: compleax query
hi Good Morning All, i am trying to execute complex SQL query like this, EXPLAIN SELECT * FROM campaign_store_dates cd, campaigns c, stores s WHERE ( cd.campaign_id = c.campaign_id AND cd.store_id = s.store_id AND cd.date BETWEEN '01-06-2010' AND '01-06-2010' ) Any one please give me cakephp query Thanks in Advance Rakesh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: compleax query
Hi all, Any body tell me the required cakephp query for below SQL query SELECT * FROM campaign_store_dates cd, campaigns c, stores s WHERE ( c.campaign_id = cd.campaign_id AND s.store_id = cd.store_id ) Thanks in advance, Rakesh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
compleax query
Hi All, i am trying to execute complex query like this, $storeDates = $this-CampaignStoreDate-find('all', array('joins' = array( array( 'type' = 'INNER', 'table' = 'campaigns', 'alias' = 'cp', 'foreignKey' = false, 'conditions' = array( 'cp.campaign_id = CampaignStoreDate.campaign_id') ), array( 'type' = 'INNER', 'table' = 'stores', 'alias' = 'Store', 'foreignKey' = false, 'conditions' = array( 'Store.store_id = CampaignStoreDate.store_id') ) ), 'conditions' = array( 'CampaignStoreDate.date between ? and ?'= array($strDate,$endDate), ))); in this i am using 3 tables CampaignStoreDate ,campaigns,stores the condition what i am checking is working fine the array format i am getting is, Array ( [0] = Array ( [CampaignStoreDate] = Array ( [campaign_store_id] = 381 [campaign_id] = 87 [media_id] = 4 [store_cluster_id] = 0 [store_id] = 2 [date] = 2010-06-15 [active] = 0 [deleted] = 0 ) [Store] = Array ( ) [Campaign] = Array ( ) ) [1] = Array ( [CampaignStoreDate] = Array ( [campaign_store_id] = 388 [campaign_id] = 105 [media_id] = 2 [store_cluster_id] = 0 [store_id] = 10 [date] = 2010-06-15 [active] = 0 [deleted] = 0 ) [Store] = Array ( ) [Campaign] = Array ( ) ) ) in this Store and Campaign tables data is not coming i nead Store data in my view file help me. Thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: hI friends
Hi all, i am trying to call javascript functions from my cake view file (eg.. onclick,onload ) . i want what is the proper syntax to call javascript and where i want to put my javascript file . ?php echo $html-link('Admin Store Group', '#', array( 'class'='url2_font', 'font-fomily'='Verdena', 'onclick' = 'edit_store()')); ? i try to call javascript with the syntax as above and kept my js code in same ctp file is it correct please let me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: url problem(help me)
hi friend, ?php class HhController extends AppController { var $name = 'Hh'; / here u have to specify u r view file name function myview()// example { } } ? On Mon, Apr 26, 2010 at 8:55 PM, hoss7 hoss...@gmail.com wrote: i have create my first with cakephp,but i hve litle problem: i have copy cake in hh folder when i user this url http://localhost/hh/; i see this error: Error: HhController could not be found. Error: Create the class HhController below in file: app\controllers \hh_controller.php ?php class HhController extends AppController { var $name = 'Hh'; } ? Notice: If you want to customize this error message, create app\views \errors\missing_controller.ctp but when i use some controll name in urlhttp://localhost/hh/home; i dont see this error. i want when i upload all source in my host,whene user come to my website see some default page like home page when user come to my website like www.example.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
hI friends
Hi all, I am using javascript in my cake view page and trying to call that functions they are not working properly please help me. my code is html head script type=text/javascript language=javascript window.onload = makeCollapsible; /* CLOSED_IMAGE - the image to be displayed when the sublists are closed * OPEN_IMAGE - the image to be displayed when the sublists are opened */ CLOSED_IMAGE='img/plus.jpg'; ?php echo $html-image('plus.jpg'); ? OPEN_IMAGE='img/minus.jpg'; /* makeCollapsible - makes a list have collapsible sublists * * listElement - the element representing the list to make collapsible */ function makeCollapsible(){ listElement = document.getElementById('computers'); // removed list item bullets and the sapce they occupy listElement.style.listStyle='none'; listElement.style.marginLeft='0'; listElement.style.paddingLeft='0'; // loop over all child elements of the list var child=listElement.firstChild; while (child!=null){ // only process li elements (and not text elements) if (child.nodeType==1){ // build a list of child ol and ul elements and hide them var list=new Array(); var grandchild=child.firstChild; while (grandchild!=null){ if (grandchild.tagName=='OL' || grandchild.tagName=='UL'){ grandchild.style.display='none'; list.push(grandchild); } grandchild=grandchild.nextSibling; } // add toggle buttons var node=document.createElement('img'); node.setAttribute('src',CLOSED_IMAGE); node.setAttribute('class','collapsibleClosed'); node.onclick=createToggleFunction(node,list); child.insertBefore(node,child.firstChild); } child=child.nextSibling; } } /* createToggleFunction - returns a function that toggles the sublist display * * toggleElement - the element representing the toggle gadget * sublistElement - an array of elements representing the sublists that should * be opened or closed when the toggle gadget is clicked */ function createToggleFunction(toggleElement,sublistElements){ return function(){ // toggle status of toggle gadget if (toggleElement.getAttribute('class')=='collapsibleClosed'){ toggleElement.setAttribute('class','collapsibleOpen'); toggleElement.setAttribute('src',OPEN_IMAGE); }else{ toggleElement.setAttribute('class','collapsibleClosed'); toggleElement.setAttribute('src',CLOSED_IMAGE); } // toggle display of sublists for (var i=0;isublistElements.length;i++){ sublistElements[i].style.display= (sublistElements[i].style.display=='block')?'none':'block'; } } } function edit_store(sel_stores, grp_name, grp_id) { document.getElementById('selected_stores').value = sel_stores; document.getElementById('group_name').value = grp_name; document.getElementById('sgid').value = grp_id; document.getElementById('idd').value = '153'; document.getElementById('store_grid').submit(); } /script script type=text/javascript language=javascript function create_new_group() { document.getElementById('idd').value = '153'; document.getElementById('store_grid').submit(); } /script strong ?php echo $html-link('Gauteng Division', '#', array( 'class'='url2_font', 'font-fomily'='Verdena', 'onclick'='edit_store('3_4_', 'Gauteng Division', '3')); ? /strong Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en