-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjavascript.js
53 lines (44 loc) · 1.49 KB
/
javascript.js
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
// javascript.js
/* function QuantityExceed(){
alert("You have tried to increase the quantity of this item beyond the\nrecorded quantity in the database.\n\nIf you wish to add more of this item, you must edit the recorded\nquantity by clicking on its name and selecting 'Edit Product'");
}
*/
// Pops Window
function popupWindow(URL,width,height) {
day = new Date();
id = day.getTime();
var left = (screen.width-width)/2;
var top = (screen.height-height)/2;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=yes,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "');");
}
// Pops Window
function popupStaticWindow(name,URL,width,height) {
var left = (screen.width-width)/2;
var top = (screen.height-height)/2;
eval(name + " = window.open(URL, '" + name + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=yes,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "');");
}
// restore tell friend text
function setInputText(field,text) {
if (field.value == "") {
field.value = text;
}
}
// hide tell friend text
function clearInputText(field,text) {
if (field.value == text) {
field.value = "";
}
}
// navigates using menu
function menu_nav(url) {
if(url!=""){window.location.href=url;}
}
// navigates using menu
function DeleteWarning(type,url,msg) {
if(type=="VoidOrder"){
resp = confirm(msg);
}
if (resp == true){
window.location.href=url;
}
}