You need a JavaScript variable that can be changed dynamically, and then used as part of the action
url.
var typeNavn = ''; // Declare this somewhere. This is updated by some means.
var cleanHtml = '@CleanHtml.Clean(Html)'; // I don't know what Clean() does.
var upload = $('#upload').wijupload(
{
// Note: the next two lines must be on one line for it to work.
// It's only two on SO so we don't have the x-scrollbar.
action: '/UploadFiles/Dokument?typeNavn=' + typeNavn)'
});
OK the layout of the above code may not be what you need (I don't know what cleanHtml
is supposed to be), but the core idea of using a variable typeNavn
is key here. You need some means of updating that variable to reflect the type selected i.e. a dropdownlist of something.