[Cartoweb-users] Upload georeferenced images with Edition plugin

Oliver Christen oliver.christen at camptocamp.com
Mon Jun 25 05:44:24 EDT 2007


Hi Igor

>
> Problems:
> 1. In the main window the editable field with "image" string has
> dynamic and complex name
>    like "edit_feature_" + aFeature.id + "[" + this.editAttributeNames
> [i] + "]", and
>    I can't (for now) transfer it to popup window and to use there.
> So I've created
>    additional string edit field below "image" field named
> "attachFile" to put
>    there result string from "popup window". (So user must then copy
> it to main field by hand).
>    It is not very comfortable, but I don't know how to do this better.
>    Is it possible to set an alias to edit field?
>

I think you should handle the problem in the other sens.
In the main page, you have the function that open the popup. simply call 
just after this function another one that will "send" to the popup the id to 
use when returning the filename. Simply add a hidden input in the popup html 
that will be used to store the id.

> 2. The main problem - "image edit field" together with "attachFile
> field" and "Popup button"
>    must be placed in "FORM" element (named "attachForm", see
> Map.prototype.editTableAddRow function).
>    When I fill these fields and press button "Validate", JS returns
> an error (even if I comment all
>    additional input fields):
>    "Input has no properties, source http://imac.local/cartoweb/
> htdocs/js/dhtmlInit.js, string 150"
>    So I think this "FORM" element somehow prevents correct script
> execution. What is wrong?

I think there is already a form element in the main cartoweb template and 
imbricating form into form is maybe not a good idea
what you can do is simply use the main form for dynamicaly change with 
javascript the "action" value to suit your needs, in other words, access the 
main form element, get his action (so you can revert it back later), set the 
new action, and revert back its value once you are done.

Btw, I dont understand why you need a secondary form element in the edition 
area. Dont you only need that in the popup windows ?

>
> 3. Is it possible to use "textarea" element instead of "input" type
> for some fields?
>    I see that dropdowns can be created from one recent topic.

Certainly, you can use the same system as for select and set a list of 
attribute name that must be treated as textarea. Simply by careful to 
correctly set the name, id and values of the element.

>
> Thank you for any help!
>
> Best regards, Igor.
>
>
> 



More information about the Cartoweb-users mailing list