Input file in menu

Hi, I want to put in menu a to select a file to load. I have this code;


<?xml version="1.0"?>
	<item id="newContact" type="button" text="Aggiungi" img="add_contact.gif" imgdis="add_contact_dis.gif"/>
	<item id="delContact" type="button" text="Delete" img="delete_contact.gif" imgdis="delete_contact_dis.gif"/>
	<item id="sep01" type="separator"/>         
	<item id="openFolder" type="button" text="Apri archivio" img="open_folder.png" imgdis="open_folder.png"/>
	<item id="sep02" type="separator"/>         
	<item id="help" type="button" text="Help"/>


																				    // Code here

Thanks for your help

You can try the next code sample:


Integration with dhtmlxAccordion html,body { width: 100%; height: 100%; margin-top: 10px; } .dhxform_obj_dhx_skyblue .dhxform_textarea { border: none !important; } .dhxform_obj_dhx_skyblue div.dhxform_item_label_left { padding-top: 0; } .dhxform_obj_dhx_skyblue div.dhxform_item_label_left div.dhxform_label { padding: 0; }

Plus you just need to correct form’s CSS a little

Thanks, now I have problem with css. I’d like to have only one button and a image on left (“Apri archivio” button is an example), like the other toolbar’s buttons.

The link of the demo is:

If your case will be more easier to use the next implementation:

[code]myToolbar = new dhtmlXToolbarObject({
parent: “toolbarObj”,
icons_path: “…/common/imgs/”
myToolbar.addButton(“upload”, 0, “Upload file”);
formData = [
{type: “fieldset”, label: “Uploader”, list:[
type: “upload”,
name: “myFiles”,
autoStart: true,
inputWidth: 330,
url: “…/dhtmlxForm/07_uploader/php/dhtmlxform_item_upload.php”,
_swfLogs: “enabled”,
swfPath: “uploader.swf”,
swfUrl: “…/dhtmlxForm/07_uploader/php/dhtmlxform_item_upload.php”}
myForm = new dhtmlXForm(“formObject”, formData);

		myToolbar.attachEvent("onClick", function(id){
			alert("file is loaded")

Thank you very much. But I’ve problem using this implementation. Could you modify my index.html because I tried but It doesn’t work.

Could you attach a demo, please? We wil fix it, test it and send you back. … pport.html
It is quite complicated to fix your index without checking

Sorry, but what exactly problems do you have with our suggested one?

Here my demo. I can’t explain the error. I didn’t understand how to use the formData,

formData = [
            {type: "fieldset", label: "Uploader", list:[
                  type: "upload",
                  name: "myFiles",
                  autoStart: true,
                  inputWidth: 330,
                  url: "../dhtmlxForm/07_uploader/php/dhtmlxform_item_upload.php",
                  _swfLogs: "enabled",
                  swfPath: "uploader.swf",
                  swfUrl: "../dhtmlxForm/07_uploader/php/dhtmlxform_item_upload.php"}

what is formObject tag,

myForm = new dhtmlXForm("formObject", formData);

and what the next part of code does:

         toolbar.attachEvent("onClick", function(id){

my_demo.rar (730 KB)

Changed your demo a little
Check the attachment
my_demo_updated.rar (733 KB)

Thanks a lot… Now it’s ok.

You are welcome!