changing dropdown event

inek

Joined: 2012-02-10
Posts: 1
Posted: Fri, 2012-02-10 07:01

Hi all,
Im really new in using gallery3 and want to edit album.php.

now i append one dropbox with fix strings in the addalbum form and want to use an event to set a value to the title box.. ( like the change and keyup event of the input boxes in this form.)

currently i did this:

Add Dropbox inside album.php:
$group->dropdown("art", array("id" => "art"))
->label(t("Sportart"))
->options(array("1" => t("Fussball"),
"2" => t("Handball"),
"3" => t("Hockey")))
->selected("Fussball");

and I found the other events of the input boxes in albums_form_add.js like this:
$("#g-add-album-form input[name=title]").keyup(function()
{
$("#g-add-album-form input[name=name]").attr("value", $("#g-add-album-form input[name=title]").attr("value").replace(/[^A-Za-z0-9-_]+/g, "-")
.replace(/^-+/, "")
.replace(/-+$/, ""));
});

but i cant find a solution to use the event from the dropbox.. i want to do the same like the keyup event above. ( writing the current choosed dropbox value to the name input box)

I hope someone can help me