Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 08:49
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash GuestBook Support (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Guestbook Admin
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Print
Author Topic: Guestbook Admin  (Read 30098 times)
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #15 on: 07/23/10, 12:21 »

Hi arie_AJ,
where did you receive this code from?
Logged

happy flashing
Cool
Ronald
arie_aj
Server what's that
*
Posts: 4


View Profile
« Reply #16 on: 07/25/10, 13:52 »

sory my speak english is not good

i dont look .fla file sory Grin

 newEntry.entryNum = Number(_parent._parent.read.low.text);
      newEntry.sendAndLoad("GuestBook.php?action=edit&numComments=1&r="+random(999)+"&NumLow="+_parent._parent.NumLow, newEntry, "POST");

i dont understand for this code....
plizz send me file zip......
smiley_kids110@yahoo.com


iam change this add with combobox but combobox be empty....
how not to be empty??
this my code

////combobox////
cb.tabIndex = 1
business_txt.tabIndex = 2
address_txt.tabIndex = 3
telephone_txt.tabIndex = 4
website_txt.tabIndex = 5
email_txt.tabIndex = 6

var lv:LoadVars = new LoadVars();
lv.onLoad = function(){
   
      var datacb:Array = lv.lb.split(",");
      for (var i = 0; i<datacb.length; i++) {
         cb.addItem({data:datacb, label:datacb});
      }
   }
   
lv.load("http://localhost/myadd/category.php");

//////click button
on(click){



   cb = _parent._parent.write.cb.text;
   business_txt = _parent._parent.write.business_txt.text;
   address_txt = _parent._parent.write.address_txt.text;
   telephone_txt = _parent._parent.write.telephone_txt.text;
   website_txt = _parent._parent.write.website_txt.text;
   email_txt = _parent._parent.write.email_txt.text;


   if (cb==undefined)
   {
      _parent._parent.write.gb_status.text = "Required: Category";
   }
    else if (business_txt==undefined)
   {
      _parent._parent.write.gb_status.text = "Required:  Address";
   }
   else if (address_txt==undefined)
   {
      _parent._parent.write.gb_status.text = "Required:  Address";
   }
   else if (telephone_txt==undefined)
   {
      _parent._parent.write.gb_status.text = "Required:  Telephone";
   }
   else if (website_txt==undefined)
   {
      _parent._parent.write.gb_status.text = "Required:  Website";
   }
   else if (email_txt==undefined)
   {
      _parent._parent.write.gb_status.text = "Required:  Address";
   }   
   else if (!email_txt.length || email_txt.indexOf("@") == -1 || email_txt.indexOf(".") == -1)
   {
      _parent._parent.write.gb_status.text = "Required: Valid Email Address";
   }
   else
   {
      _parent._parent.write.gb_status.text = "Please wait...";
      newEntry = new LoadVars()
      newEntry.ref = this
      newEntry.submit = "Yes"
      
      newEntry.cb = cb
      newEntry.business_txt = business_txt
      newEntry.address_txt = address_txt
      newEntry.telephone_txt = telephone_txt
      newEntry.website_txt = website_txt
      newEntry.email_txt = email_txt
      
      newEntry.sendAndLoad("GuestBook.php?action=write&r="+random(999), newEntry, "POST")
      newEntry.onLoad = function(success){
         if(success){
            _parent._parent.write.gb_status.text = this.gb_status;
   //         _parent._parent.read.loadEntries("Default", 10);
            // Clear fields
            _parent._parent.write.cb.text = "";
            _parent._parent.write.business_txt.text = "";
            _parent._parent.write.address_txt.text = "";
            _parent._parent.write.telephone_txt.text = "";
            _parent._parent.write.website_txt.text = "";
            _parent._parent.write.email_txt.text = "";
         }
      }
   }
}
share for my code......


and i want to view this mysql combobox to datagrid
what use xmlconnector or dataset???
and how to use it xmlconnector and datasets??
any help me???
« Last Edit: 07/25/10, 14:58 by arie_aj » Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #17 on: 07/26/10, 01:25 »

it realy depends on the backend.
You have to provide the input to the datagrid by a php script.

I would use AMFPHP to send me a binary data block, which you can assign directly to the dataProvider attribute of the datagrid.

Do the loading and saving tutorials, an get focused on AMFPHP.

If you have the new CS5, and are using FLEX instead, it will generate a basic php service file for you Wink ,
which more or less does everything you might like.
Only little modification - done.
Logged

happy flashing
Cool
Ronald
arie_aj
Server what's that
*
Posts: 4


View Profile
« Reply #18 on: 07/27/10, 14:29 »

thx ronald this my code:

category_xml.trigger();
comboFunction = new Object();
comboFunction.change = function (evt){
  drop_selection.htmlText = ("You selected <b>"+evt.target.selectedItem.label+"</b>");
  trace(evt.target.selectedItem.label);
  business_xml.direction = "receive";
  business_xml.URL = "business.php?category="+evt.target.selectedItem.label;
  business_xml.trigger();
 
}
category_cb.addEventListener("change", comboFunction);
stop();
//////////////////////////////////////////////////////////////////////
var delete_lv=new LoadVars();
var deleteIndex:Number;
var select_lv = new LoadVars();
////////////////////////////////////////////////////////////////////////
   delete_lv.onLoad = function(ok:Boolean) {
   if (ok) {
      if (this.errorcode == "0") {
         business_ds.removeItemAt(deleteIndex);
         gb_status.text = "Record was deleted";
      } else {
         // show kind of error
         gb_status.text = "no connect database";
         // if query error, show mysql_error
       
     }
   } else {
      // if loadvars failed (eg, if script not found)
      gb_status.text = "Flash-database delete operation failed";
   }
};
function deleteRecord()
{
   deleteIndex = business_dg.selectedIndex;
   var pID:Number = business_dg.selectedItem.pID;
   delete_lv.pID = pID;
   delete_lv.sendAndLoad("http://localhost/mydelete/delete.php", delete_lv, "GET");
}
delete_btn.addEventListener("click", deleteRecord);


delete in datagrid is true,,but no delete data in mysql.....
can you help me??? Cry Cry
Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!