Skip to main content

Posts

How to use Accordion window in Flex

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Panel x="119" y="63" width="382" height="268" layout="absolute" title="Accordion select"> <mx:HBox width="100%" height="100%" id="hbox6"> <mx:Accordion width="100%" height="100%"> <mx:Canvas width="100%" label="Accordion 1"> </mx:Canvas> <mx:Canvas width="100%" label="Accordion 2"> </mx:Canvas> <mx:Canvas width="100%" label="Accordion 3"> </mx:Canvas> <mx:Canvas width="100%" label="Accordion 4"> </mx:Canvas> </mx:Accordion> </mx:HBox> </mx:Panel> </mx:Application>

Read Mulitiple selected item of List Box Using Flex

How to read multiple selection list box in flex? <mx:List allowMultipleSelection="true" id="searchResult" width="100%" height="100" verticalScrollPolicy="on" click="filter"> <mx:dataProvider> <mx:Object label="Schmidt, Frank" value="1"/> <mx:Object label="Schmidt, Peter" value="2"/> </mx:dataProvider> </mx:List> function filter():void{ var str:String=""; for each(var ob:Object in searchResult.selectedItems){ str+=(str=="")?ob.value.toString():","+ob.value.toString(); i++; } trace(str); // this will return you indexs of list box }

Create Word Document Using PHP

Here is the example of creating word document using php. <?php $wordObj = new COM("word.application") or die ("Could not create an instance of word"); echo "Version : {$wordObj->version}"; $wordObj->visible = 1; $wordObj->Documents->Add(); $wordObj->Selection->TypeText("Hello World.."); // add text here $wordObj->Documents[1]->SaveAs("sample.doc"); // save location $wordObj->Quit(); $wordObj->Release(); //free object $wordObj = null; ?>

How to set Javascript Cookie for Domain

var cookie_date = new Date ( ); // current date & time cookie_date.setTime ( cookie_date.getTime() + 24*60*60*1000 ); // for 1 days Syntax: document.cookie = "CookieName=CookieValue; expires=cookie expire time"; path= directories;domain=domainname"; Example: document.cookie="test=testValue;expires="+ cookie_date.toGMTString()+";path=/dir1/dir2/dir3/;domain=mytest.com";