"); WindowObject.document.close(); WindowObject.focus(); WindowObject.print(); WindowObject.close(); } // ------------------------------------------ // strip html from input text // ------------------------------------------ function stripHTML(txt){ var re=//g; return txt.replace(re, ""); } // ------------------------------------------ // add html back to input text // ------------------------------------------ function addHTML(txt){ return txt; } // ------------------------------------------ // produce random number of X chars long // ------------------------------------------ function get_random(x) { var res = ''; var ranNum; if (!x) x=20; for (var j=0,j=0;j max || o.val().length /g,'>'); } function reqHtmlDecode(s) { return s.replace(/&/g,'&').replace(/</g,''); } // ------------------------------------------ // show to do dialog box // ------------------------------------------ function megShowToDoDialog() { $.fx.speeds._default = 500; $("#meg_what_do_you_want_to_do").dialog({ bgiframe: true, resizable: false, height:475, width:700, autoOpen: false, show:"scale", hide:"scale", modal: true, dialogClass: 'noTitleDialog', zIndex:100000, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { }, close: function(event, ui) { $(this).dialog('destroy'); } }); //what_do_you_want_to_do $("#meg_what_do_you_want_to_do").dialog("open"); return false; } // ------------------------------------------ // process login request // ------------------------------------------ function megProcessLoginRequest() { // need it to get related vars saved earlier var username = $("#meg_login_username").val(); var password = $("#meg_login_password").val(); $.ajax({ type: "POST", async: false, url: "http://www.myeventguru.com/meg_ajax.php", dataType: "text", data: ({username : $("#meg_login_username").val(), password : $("#meg_login_password").val(), task : "login", j41a7c4c88ce3272857697d4c83eadbed : 1 }), beforeSend: function() { }, success: function(data){ response = data.split('>>>>>'); if (response[0] == 1) { $("#meg_header_left_label").html("Welcome back, "+response[1]); $("#meg_header_right_label").html("Log out"); $("#meg_login_section").hide(); // let's redirect user to the url specified if ($("#meg_return_url").val() != '') { document.location.href = $("#meg_return_url").val(); } } else { $("#megGeneralMessageText").text(response[1]); $("#meg_general_msg").dialog('open'); } $("#meg_login_popup").dialog('close'); }, error: function(data){ // display Error message alert("Error connecting to the server"); }, complete: function(req){ } }); } // megProcessLoginRequest // ------------------------------------------ // display help topic // ------------------------------------------ function megDisplayHelpTopic(id) { // need it to get related vars saved earlier if (isNaN(id)) id = 1; $.ajax({ type: "POST", async: false, url: "http://www.myeventguru.com/meg_ajax.php", dataType: "text", data: ({id : id, task : "help" }), beforeSend: function() { }, success: function(data){ $("#megHelpScreenText").html(data); $("#meg_help_screen").dialog('open'); }, error: function(data){ // display Error message alert("Error retrieving help topic"); }, complete: function(req){ } }); } // megDisplayHelpTopic // ------------------------------------------ // display url data // ------------------------------------------ function megDisplayURLData(url, title) { // need it to get related vars saved earlier url = encodeURI(url); $.ajax({ type: "POST", async: false, url: "http://www.myeventguru.com/meg_ajax.php", dataType: "text", data: ({url : url, task : "geturl" }), beforeSend: function() { }, success: function(data){ $("#meg_help_screen").dialog('option', 'title', title); $("#megHelpScreenText").html(data); $("#meg_help_screen").dialog('open'); }, error: function(data){ // display Error message alert("Error retrieving url"); }, complete: function(req){ } }); } // megDisplayURLData // ------------------------------------------ // display url data // ------------------------------------------ function loadMyRecentEvents(title, url) { // need it to get related vars saved earlier $.ajax({ type: "POST", async: false, url: "http://www.myeventguru.com/meg_ajax.php", dataType: "text", data: ({task : "getrecevents" }), beforeSend: function() { }, success: function(data){ $("#meg_help_screen").dialog('option', 'title', title); $("#meg_help_screen").dialog( "option", "buttons", { "Ok": function() { var obj = $('input[name="reventid"]:checked'); if (obj.val() > 0 ) { var eventid = obj.val(); } else { var eventid = $("#eventid").val(); } if (!megIsPositiveInteger(eventid)) { megShowGeneralMessage("Please provide a valid event id"); return; } $("#meg_loading_img").dialog('option', 'title', 'Please wait...'); $("#meg_loading_img").dialog('open'); $(this).dialog("close"); document.location.href = url+'&id='+eventid; }, "Cancel": function() { $(this).dialog("close"); } } ); $("#megHelpScreenText").html(data); $("#meg_help_screen").dialog('open'); }, error: function(data){ // display Error message alert("Error retrieving url"); }, complete: function(req){ } }); } // loadMyRecentEvents // ------------------------------------------ // display login announcements // ------------------------------------------ function megDisplayAnnouncements() { // need it to get related vars saved earlier $.ajax({ type: "POST", async: false, url: "http://www.myeventguru.com/meg_ajax.php", dataType: "text", data: ({id : 1, task : "getannounce" }), beforeSend: function() { }, success: function(data){ response = data.split('>>>>>'); if (response[0] == 1) { $("#meg_help_screen").dialog('option', 'title', 'Important Announcements'); $("#megHelpScreenText").html(response[1]); $("#meg_help_screen").dialog('open'); } }, error: function(data){ // display Error message alert("Error retrieving announcement"); }, complete: function(req){ } }); } // megDisplayAnnouncements // initializations of variables & functions $(function() { // ------------------------------------------ // initialize what_do_you_want_to_do // ------------------------------------------ $("#meg_what_do_you_want_to_do").dialog({ bgiframe: true, resizable: false, height:475, width:700, autoOpen: false }); //what_do_you_want_to_do // ------------------------------------------ // handle the login popup box // ------------------------------------------ $("#meg_login_popup").dialog({ bgiframe: true, resizable: false, height:200, width:400, autoOpen: false, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Login': function() { var bValid = true; meglperr.html(""); allMegLoginPopupFields.removeClass('ui-state-error'); // -------------------------------------- // perform validation // -------------------------------------- // length checks if (!checkLength2(meglu,"Username",1,"megLoginPopupErrors")) return; if (!checkLength2(meglp,"Password",6,"megLoginPopupErrors")) return; megProcessLoginRequest(); //$(this).dialog('close'); }, 'Close': function() { $(this).dialog('close'); } }, open: function(event, ui) { meglperr.html(""); allMegLoginPopupFields.val(''); }, close: function(event, ui) { } }); //meg_login_popup // ------------------------------------------ // handle the general message box // ------------------------------------------ $("#meg_general_msg").dialog({ bgiframe: true, resizable: false, height:200, width:400, autoOpen: false, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Ok': function() { $(this).dialog('close'); } }, close: function(event, ui) { $("#megGeneralMessageText").html(""); } }); //meg_general_msg // ------------------------------------------ // handle the help box // ------------------------------------------ $("#meg_help_screen").dialog({ bgiframe: true, resizable: true, height:500, width:700, autoOpen: false, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Ok': function() { $(this).dialog('close'); }, 'Print': function() { megPrintDivContents('megHelpScreenText'); } }, close: function(event, ui) { $("#megHelpScreenText").html(""); } }); //meg_help_screen // ------------------------------------------ // handle the "loading.. please wait" box // ------------------------------------------ $("#meg_loading_img").dialog({ bgiframe: true, resizable: true, height:150, width:200, autoOpen: false, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { } }); //meg_loading_img // ------------------------------------------ // handle the general prompt box // ------------------------------------------ $("#meg_general_prompt").dialog({ bgiframe: true, resizable: false, height:250, width:400, autoOpen: false, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Yes, Go Ahead': function() { var fval = $("#meg_fname_submit").val(); var f = $('form[name="'+fval+'"]'); f.submit(); $("#meg_loading_img").dialog('option', 'title', 'Please wait...'); $("#meg_loading_img").dialog('open'); $(this).dialog('close'); }, 'Cancel': function() { $(this).dialog('close'); } }, close: function(event, ui) { } }); //meg_general_prompt var meglperr = $("#megLoginPopupErrors"), meglp = $('#meg_login_password'), meglu = $('#meg_login_username'); var allMegLoginPopupFields = $([]).add(meglp).add(meglu); }); // end of init function for JQuery //]]> What Would You Like To Do Today?
?
Do Something Else
Source: http://www.myeventguru.com/events/10753/year,2012/month,10/day,19/Itemid,48/
grammy award winners the band perry grammy awards whitney houston autopsy dobie gray bruce springsteen grammy nominations
No comments:
Post a Comment