Subversion Repositories SmartDukaan

Rev

Rev 8590 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8590 Rev 8917
Line 1... Line 1...
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
2
<html>
3
<head>
3
<head>
4
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
-
 
5
<style type="text/css">
4
<style type="text/css">
6
* { font-family: Verdana; font-size: 96%; }
5
* { font-family: Verdana; font-size: 96%; }
7
label {
6
label {
8
float: left;
7
float: left;
9
    width: 150px;
8
    width: 150px;
10
}
9
}
11
select {
10
select {
12
    width: 100px;
11
    width: 100px;
13
}
12
}
14
</style>
13
</style>
15
<script type="text/javascript">
-
 
16
$(function(){	
-
 
17
$("#uploadCampaignFile").live('submit', function(){
-
 
18
    var formData = new FormData($(this)[0]);
-
 
19
	var name = $('#newsletterName').val();
-
 
20
    jQuery.ajax({
-
 
21
        url: "/user-image!createNewsletter?newsletterName="+name,
-
 
22
        type: 'POST',
-
 
23
        data: formData,
-
 
24
        async: false,
-
 
25
        success: function (data) {
-
 
26
		$('html').html(data.replace(/<html>(.*)<\/html>/, "$1"));
-
 
27
        },
-
 
28
		 error : function() {
-
 
29
		 	alert("OOPS!!!Failed to do changes.Try Again.");
-
 
30
		 },
-
 
31
        cache: false,
-
 
32
        contentType: false,
-
 
33
        processData: false
-
 
34
    });
-
 
35
 
-
 
36
    return false;
-
 
37
});
-
 
38
});  
-
 
39
</script>
-
 
40
</head>
14
</head>
41
<body>
15
<body>
-
 
16
<a href="/user-image">Back to listing</a>
42
<div id="content">
17
<div id="content">
43
<div style="color:blue;padding:0px;">
18
<div style="color:blue;padding:0px;">
44
    #sactionmessage()
19
    #sactionmessage()
45
    </div>
20
    </div>
46
    <div style="color:red;padding:0px;">
21
    <div style="color:red;padding:0px;">
47
    #sactionerror()
22
    #sactionerror()
48
</div>
23
</div>
49
<h3>Upload News Letter Images</h3>
24
<h3>Upload News Letter Images</h3>
50
<div style="padding-top: 20px;">
25
<div style="padding-top: 20px;">
-
 
26
<form id="uploadCampaignFile" action="/user-image!createNewsletter" enctype="multipart/form-data" method="post">
51
<label for="newsletterName">NewsLetter Name : </label>
27
<label for="newsletterName">NewsLetter Name : </label>
52
<input id="newsletterName" name="newsletterName" type="text"/>
28
<input id="newsletterName" name="newsletterName" type="text"/>
53
<br></br>
29
<br></br>
54
<form id="uploadCampaignFile" action="/user-image" enctype="multipart/form-data" method="post">
-
 
55
<label for="imagePath">Image Path : </label>
30
<label for="imagePath">Image Path : </label>
56
<input name="userImage" id="file" type="file" />
31
<input name="userImage" id="file" type="file" />
57
<br></br>
32
<br></br>
58
<label for="imageName">Image Name : </label>
33
<label for="imageName">Image Name : </label>
59
<input id="imageName" name="imageName" type="text"/>
34
<input id="imageName" name="imageName" type="text"/>
-
 
35
<span style="color:red;">*File extention mandatory</span>
60
<br></br>
36
<br></br>
61
<input type="submit" value="Update" name="upload" />
37
<input type="submit" value="Update" name="upload" />
62
</form>
38
</form>
63
</div>
39
</div>
64
</div>
40
</div>