Subversion Repositories SmartDukaan

Rev

Rev 8578 | Rev 8917 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8578 kshitij.so 1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
3
<head>
4
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
5
<style type="text/css">
6
* { font-family: Verdana; font-size: 96%; }
7
label {
8
float: left;
9
    width: 150px;
10
}
11
select {
12
    width: 100px;
13
}
14
</style>
15
<script type="text/javascript">
16
$(function(){	
8590 kshitij.so 17
$("#uploadCampaignFile").live('submit', function(){
8578 kshitij.so 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) {
8590 kshitij.so 26
		$('html').html(data.replace(/<html>(.*)<\/html>/, "$1"));
8578 kshitij.so 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>
41
<body>
8590 kshitij.so 42
<div id="content">
43
<div style="color:blue;padding:0px;">
44
    #sactionmessage()
45
    </div>
46
    <div style="color:red;padding:0px;">
47
    #sactionerror()
48
</div>
8578 kshitij.so 49
<h3>Upload News Letter Images</h3>
50
<div style="padding-top: 20px;">
51
<label for="newsletterName">NewsLetter Name : </label>
52
<input id="newsletterName" name="newsletterName" type="text"/>
53
<br></br>
8590 kshitij.so 54
<form id="uploadCampaignFile" action="/user-image" enctype="multipart/form-data" method="post">
8578 kshitij.so 55
<label for="imagePath">Image Path : </label>
56
<input name="userImage" id="file" type="file" />
57
<br></br>
58
<label for="imageName">Image Name : </label>
59
<input id="imageName" name="imageName" type="text"/>
60
<br></br>
61
<input type="submit" value="Update" name="upload" />
62
</form>
63
</div>
8590 kshitij.so 64
</div>
8578 kshitij.so 65
</body>