Thread Neues Board: Fileupload (16 answers)
Opened by Heromaster at 2004-02-19 14:50

esskar
 2004-02-21 20:08
#39583 #39583
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
hier mal ein screen shot von meiner ebamil-upload-lösung
http://www.intertivity.com/share/webmail_upload.gi...

und das javascript um alles zu handeln

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var formular = new Array();

function decode_locationsearch()
{
var url = window.location.search;

if (url != "")
{
url = url.substring(1,url.length);
liste = url.split(";");
if(liste.length == 0) { liste = url.split("&"); }
for(i = 0; i <= liste.length-1; i++)
{
temp = liste[i].split("=");

temp[0] = temp[0].replace(/\+/g, " ");
temp[1] = temp[1].replace(/\+/g, " ");
temp[0] = unescape(temp[0]);
temp[1] = unescape(temp[1]);

formular[temp[0]] = temp[1];
}
}
}

var attachwnd = 0;

function get_url()
{
var urlproto = window.location.protocol;
var urlbase = window.location.hostname;
var urlport = window.location.port;
var urlpath = window.location.pathname;
var url = urlproto + "//" + urlbase + (urlport ? ":" + urlport : "") + urlpath;

return url;
}

function attach_open(cuid)
{
decode_locationsearch();

var sid = formular["sid"];
// var cuid = formular["cuid"];

var fullurl = get_url() + "?action=mail_compose_attachments;sid=" + sid + ";cuid=" + cuid;

attachwnd = window.open(fullurl, "ModalChild", "dependent=yes,width=640px,height=480px")
attachwnd.focus();
}

function attach_keepopen()
{
if(attachwnd && !attachwnd.closed)
{
attachwnd.focus();
}
}

function attach_close()
{
window.close();
}


da ich nicht will, dass es leichen gibt und ich sicher gehen will, dass alle attachments vollständig an der mail hängen, lasse ich den user die mail nicht weiter bearbeiten; dabei hilft mirt die Function attach_keepopen(), die ich im body tag des hauptfenster bei onfocus eingebaut habe.

View full thread Neues Board: Fileupload