|
Please don't double-post.
Paul Marfleet
|
|
|
|
|
It is possible to use the [CTRL + W] on the code to close the window or browser? If possible can i have a sample code.
Thanks and Regards
|
|
|
|
|
Try to write a useful subject line. Almost every thread is about someone who needs help, so that doesn't do anything at all to distinguish your thread from other.
vanhawk wrote: It is possible to use the [CTRL + W] on the code to close the window or browser?
No, you can't feign keypresses from Javascript.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
yes it is possible. You have to use combination of onkeydown, onkeyup, and onkeypress functions to catch the keys and call window.close() to close the window. You will be calling these function in body tag. onkeydown you will be checking for ctrl key and initialize the flag for it, onkeyup reset the flag for ctrl, onkeypress check the keycode for W and if ctrl key flag is true and it is W then close the window.
This is my understanding, but you might have to play with it. I have done it but it was way past and I don't have the code with me right now.
-----
|
|
|
|
|
|
Sorry for my previous post in the lounge - I thought I was in the right forum, but the hand is faster than the eye...
However, let's get to my question: does anybody know a plugin to constantly display the viewstate size for the current page in IE? Something like a toolbar item or status bar pane would be great.
It could help a lot when testing web sites to find the unnecessarily leaking pages.
Luca The Price of Freedom is Eternal Vigilance.
En Það Besta Sem Guð Hefur Skapað, Er Nýr Dagur.
But the best thing God has created, is a New Day.
|
|
|
|
|
|
Well this looks like a useful piece of software indeed, however it requires an http module to do a simple thing that can be completely done client side (and does not show the value without user intervention). I think I'll drop a mail to the author, maybe he'll like the feature request
Thanks a lot
Luca The Price of Freedom is Eternal Vigilance.
En Það Besta Sem Guð Hefur Skapað, Er Nýr Dagur.
But the best thing God has created, is a New Day.
|
|
|
|
|
There are some ideas here[^] (I'm subscribed to the author's blog[^], he's a great resource for debugging ideas).
However, again he uses HTTP Modules. If you want to do something client-side you might find writing an extension for Fiddler[^] to be easier than extending Internet Explorer.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
How do I unzip the file, I have tried opening it with DW and Notepad but dont know what to do next, can someone help?
Regards
Gemma
Regards
Gemma
|
|
|
|
|
What are you trying to achieve?
1) Your subject says 'sendmail.asp'!
2) Your message expresses your desire to unzip a file but you have tried opening it with DreamWeaver (guessed from DW) and Notepad but they are not intended applications for Zip Archives. You may try WinZip for that.
|
|
|
|
|
if i have a string that contains a URL, ana i need to extract
a variable from the query string, i made two solutions , which one should
i use ??
Dim strUrl as String= "http://www.mySite.com?key=5&book=abc"
dim strParam as String = "key"
dim strResult as String
Dim strKey As String = strUrl.ToLower.Substring(strUrl.IndexOf("?"))
Dim strQuery As String() = strKey.Split("&")
For i As Integer = 0 To strQuery.Length - 1
If strQuery(i).ToLower.IndexOf(strParam.ToLower) <> -1 Then
strQuery = strQuery(i).Split("=")
strKey = strQuery(i)
strResult = strKey
Exit For
End If
Next i
'or
Dim strQuery As String = strURL.Substring(strURL.IndexOf("?") + 1)
Dim objRequest As New HttpRequest("",strURL, strQuery)
Dim strResult as String = objRequest.QueryString("key")
your opinions please
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Neither.
Dim url as String= "http://www.mySite.com?key=5&book=abc"
Dim key as String = "key"
Dim result as String
Dim queryString As String = url.Substring(url.IndexOf("?"))
Dim params As String() = queryString.Split("&")
For i As Integer = 0 To params.Length - 1
Dim param As String() = params(i).Split("=")
If param(0).ToLower = key.ToLower Then
result = param(1)
Exit For
End If
Next i
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: result = param(1)
i think i made a type mistake , strKey = strQuery(1)
could you please tell what's wrong with the second solution ??
the one that used the HttpRequest
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: i think i made a type mistake , strKey = strQuery(1)
No, that's not a mistake. The array is named param , not strQuery . The result goes into the result variable, not some variable that isn't even declared.
Tamimi - Code wrote: could you please tell what's wrong with the second solution ??
the one that used the HttpRequest
The HttpRequest object is not supposed to be used that way. The documentation for the constructor says:
"This constructor supports the .NET Framework infrastructure and is not intended to be used directly from your code."
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: "This constructor supports the .NET Framework infrastructure and is not intended to be used directly from your code."
i read that on the documentation, but i just wonding way, it could save
the looping time.
thank you for your response
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
The window.onload function was not called i don't know error, can anyone help me please...
|
|
|
|
|
copy paste here your code
|
|
|
|
|
<%@ Page language="c#" Codebehind="ManageEvents.aspx.cs" AutoEventWireup="false" Inherits="Wild.ManageEvents" validateRequest="false"%>
<%@ Register TagPrefix="uc1" TagName="WucTop" Src="UserControls/WucTop.ascx" %>
<%@ Register TagPrefix="uc1" TagName="wucHttpsGoogleAnalystics" Src="UserControls/wucHttpsGoogleAnalystics.ascx" %>
<%@ Register TagPrefix="uc1" TagName="wucListingMainMenu" Src="UserControls/wucListingMainMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="wucEventMenu" Src="UserControls/wucEventMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="wucListingHomeMenu" Src="UserControls/wucListingHomeMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="wucCountyCityName" Src="UserControls/wucCountyCityName.ascx" %>
<%@ Register TagPrefix="iXEditor" Namespace="AES.iXEditor" Assembly="AES.iXEditor" %>
<title>Florida Gone Wild
if(navigator.appName=="Microsoft Internet Explorer")
var trstyle="block";
else
var trstyle="table-row";
var ListingId='<%=Session["ListingId"]%>'
var WelcomeUserName='<%=Session["WelcomeUserName"]%>'
if(ListingId == "")
window.location.href=gURL+"ListingRegistration.aspx?Action=Login";
var arrDay=new Array();
var arrMonthlyDay=new Array();
arrDay=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
arrMonthlyDay=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
var arrWeek=new Array();
arrWeek=["First","Second","Third","Fourth","Fifth"];
var ExDates="";
var strContent;
var Recurring;
var EventDataTable;
var Rows;
var CurrentPage =1;
var PicFileId=0;
var gImageFileName="";
var PaymentDataTable;
var MaxEventId;
var RecurringEventType="Special";
var gCityId;
var gEventId;
var gEventDateCheck=false;
var gMemberShip=false;
//var Time=new Array();
function onload=function(){
if(ListingId > 0 ){
var CityTable=Wild.AjaxFunctions.FetchTheDataFromDB("tblBusinessListing","tblBusinessListing","BusinessListingId="+ListingId,null,"CityId").value;
if(CityTable.Rows.length > 0)
gCityId=CityTable.Rows[0]["CityId"];
}
if(document.thisForm.hidID.value>0) fnSetVisibility('Edit')
else fnSetVisibility('ViewEvents')
}
// ----------- logout -------------
function logout()
{
window.location.href =gURL+"ListingRegistration.aspx?Action=Login";
}
//-----------load Add Data----------------
function LoadAddData(){
var TypeDataTable=Wild.ManageEvents.FetchTheCategoryData().value;
//if(TypeDataTable.Rows.length>0)
table2dropdownWithOthers( TypeDataTable, 'EventCategoryId,CategoryName', 'opt_EventType',null , 'Event Type',false);
}
function LoadData(){
var TypeDataTable=Wild.ManageEvents.FetchTheCategoryData().value;
//if(TypeDataTable.Rows.length>0)
table2dropdown( TypeDataTable, 'EventCategoryId,CategoryName', 'opt_Category',null ,null,true);
}
//-------------------set visibility---------
function fnSetVisibility(Action){
var PaymentTable="";
gEventId="";
document.getElementById("divMessage").innerHTML="";
if(Action =='AddEvent'){
fnToSetnull();
document.thisForm.hidID.value=0;
}
if(Action=='AddEvent' || Action=='Edit'){
var Cost=Wild.ManageEvents.GetPayment(ListingId).value
if( Cost == '0'){document.getElementById('PaymentDetails').style.display='none';gMemberShip=false;}
else {document.getElementById('PaymentDetails').style.display='block';gMemberShip=true;}
if(Action == 'AddEvent' && Cost != '0'){
if(confirm('Do you want to use your credit card on file?')==true){
PaymentTable=Wild.AjaxFunctions.GetPaymentDetails(ListingId,"tblBusinessCardDetails").value;
document.thisForm.txt_CardHolder.value=fnFindQuotes(PaymentTable.Rows[0]["CardHolderName"])
document.thisForm.txt_CardNumber.value=PaymentTable.Rows[0]["CardNumber"];
var ExDate=PaymentTable.Rows[0]["ExpireDate"].split('-');
document.thisForm.DDMonth.value=ExDate[0];
document.thisForm.DDYear.value=ExDate[1];
document.thisForm.txt_SecurityCode.value=PaymentTable.Rows[0]["CVVCode"]
//DataTable.Rows[0]["PaymentStatus"]="Y";
//document.getElementById('MemberCost').innerHTML=PaymentTable.Rows[0]["MemberCost"]
//var dt=new Date(PaymentTable.Rows[0]["TransDate"])
//document.getElementById('trans').innerHTML=Convert2DateTime(dt);
document.thisForm.txt_FirstName.value=fnFindQuotes(PaymentTable.Rows[0]["FirstName"]);
document.thisForm.txt_LastName.value=fnFindQuotes(PaymentTable.Rows[0]["LastName"])
document.thisForm.txt_Address.value=fnFindQuotes(PaymentTable.Rows[0]["Address"])
document.thisForm.txt_City.value=fnFindQuotes(PaymentTable.Rows[0]["City"])
document.thisForm.txt_State.value=fnFindQuotes(PaymentTable.Rows[0]["State"])
document.thisForm.txt_Zipcode.value=PaymentTable.Rows[0]["ZipCode"]
document.thisForm.DDCardType.value= Trim(PaymentTable.Rows[0]["CardType"]);
document.thisForm.txt_CardNumber.readOnly=true;
document.thisForm.txt_FirstName.readOnly=true;
document.thisForm.txt_LastName.readOnly=true;
document.thisForm.txt_City.readOnly=true;
document.thisForm.txt_State.readOnly=true;
document.thisForm.txt_Zipcode.readOnly=true;
document.thisForm.txt_SecurityCode.readOnly=true;
document.thisForm.DDCardType.disabled=true;
document.thisForm.DDMonth.disabled=true;
document.thisForm.DDYear.disabled=true;
document.getElementById('StatusMessage').style.visibility="visible";
}else{
document.thisForm.txt_CardNumber.readOnly=false;
document.thisForm.txt_FirstName.readOnly=false;
document.thisForm.txt_LastName.readOnly=false;
document.thisForm.txt_City.readOnly=false;
document.thisForm.txt_State.readOnly=false;
document.thisForm.txt_Zipcode.readOnly=false;
document.thisForm.txt_SecurityCode.readOnly=false;
document.thisForm.DDCardType.disabled=false;
document.thisForm.DDMonth.disabled=false;
document.thisForm.DDYear.disabled=false;
}
}
document.getElementById("divPage").style.display="none";
document.getElementById("divView").style.display="none";
document.getElementById("divEventDetail").style.display="none";
document.getElementById('divFilter').style.display ="none";
document.getElementById('divGuestList').style.display ="none";
document.getElementById("divEventAdd").style.display="block";
if(Action=='Edit')
document.getElementById('PaymentDetails').style.display="none";
LoadAddData();
LoadCostDetails('Special');
document.thisForm.txtTitle.focus();
if(Action=='Edit')
fnAssignEditValues();
else
document.getElementById('txtDescription').innerHTML="";
document.getElementById('StatusMessage').style.visibility="visible"
}
else if(Action=='ViewEvents'){
document.getElementById('StatusMessage').style.visibility="hidden"
document.getElementById("divView").style.display="block";
document.getElementById("divPage").style.display="block";
document.getElementById("divEventAdd").style.display="none";
document.getElementById("divEventDetail").style.display="none";
document.getElementById('divFilter').style.display ="block";
//document.getElementById('divGuestList').style.display ="none";
//document.getElementById('PaymentDetails').style.display="none";
document.thisForm.opt_Category.focus();
LoadData()
fnDisplay();
}
else if(Action=='ViewDetail'){
document.getElementById('StatusMessage').style.visibility="hidden"
document.getElementById("divEventDetail").style.display="block";
document.getElementById("divView").style.display="none";
document.getElementById("divPage").style.display="none";
document.getElementById("divEventAdd").style.display="none";
document.getElementById('divFilter').style.display ="none";
//document.getElementById('divGuestList').style.display ="none";
}
else{
document.getElementById('StatusMessage').style.visibility="hidden"
document.getElementById("divEventDetail").style.display="none";
document.getElementById("divView").style.display="none";
document.getElementById("divPage").style.display="none";
document.getElementById("divEventAdd").style.display="none";
document.getElementById("divFilter").style.display ="none";
//document.getElementById("divGuestList").style.display ="block";
}
}
function LoadCostDetails(RecurringEventType){
var EventCostDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventPostingCost','tblEventPostingCost',"EventType='"+RecurringEventType+"'").value
if(EventCostDataTable.Rows.length > 0){
document.thisForm.txtEventCost.value = EventCostDataTable.Rows[0]["Cost"];
if(document.thisForm.txtTotalCost.value.match(/NaN/g))document.thisForm.txtTotalCost.value=0;
}
if(document.thisForm.rdo_Recurring[0].checked){
document.thisForm.txtRecurringNo.value =1;
document.thisForm.txtTotalCost.value=(eval(document.thisForm.txtEventCost.value)*eval(document.thisForm.txtRecurringNo.value)).toFixed(2);
if(document.thisForm.txtTotalCost.value.match(/NaN/g))document.thisForm.txtTotalCost.value=0;
}
else{
document.thisForm.txtRecurringNo.value=document.thisForm.txtNoofWeekMonth.value;
document.thisForm.txtTotalCost.value=(eval(document.thisForm.txtEventCost.value)* eval(document.thisForm.txtRecurringNo.value)).toFixed(2);
if(document.thisForm.txtTotalCost.value.match(/NaN/g))document.thisForm.txtTotalCost.value=0;
}
}
//--------------------function toKey Validate-----------
function fnKeyValidate(Obj){
if(Obj.keyCode==13){
Obj.returnValue=false
Obj.cancel=true;
fnValidate()
}
}
//----------------display-------------------
function fnDisplay(){
var str="<table id='tblView' cellSpacing='1' cellPadding='0' width='735' align='center' border='0' class='border'><tbody class='clsTbody'>"
document.getElementById("divView").innerHTML=str;
var TypeId= document.thisForm.opt_Category.value;
var TypeFilter="";
if(TypeId==-2)
TypeFilter="<>";
else
TypeFilter="=";
EventDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEvent','tblEvent',"ListingId="+ListingId+ " and CategoryId"+TypeFilter+TypeId ,"EventDate desc,EventTitle").value;
Rows = EventDataTable.Rows.length;
if(CurrentPage == 1){
start=0;
end=9;
if(end >= Rows) end = Rows-1;
}else{
start=(CurrentPage * 10)-10;
end=(CurrentPage * 10)-1;
if(end >=Rows) end = Rows-1;
}
if(Rows==0) {
document.getElementById("divView").innerHTML="";
document.getElementById("divPage").innerHTML= "";
document.getElementById("divView").innerHTML= "No Events posted at present.";
document.getElementById("divView").className= "response";
//document.getElementById("divFilter").style.display="none";
}
else{
//document.getElementById("divFilter").style.display="block";
//document.getElementById("opt_Category").focus();
for (i=start;i<=end;i++){
newrow=insertRow('tblView');
newcell = insertCell(newrow,0);
newcell.vAlign="top";
newcell.rowSpan=5;
var chkphoto=EventDataTable.Rows[i]["ImageFileName"]
if( chkphoto!=undefined && chkphoto!="" )
newcell.innerHTML="<a href='#' onclick=fnViewEventDetail('"+EventDataTable.Rows[i]["EventId"]+"')><img src='DataFolder/Images/Events/"+ EventDataTable.Rows[i]["ImageFileName"]+"' border=0></a>"
else newcell.innerHTML="<a href='#' onclick=fnViewEventDetail('"+EventDataTable.Rows[i]["EventId"]+"')><img src='images/na_logo.jpg' border=0></a>"
newcell.width="100";
//newcell.innerHTML="<a href='#' onclick=fnViewEventDetail('"+EventDataTable.Rows[i]["EventId"]+"')><img src='DataFolder/Images/Events/"+ EventDataTable.Rows[i]["EventId"]+"t.jpg' border=0></a>"
newcell = insertCell(newrow,1);
newcell.innerHTML =" <a href='#' onclick=fnViewEventDetail('"+EventDataTable.Rows[i]["EventId"]+"')><b>"+fnFindQuotes(EventDataTable.Rows[i]["EventTitle"])+"</b></a>";
newcell.bgColor="#444444";
newrow=insertRow('tblView');
newcell = insertCell(newrow,0);
if(Trim(EventDataTable.Rows[i]["EventType"])=="Special"){
var dt=new Date(EventDataTable.Rows[i]["EventDate"]);
//if(dt.toString().substr(dt.toString().length-4,4)!=1900)
newcell.innerHTML =" <b>When :</b> "+Convert2Date(dt)
newcell.className="tdblack";
newcell.bgColor="#efefef";
newcell.height="15";
}
else{
var RecurringType=fnFindQuotes(EventDataTable.Rows[i]["EventType"])
var strRec=EventDataTable.Rows[i]["Recurring"];
var arrRec=strRec.split('|')
if(Trim(RecurringType)=="Weekly")
RecurringType=RecurringType + " "+arrDay[arrRec[0]-1]
else if(Trim(RecurringType)=="Monthly")
RecurringType=RecurringType + " "+arrWeek[arrRec[0]-1] + " " +arrMonthlyDay[arrRec[1]]
newcell.innerHTML =" <b>When :</b> "+RecurringType;
newcell.className="tdblack";
newcell.bgColor="#efefef";
newcell.height="15";
}
newrow=insertRow('tblView');
newcell = insertCell(newrow,0);
newcell.innerHTML =" <b>Where :</b> "+fnFindQuotes(EventDataTable.Rows[i]["Venue"]);
newcell.className="tdblack";
newcell.bgColor="#efefef";
newcell.height="15";
newrow=insertRow('tblView');
newcell = insertCell(newrow,0);
//var res=Wild.AjaxFunctions.ReadFromFile('Event',EventDataTable.Rows[i]["DescriptionFileName"]).value;
var Content=EventDataTable.Rows[i]["DescriptionFileName"]==null?"":fnFindQuotes(EventDataTable.Rows[i]["DescriptionFileName"].substring(0,500));
//newcell.innerHTML =" <b>About :</b> "+Content;
newcell.innerHTML ="<table><tr><td valign='top'><b class='tdblackbold'>About :</b></td><td><font class='tdblack'><span >"+Content+"</span></font></td></tr></table>"
newcell.className="tdblack";
newcell.bgColor="#efefef";
newcell.height="15";
newrow=insertRow('tblView');
newcell = insertCell(newrow,0);
newcell.align="right";
/*if(EventDataTable.Rows[i]["AllowGuestList"]){
newcell.innerHTML =" <input type='button' value='Guest' class='managebuttons' onclick='fnShowGuest("+ EventDataTable.Rows[i]["EventId"] +")'/>";
}*/
newcell.innerHTML +="<input type='button' class='managebuttons' value='Edit' onclick=fnEditEvent("+ EventDataTable.Rows[i]["EventId"] +")> <input type='button' class='managebuttons' value='Delete' onclick='fnDeleteEvent("+EventDataTable.Rows[i]["EventId"]+")'>";
newcell.height="10";
}
pCount =Math.ceil(Rows/10)
pstr="<table align='center'><tr>";
for(i=1;i<=pCount;i++){
if(i==CurrentPage)
pstr =pstr +"<td class='tdblackbold' nclick='javascript:fnPage(this)' id='page' class='tdblackbold'>[" + i + "]</td>"
else
pstr =pstr +"<td class='tdblackbold' onclick='javascript:fnPage(this)' id='page' class='tdblackbold' style='cursor:pointer'>" + i + "</td>"
}
document.getElementById("divPage").innerHTML= pstr;
}
}
//----------------------------------paging----------
function fnPage(Obj){
document.getElementById("divMessage").innerHTML="";
CurrentPage=Obj.innerHTML
fnDisplay();
}
//--------------------Save-----------------------
function fnSaveEvent(){
try{
MaxEventId=Wild.AjaxFunctions.GetLastNo('tblEvent','EventId').value
var isValid=false;
//isValid=fnValidate();
//if(isValid){
//if(document.thisForm.hidID.value==0){
//MaxEventId=Wild.AjaxFunctions.GetLastNo('tblEvent','EventId').value
// document.getElementById('divEventAdd').style.display="none";
//document.getElementById('PaymentDetails').style.display="block";
//fnSaveEventDetail()
//}
//else
fnSaveEventDetail();
//}
}catch(ex){alert(ex.message)}
}
//--------------------------------------------
//----------------------------Edit Event--------------------
function fnEditEvent(EventId){
document.thisForm.action="ManageEvents.aspx?EditId="+EventId
document.thisForm.submit();
}
function fnEnterValidate(obj){
if(obj.keyCode == 13){
obj.returnValue=false;
obj.cancel=true;
fnSaveEventDetail();
}
}
var Result=0;
var ExpDate
function fnSaveEventDetail(){
var Expiry=document.thisForm.DDMonth.value+"|"+document.thisForm.DDYear.value;;
var str=Expiry.split('|');
if(str[0].length==1)
ExpDate='0'+str[0]
else
ExpDate=str[0];
ExpDate+=str[1].substring(2,4);
//Wild.ManageEvents.PaymentInformation(Trim(document.thisForm.txt_CardNumber.value),Trim(document.thisForm.txtTotalCost.value),ExpDate,document.thisForm.txt_FirstName.value,document.thisForm.txt_LastName.value,document.thisForm.txt_Address.value,document.thisForm.txt_City.value,document.thisForm.txt_State.value,document.thisForm.txt_Zipcode.value)
var isValid=false;
if(fnValidate()){
//------------------for payment-------------
if(document.thisForm.hidID.value==0){
if(gMemberShip==true ){
if(gURL!="http://localhost/wild1.1/")
fnCallPayment()
else
fnSaveToDB();
}
else
fnSaveToDB();
}
else
fnSaveToDB();
//------------------for payment-------------
//Result=1
}
}
function fnCallPayment(){
var Res=Wild.ManageEvents.PaymentInformation(Trim(document.thisForm.txt_CardNumber.value),Trim(document.thisForm.txtTotalCost.value),ExpDate,document.thisForm.txt_FirstName.value,document.thisForm.txt_LastName.value,document.thisForm.txt_Address.value,document.thisForm.txt_City.value,document.thisForm.txt_State.value,document.thisForm.txt_Zipcode.value).value
arrStr=Res.split('|');
if(arrStr[0]!=1)
alert(arrStr[3].substr(11,arrStr[3].length))
if(arrStr[0]==1)
fnSaveToDB();
}
//------------------------Check payment--------------------
function fnCheckPaymentDetails(){
var arrStr
try{
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest()
else if (window.ActiveXObject)
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp!=null){
xmlhttp.onreadystatechange=fnPaymentResult
xmlhttp.open("GET","Payment.aspx",true)
xmlhttp.send(null)
}
else alert("Your browser does not support XMLHTTP.")
}
catch(e){ alert(e.message)}
}
/*function fnCheckPaymentDetails(){
var arrStr
try{
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest()
else if (window.ActiveXObject)
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp!=null){
xmlhttp.open("GET","Payment.aspx",false);
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){
fnPaymentResult(xmlhttp.responsetext)
}
}
xmlhttp.send(null)
}
else alert("Your browser does not support XMLHTTP.")
}
catch(e){ alert(ex.message)}
}*/
function fnPaymentResult(Res){
if (xmlhttp.readyState==4)
{
if (xmlhttp.status==200){
var str="";
str=xmlhttp.responseText
arrStr=str.split('|');
if(arrStr[0]!=1)
alert(arrStr[3].substr(11,arrStr[3].length))
if(arrStr[0]==1)
fnSaveToDB();
}
}
}
function fnSaveToDB(){
if(document.thisForm.hidID.value==0 ){
var EventCostDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventPostingCost','tblEventPostingCost',"EventType='"+RecurringEventType+"'").value
if(EventCostDataTable.Rows.length>0)
document.thisForm.txtEventCost.value = EventCostDataTable.Rows[0]["Cost"];
if(document.thisForm.rdo_Recurring[0].checked){
document.thisForm.txtRecurringNo.value =1;
document.thisForm.txtTotalCost.value=eval(document.thisForm.txtEventCost.value)*(eval(document.thisForm.txtRecurringNo.value))
if(document.thisForm.txtClosingDate.value == ""){
document.thisForm.txtClosingDate.value=document.thisForm.txtEventDate.value;
}
}
else{
document.thisForm.txtRecurringNo.value=document.thisForm.txtNoofWeekMonth.value;
document.thisForm.txtTotalCost.value=eval(document.thisForm.txtEventCost.value)* (eval(document.thisForm.txtRecurringNo.value))
}
if(gMemberShip==true ){
PaymentDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventPaymentDetails','tblEventPaymentDetails',"1=0").value
if(PaymentDataTable.Rows.length==0){
var objNewRow=new Object;
PaymentDataTable.addRow(objNewRow);
}
PaymentDataTable.Rows[0]["ListingId"]=ListingId;
PaymentDataTable.Rows[0]["FirstName"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_FirstName.value));
PaymentDataTable.Rows[0]["LastName"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_LastName.value));
PaymentDataTable.Rows[0]["Address"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_Address.value));
PaymentDataTable.Rows[0]["City"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_City.value));
PaymentDataTable.Rows[0]["State"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_State.value));
PaymentDataTable.Rows[0]["ZipCode"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_Zipcode.value));
PaymentDataTable.Rows[0]["CardHolderName"]=fnSingleQuoteReplace(Trim(document.thisForm.txt_CardHolder.value));
PaymentDataTable.Rows[0]["CardType"]=document.thisForm.DDCardType.value;
PaymentDataTable.Rows[0]["CardNumber"]=Trim(document.thisForm.txt_CardNumber.value);
ExDates=document.thisForm.DDMonth.value+"|"+document.thisForm.DDYear.value;
PaymentDataTable.Rows[0]["ExpireDate"]=ExDates;
PaymentDataTable.Rows[0]["CVVCode"]=Trim(document.thisForm.txt_SecurityCode.value);
PaymentDataTable.Rows[0]["Recurring"]=Trim(document.thisForm.txtRecurringNo.value)
PaymentDataTable.Rows[0]["EventCost"]= (document.thisForm.txtEventCost.value)
PaymentDataTable.Rows[0]["TotalCost"]= eval(document.thisForm.txtTotalCost.value).toFixed(2);
}
/*FileId=MaxEventId;
PicFileId=FileId
FileId=FileId+".html";*/
EventDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEvent','tblEvent',"1=0").value
if(EventDataTable.Rows.length==0){
var objNewRow=new Object;
EventDataTable.addRow(objNewRow);
EventId="0";
EventDataTable.Rows[0]["Recurring"] = Recurring;
EventDataTable.Rows[0]["EventType"] = RecurringEventType;
//EventDataTable.Rows[0]["EventDate"] = '06/11/2007';
//alert(new Date(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' ')))
//var dt = new Date(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' '))
//dt = dt.toLocaleString();
//alert(dt);
EventDataTable.Rows[0]["EventDate"] =Wild.AjaxFunctions.FormatClientDate(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' ')).value;
//new Date(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' '));
if(Trim(RecurringEventType)!= "Special"){
EventDataTable.Rows[0]["SpanDate"]=document.thisForm.opt_ToDay.value;
EventDataTable.Rows[0]["NoofWeekMonth"]=document.thisForm.txtNoofWeekMonth.value;
EventDataTable.Rows[0]["EventEndDate"] =Wild.AjaxFunctions.FormatClientDate(document.thisForm.txtEventEndDate.value.replace('-',' ').replace('-',' ')).value //new Date(document.thisForm.txtEventEndDate.value.replace('-',' ').replace('-',' '))
}
else{
EventDataTable.Rows[0]["EventEndDate"] =Wild.AjaxFunctions.FormatClientDate(document.thisForm.txtClosingDate.value.replace('-',' ').replace('-',' ')).value //new Date(document.thisForm.txtEventEndDate.value.replace('-',' ').replace('-',' '))
}
}
}
else{
EventDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEvent','tblEvent',"EventId="+document.thisForm.hidID.value).value
//FileId=EventDataTable.Rows[0]["DescriptionFileName"];
PicFileId=document.thisForm.hidID.value
EventId=document.thisForm.hidID.value;
}
EventDataTable.Rows[0]["CategoryId"] = document.thisForm.opt_EventType.value;
EventDataTable.Rows[0]["ListingId"]=ListingId;
EventDataTable.Rows[0]["CityId"] = gCityId;//document.thisForm.opt_City.value;
EventDataTable.Rows[0]["EventTitle"] = fnSingleQuoteReplace(Trim(document.thisForm.txtTitle.value));
EventDataTable.Rows[0]["Venue"] = fnSingleQuoteReplace(Trim(document.thisForm.txtVenue.value));
EventDataTable.Rows[0]["MinAge"] = document.thisForm.opt_Age.value;
EventDataTable.Rows[0]["StartTime"] = document.thisForm.opt_StartHr.value +":"+document.thisForm.opt_StartMin.value+":"+document.thisForm.Cbo_StartHr.value;
if(document.thisForm.opt_EndHr.value != -2)
EventDataTable.Rows[0]["EndTime"] = document.thisForm.opt_EndHr.value +":"+document.thisForm.opt_EndMin.value+":"+document.thisForm.Cbo_EndHr.value;
EventDataTable.Rows[0]["ImageFileName"]=gImageFileName;
EventDataTable.Rows[0]["Summary"] = fnSingleQuoteReplace(Trim(document.thisForm.txtSummary.value));
EventDataTable.Rows[0]["DressCode"] = fnSingleQuoteReplace(Trim(document.thisForm.txtDressCode.value));
EventDataTable.Rows[0]["Musicstyle"] = fnSingleQuoteReplace(Trim(document.thisForm.txtMusicStyle.value));
EventDataTable.Rows[0]["Price"] = parseInt(document.thisForm.txtPrice.value);
EventDataTable.Rows[0]["WebsiteURL"] = fnSingleQuoteReplace(Trim(document.thisForm.txtURL.value));
//EventDataTable.Rows[0]["AllowGuestList"] = (document.thisForm.chkGuestList.checked)?true:false;
EventDataTable.Rows[0]["DescriptionFileName"]=fnSingleQuoteReplace(Trim(document.getElementById('txtDescription').value));
// p-
//EventDataTable.Rows[0]["LastUpdatedDateTime"]=new Date();
// end p-
var UpdateCount=Wild.AjaxFunctions.UpdateTheDataToDB(EventDataTable,'tblEvent','EventId',EventId).value;
Wild.ManageEvents.UpdateShortName(parseInt(EventId)).value;
if(UpdateCount!=null){
//var res=Wild.AjaxFunctions.SaveAsFile('Event',strContent,FileId).value;
if(UpdateCount==1){
if(document.thisForm.hidID.value == 0 ){
var opt=0;var Month=0;var Week=0;
var EventId=Wild.ManageEvents.getIdentity().value;
if(EventId>0){
if(Trim(RecurringEventType)=="Weekly") {opt=1;Week=document.thisForm.opt_WDay.value;}
else {opt=2;Month=document.thisForm.opt_Week.value;Week=document.thisForm.opt_MDay.value;}
//var EventId=(Wild.AjaxFunctions.GetLastNo('tblEvent','EventId').value)-1
if(Trim(RecurringEventType)!="Special")
var EventEndDate=Wild.ManageEvents.InsertEventEndDates(EventId,opt,Month,Week,new Date(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' ')), document.thisForm.txtNoofWeekMonth.value).value
if(gMemberShip==true ){
PaymentDataTable.Rows[0]["EventId"]=EventId
var PaymentUpdateCount=Wild.AjaxFunctions.UpdateTheDataToDB(PaymentDataTable,'tblEventPaymentDetails','EventPaymentId',"0").value;
if(PaymentUpdateCount==1){
Wild.ManageEvents.SendPaymentMail(
PaymentDataTable.Rows[0]["FirstName"],
PaymentDataTable.Rows[0]["LastName"],
PaymentDataTable.Rows[0]["Address"],
PaymentDataTable.Rows[0]["City"],
PaymentDataTable.Rows[0]["State"],
PaymentDataTable.Rows[0]["ZipCode"],
PaymentDataTable.Rows[0]["CardHolderName"],
PaymentDataTable.Rows[0]["CardType"],
PaymentDataTable.Rows[0]["ExpireDate"],
PaymentDataTable.Rows[0]["CVVCode"],
PaymentDataTable.Rows[0]["EventCost"]
) ;
}
}
var DataTable=Wild.AjaxFunctions.FetchTheDataFromDB("tblEvent","tblEvent","EventId in(select max(EventId) from tblEvent)",null,"EventId").value;
Wild.ManageEvents.SendMail(DataTable.Rows[0]["EventId"],ListingId,RecurringEventType) ;
}
}
fnSetVisibility('View');
document.thisForm.hidID.value=0;
document.thisForm.action="ManageEvents.aspx";
document.thisForm.submit();
document.getElementById("divMessage").innerHTML="New Event has been posted successfully";
}
}
else
alert(UpdateCount)
}
//------------------------------------------------------------
//-------------------Assign Edit Values----------
function fnAssignEditValues(){
// var Time=new Array["SR","SM","ER","EM"]
document.getElementById('PaymentDetails').style.display="none";
gEventDateCheck=true;
gEventId= document.thisForm.hidID.value;
var DataTable;
DataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEvent', 'tblEvent' , "EventId="+document.thisForm.hidID.value ).value;
PicFileId=document.thisForm.hidID.value ;
document.thisForm.txtTitle.value =fnFindQuotes(DataTable.Rows[0]["EventTitle"]);
//document.thisForm.opt_City.value =DataTable.Rows[0]["CityId"];
document.thisForm.txtVenue.value=fnFindQuotes(DataTable.Rows[0]["Venue"]);
document.thisForm.opt_Age.value =DataTable.Rows[0]["MinAge"];
var StartTime=DataTable.Rows[0]["StartTime"];
var EndTime=DataTable.Rows[0]["EndTime"];
//alert(Time[0])
/* Time[0]=StartTime.split(':')[0]
Time[1]=StartTime.split(':')[1];
Time[2]=EndTime.split(':')[0];
Time[3]=EndTime.split(':')[1];*/
document.thisForm.opt_StartHr.value= StartTime.split(':')[0];
document.thisForm.opt_StartMin.value=StartTime.split(':')[1];
document.thisForm.Cbo_StartHr.value=StartTime.split(':')[2]
if(EndTime!="" || EndTime!= 'null'){
document.thisForm.opt_EndHr.value= EndTime.split(':')[0];
document.thisForm.opt_EndMin.value =EndTime.split(':')[1];
document.thisForm.Cbo_EndHr.value=EndTime.split(':')[2]
}
var Recurring=fnFindQuotes(DataTable.Rows[0]["EventType"]);
var strRec=DataTable.Rows[0]["Recurring"];
if(strRec!=null){
var arrRec=strRec.split('|')
if(Trim(Recurring)=="Weekly"){
document.thisForm.rdo_Recurring[1].checked=true;document.thisForm.opt_WDay.value=arrRec[0];
document.thisForm.opt_FromDay.value=arrRec[0];
document.thisForm.opt_ToDay.disabled="disabled";
}
else {
document.thisForm.rdo_Recurring[2].checked=true;
document.thisForm.opt_Week.value=arrRec[0];
document.thisForm.opt_MDay.value=arrRec[1];
if(document.thisForm.opt_MDay.value!=-2 )
document.thisForm.opt_FromDay.value=parseInt(document.thisForm.opt_MDay.value)+2;
else document.thisForm.opt_FromDay.value=-2;
if(document.thisForm.opt_MDay.value==6){
document.thisForm.opt_FromDay.value=1;
}
document.thisForm.opt_ToDay.disabled="disabled";
}
}
else
if(Trim(Recurring)=="Special"){
document.thisForm.rdo_Recurring[0].checked=true;
document.getElementById('trSpecialClosingDate').disable="disabled"
document.thisForm.txtClosingDate.readOnly=true;
document.thisForm.bCDate.disabled=true;
dt=new Date(DataTable.Rows[0]["EventEndDate"])
document.thisForm.txtClosingDate.value = Convert2Date(dt)
//document.thisForm.txtClosingDate.value=
}
fnRecurringChange(Recurring)
if(document.getElementById('trNoOfWeekMonth').style.display==trstyle){
document.thisForm.txtNoofWeekMonth.value=DataTable.Rows[0]["NoofWeekMonth"]
document.thisForm.txtNoofWeekMonth.readOnly=true;
}
document.thisForm.opt_ToDay.value=DataTable.Rows[0]["SpanDate"]
document.thisForm.txtSummary.value= (DataTable.Rows[0]["Summary"]==null)?"":fnFindQuotes(DataTable.Rows[0]["Summary"]);
document.thisForm.opt_EventType.value=DataTable.Rows[0]["CategoryId"];
document.thisForm.txtDressCode.value=(DataTable.Rows[0]["DressCode"]==null)?"":fnFindQuotes(DataTable.Rows[0]["DressCode"]);
document.thisForm.txtMusicStyle.value=(DataTable.Rows[0]["Musicstyle"]==null)?"":fnFindQuotes(DataTable.Rows[0]["Musicstyle"]);
document.thisForm.txtPrice.value=(DataTable.Rows[0]["Price"]==null)?"":DataTable.Rows[0]["Price"];
document.thisForm.txtURL.value=(DataTable.Rows[0]["WebsiteURL"]==null)?"":DataTable.Rows[0]["WebsiteURL"];
//document.thisForm.chkGuestList.checked=DataTable.Rows[0]["AllowGuestList"]
/*var res=Wild.AjaxFunctions.ReadFromFile('Event',DataTable.Rows[0]["DescriptionFileName"]).value;
document.getElementById('FCKEditor').value=res;*/
var Contents=DataTable.Rows[0]["DescriptionFileName"]==null?"":fnFindQuotes(DataTable.Rows[0]["DescriptionFileName"])
document.getElementById('txtDescription').innerHTML=Contents;
//var chkphoto=Wild.AjaxFunctions.chkImage('DataFolder/Images/Events/'+ DataTable.Rows[0]["EventId"]+'t.jpg').value;
gImageFileName=DataTable.Rows[0]["ImageFileName"];
var chkphoto=DataTable.Rows[0]["ImageFileName"]
if(chkphoto!=undefined && chkphoto!=""){
document.getElementById('btn_Remove').style.display='block';
document.getElementById("CustomImage").src="DataFolder/Images/Events/"+ DataTable.Rows[0]["ImageFileName"]
}
else{
document.getElementById("CustomImage").src="images/na_logo.jpg";
document.getElementById('btn_Remove').style.display='none';
}
var dt=new Date(DataTable.Rows[0]["EventDate"])
document.thisForm.txtEventDate.value=Convert2Date(dt)
if(DataTable.Rows[0]["EventEndDate"]!=""){
dt=new Date(DataTable.Rows[0]["EventEndDate"])
document.thisForm.txtEventEndDate.value = Convert2Date(dt)
document.thisForm.bDate.disabled=true;
//document.thisForm.btn_EndDate.disabled=true
for(i=0;i<3;i++){
document.thisForm.rdo_Recurring[i].disabled='disabled'
}
document.thisForm.opt_WDay.disabled='disabled'
document.thisForm.opt_MDay.disabled='disabled'
document.thisForm.opt_Week.disabled='disabled'
}
//document.getElementById("CustomImage").src="DataFolder/Images/Events/"+ DataTable.Rows[0]["EventId"]+"t.jpg"
}
//------------------------------------------------
//-----------------------view Detail--------------------
function fnViewEventDetail(EventId){
fnSetVisibility('ViewDetail');
var DataTable=Wild.ManageEvents.EventData(EventId).value
if(DataTable.Rows.length){
document.getElementById("spnEvent").innerHTML =fnFindQuotes(DataTable.Rows[0]["EventTitle"]);
document.getElementById("spnType").innerHTML =fnFindQuotes(DataTable.Rows[0]["CategoryName"]);
var RecurringType=fnFindQuotes(DataTable.Rows[0]["EventType"])
document.getElementById("spnRecurring").innerHTML =RecurringType;
var strRec=DataTable.Rows[0]["Recurring"];
if(strRec!=null){
var arrRec=strRec.split('|')
if(Trim(RecurringType)=="Weekly"){RecurringType=RecurringType + " "+arrDay[arrRec[0]-1]}
else{RecurringType=RecurringType + " "+arrWeek[arrRec[0]-1] + " " +arrMonthlyDay[arrRec[1]]}
}
if(Trim(DataTable.Rows[0]["EventType"])=="Special"){
var dt=new Date(DataTable.Rows[0]["EventDate"])
document.getElementById("spnWhen").innerHTML =Convert2Date(dt);
}
else
document.getElementById("spnWhen").innerHTML =RecurringType;
var StartTime=DataTable.Rows[0]["StartTime"].split(':')
var EndTime
if(DataTable.Rows[0]["EndTime"]==null)
EndTime="";
else
EndTime =DataTable.Rows[0]["EndTime"].split(':')
if(Trim(DataTable.Rows[0]["EventType"])=="Special"){
var startdt=new Date(DataTable.Rows[0]["EventDate"])
document.getElementById("spnWhen").innerHTML =Convert2Date(startdt)
document.getElementById("spnWhen").innerHTML+=" "+StartTime[0]+":"+StartTime[1]+" "+StartTime[2]
var enddt=new Date(DataTable.Rows[0]["EventEndDate"])
document.getElementById("spnWhen").innerHTML+=" - "+Convert2Date(enddt)
if(EndTime!="")
document.getElementById("spnWhen").innerHTML+=" "+EndTime[0]+":"+EndTime[1]+" "+EndTime[2]
}
else{
document.getElementById("spnWhen").innerHTML+=" "+StartTime[0]+":"+StartTime[1]+" "+StartTime[2]
if(DataTable.Rows[0]["SpanDate"]!=-2){
document.getElementById("spnWhen").innerHTML+=" - "+arrDay[DataTable.Rows[0]["SpanDate"]-1]
if(EndTime!="")
document.getElementById("spnWhen").innerHTML+=" "+EndTime[0]+":"+EndTime[1]+" "+EndTime[2]
}
}
//if(DataTable.Rows[0]["EndTime"]== null)
// document.getElementById("spnWhen").innerHTML= document.getElementById("spnWhen").innerHTML+" " + DataTable.Rows[0]["StartTime"];//document.getElementById("spnWhen").innerHTML= document.getElementById("spnWhen").innerHTML+" " + DataTable.Rows[0]["StartTime"]+"-"+DataTable.Rows[0]["EndTime"]
//else document.getElementById("spnWhen").innerHTML= document.getElementById("spnWhen").innerHTML+" " + DataTable.Rows[0]["StartTime"]+" - "+DataTable.Rows[0]["EndTime"]//document.getElementById("spnWhen").innerHTML= document.getElementById("spnWhen").innerHTML+" " + DataTable.Rows[0]["StartTime"]+"-";
document.getElementById("spnLocation").innerHTML =DataTable.Rows[0]["Venue"];
document.getElementById("spnAge").innerHTML =(DataTable.Rows[0]["MinAge"]==0)?"All":DataTable.Rows[0]["MinAge"];
document.getElementById("spnDress").innerHTML =(DataTable.Rows[0]["DressCode"]==null)?"":fnFindQuotes(DataTable.Rows[0]["DressCode"]);
document.getElementById("spnMusic").innerHTML =(DataTable.Rows[0]["Musicstyle"]==null)?"":fnFindQuotes(DataTable.Rows[0]["Musicstyle"]);
document.getElementById("spnPrice").innerHTML =(DataTable.Rows[0]["Price"]==null)?"":DataTable.Rows[0]["Price"];
//document.getElementById("spnGuestList").innerHTML =(DataTable.Rows[0]["AllowGuestList"]==0)?"No":"Yes";
document.getElementById("spnWebSite").innerHTML =(DataTable.Rows[0]["WebsiteURL"]==null)?"":DataTable.Rows[0]["WebsiteURL"];
//var res=Wild.AjaxFunctions.ReadFromFile('Event',DataTable.Rows[0]["DescriptionFileName"]).value;
//if(res!="1")
//{
document.getElementById("spnDescription").className="tdblack";
var content=DataTable.Rows[0]["DescriptionFileName"]==null?"":fnFindQuotes(DataTable.Rows[0]["DescriptionFileName"]);
document.getElementById("spnDescription").innerHTML=content
//}
//var chkphoto=Wild.AjaxFunctions.chkImage('DataFolder/Images/Events/'+ DataTable.Rows[0]["EventId"]+'.jpg').value;
var chkphoto=DataTable.Rows[0]["ImageFileName"]
if(chkphoto!=undefined && chkphoto!="")
document.getElementById("CustomLargeImage").src="DataFolder/Images/Events/"+DataTable.Rows[0]["ImageFileName"].replace('t','');
else document.getElementById("CustomLargeImage").src="images/na_logo.jpg";
//document.getElementById("CustomLargeImage").src="DataFolder/Images/Events/"+ DataTable.Rows[0]["EventId"]+".jpg"
//document.getElementById("CustomLargeImage").src="DataFolder/Images/Events/"+ DataTable.Rows[0]["EventId"]+".gif"
}
}
//-----------------------delete Event-------------
function fnDeleteEvent(EventId){
if(confirm("Are you absolutely sure you want to delete this event?")){
/*var RemovetEventDiscount=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventDiscount','tblEventDiscount',"EventId="+EventId).value;
if(RemovetEventDiscount.Rows.length==1){
RemovetEventDiscount.Rows[0]["_Delete"]=true;
var Count=Wild.AjaxFunctions.UpdateTheDataToDB(RemovetEventDiscount,'tblEventDiscount','EventDiscountId',"-1");
if(Count==1){
Wild.AjaxFunctions.RemovePhoto('Discount',EventId)
}
}*/
var RemoveEventFavourite=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventFavourite','tblEventFavourite',"EventId="+EventId).value;
if(RemoveEventFavourite.Rows.length >= 1){
for(i=0;i<RemoveEventFavourite.Rows.length ;i++){
RemoveEventFavourite.Rows[i]["_Delete"]=true;
}
Wild.AjaxFunctions.UpdateTheDataToDB(RemoveEventFavourite,'tblEventFavourite','EventFavouriteId',"-1");
}
var RemoveGuestList=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventGuestList','tblEventGuestList',"EventId="+EventId).value;
if(RemoveGuestList.Rows.length >= 1){
for(i=0;i<RemoveGuestList.Rows.length;i++){
RemoveGuestList.Rows[i]["_Delete"]=true;
}
Wild.AjaxFunctions.UpdateTheDataToDB(RemoveGuestList,'tblEventGuestList','GuestListId',"-1");
}
var RemoveEventDate=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventDates','tblEventDates',"EventId="+EventId).value;
if(RemoveEventDate.Rows.length>=1){
for(i=0;i<RemoveEventDate.Rows.length;i++){
RemoveEventDate.Rows[i]["_Delete"]=true;
}
Wild.AjaxFunctions.UpdateTheDataToDB(RemoveEventDate,'tblEventDates','EventDatesId',"-1");
}
var RemovePayment=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventPaymentDetails','tblEventPaymentDetails',"EventId="+EventId).value;
if(RemovePayment.Rows.length>=1){
for(i=0;i<RemovePayment.Rows.length;i++){
RemovePayment.Rows[i]["_Delete"]=true;
}
Wild.AjaxFunctions.UpdateTheDataToDB(RemovePayment,'tblEventPaymentDetails','EventPaymentID',"-1");
}
Wild.AjaxFunctions.DeleteFile("Event",EventId.toString(),"html,image","File");
// Wild.AjaxFunctions.RemovePhoto('Events',RemoveDataTable.Rows[0]["ImageFileName"])
var RemovePhotoGallery=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventPhotoGalleryHeaders','tblEventPhotoGalleryHeaders',"EventId="+EventId).value;
if(RemovePhotoGallery.Rows.length==1){
RemovePhotoGallery.Rows[0]["_Delete"]=true;
Wild.AjaxFunctions.UpdateTheDataToDB(RemovePhotoGallery,'tblEventPhotoGalleryHeaders','EventPhotoGalleryHeaderID',"-1");
}
var RemoveDataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEvent','tblEvent',"EventId="+EventId).value
RemoveDataTable.Rows[0]["_Delete"]=true;
var UpdatedCount=Wild.AjaxFunctions.UpdateTheDataToDB(RemoveDataTable,'tblEvent','EventId',"-1").value;
if(UpdatedCount==1){
//Wild.AjaxFunctions.DeleteFile('Event',RemoveDataTable.Rows[0]["DescriptionFileName"])
CurrentPage=1
fnSetVisibility('ViewEvents')
//fnDisplay();
document.getElementById("divMessage").innerHTML="Event has been deleted successfully"
document.getElementById("divMessage").className="response"
}
}
}
//--------------------validate Function--------------
function fnValidate(){
//try{
var isValid=true;
isValid=isNull(document.thisForm.txtTitle,"Event Title");
if(isValid)isValid=fnChkAlphaNum(document.thisForm.txtTitle,"Event Title");
//if(isValid)isValid=chkCombo(document.thisForm.opt_City,"City");
if(isValid)isValid=isNull(document.thisForm.txtVenue,"Venue");
if(isValid)isValid=fnChkAlphaNum(document.thisForm.txtVenue,"Venue");
//if(isValid)isValid=chkCombo(document.thisForm.opt_ToDayt,"Closing Date");
if(isValid) isValid=isNull(document.thisForm.txtEventDate,"Event Date");
if(isValid){
if(document.getElementById('trSpecialClosingDate').style.display != "none"){
var Date1=new Date(document.thisForm.txtEventDate.value);var Date2=new Date(document.thisForm.txtClosingDate.value)
var Diff=Wild.AjaxFunctions.getDateDiff(document.thisForm.txtEventDate.value).value;
if(Diff < 0){
alert('Invalid EventDate')
document.thisForm.txtEventDate.focus();
isValid=false;
}
//else if(Trim(document.thisForm.txtClosingDate.value)==""){
//alert('Please enter closing date')
//isValid=false;
//}
else if(Date1 > Date2){
alert("Invalid EventDate");
document.thisForm.txtEventDate.focus();
isValid=false;
}
else isValid=true;
}
}
if(isValid){
if(document.getElementById('trSpecialClosingDate').style.display=="none"){
if(Trim(document.thisForm.opt_WDay.options[document.thisForm.opt_WDay.selectedIndex].innerHTML) == Trim(document.thisForm.opt_ToDay.options[document.thisForm.opt_ToDay.selectedIndex].innerHTML) ){
var SH=document.thisForm.Cbo_StartHr.options[document.thisForm.Cbo_StartHr.selectedIndex].innerHTML;
var EH=document.thisForm.Cbo_EndHr.options[document.thisForm.Cbo_EndHr.selectedIndex].innerHTML;
if(SH == "pm" && EH == "am" && document.thisForm.opt_WDay.style.display == trstyle){
document.thisForm.txtClosingDate.value="";
isValid=false;
alert('please enter valid end minutes')
}
else isValid=true;
}
}
if(isValid && document.getElementById('trSpecialClosingDate').style.display=="none"){
var V=document.thisForm.opt_MDay.options[document.thisForm.opt_MDay.selectedIndex].innerHTML;
var L=document.thisForm.opt_ToDay.options[document.thisForm.opt_ToDay.selectedIndex].innerHTML;
if(Trim(V)== Trim(L) && document.thisForm.opt_MDay.style.display == trstyle){
document.thisForm.txtClosingDate.value="";
var SH=document.thisForm.Cbo_StartHr.options[document.thisForm.Cbo_StartHr.selectedIndex].innerHTML;
var EH=document.thisForm.Cbo_EndHr.options[document.thisForm.Cbo_EndHr.selectedIndex].innerHTML;
if(SH == "pm" && EH == "am"){
isValid=false;
alert('please enter valid end minutes')
}
}
else isValid=true;
}
}
if(isValid){
var SH=document.thisForm.Cbo_StartHr.options[document.thisForm.Cbo_StartHr.selectedIndex].innerHTML;
var EH=document.thisForm.Cbo_EndHr.options[document.thisForm.Cbo_EndHr.selectedIndex].innerHTML;
if( document.thisForm.txtEventDate.value == document.thisForm.txtClosingDate.value && SH == "pm" && EH == "am"){
isValid=false;
alert('please enter valid end minutes')
}
else isValid=true;
}
if(isValid){
if(document.thisForm.opt_StartHr.value == -2){
alert('Please select start Time')
isValid=false;
document.thisForm.opt_StartHr.focus();
}else isValid=true;
}
if( document.thisForm.hidID.value == 0){
if(document.getElementById('PaymentDetails').style.display=="block")
{
if(isValid) isValid=isNull(document.thisForm.txt_FirstName,"FirstName");
if(isValid)isValid=fnChkAlpha(document.thisForm.txt_FirstName,"FirstName");
if(isValid) isValid=isNull(document.thisForm.txt_LastName,"LastName");
if(isValid)isValid=fnChkAlpha(document.thisForm.txt_LastName,"LastName");
if(isValid) isValid=isNull(document.thisForm.txt_Address,"Address");
//if(isValid)isValid=fnChkAlpha(document.thisForm.txt_CardHolder,"Card Holder Name");
if(isValid) isValid=isNull(document.thisForm.txt_City,"City");
if(isValid)isValid=fnChkAlpha(document.thisForm.txt_City,"City");
if(isValid) isValid=isNull(document.thisForm.txt_State,"State");
if(isValid)isValid=fnChkAlpha(document.thisForm.txt_State,"State");
if(isValid) isValid=isNull(document.thisForm.txt_Zipcode,"Zipcode");
if(isValid)isValid=fnChkNum(document.thisForm.txt_Zipcode,"Zipcode");
if(isValid) isValid=isNull(document.thisForm.txt_CardHolder,"Card Holder Name");
if(isValid)isValid=fnChkAlpha(document.thisForm.txt_CardHolder,"Card Holder Name");
if(isValid)isValid=chkCombo(document.thisForm.DDCardType,"Card Type");
if(isValid)isValid=isNull(document.thisForm.txt_CardNumber,"Card Number");
if(isValid)isValid=fnChkNum(document.thisForm.txt_CardNumber,"Card Number");
if(isValid)isValid=isLen(document.thisForm.txt_CardNumber,16,"Card Number");
if(isValid)isValid=chkCombo(document.thisForm.DDMonth,"Month");
if(isValid)isValid=chkCombo(document.thisForm.DDYear,"Year");
if(isValid){
if(document.thisForm.DDYear.value==CurrentMonthAndYear[0] && parseInt(document.thisForm.DDMonth.value) < parseInt(CurrentMonthAndYear[1])+1){
alert("Please choose valid Month");
document.thisForm.DDMonth.focus();
isValid=false;
} else isValid=true;
}
if(isValid)isValid=isNull(document.thisForm.txt_SecurityCode,"Security Code");
if(isValid)isValid=fnChkNum(document.thisForm.txt_SecurityCode,"Security Code");
if(isValid)isValid=isLen(document.thisForm.txt_SecurityCode,3,"Security Code");
}
if(isValid){
if(document.getElementById('trNoOfWeekMonth').style.display==trstyle){
isValid=isNull(document.thisForm.txtNoofWeekMonth,"No of Weeks/Month")
if(isValid)isValid=fnChkNum(document.thisForm.txtNoofWeekMonth,"No of Weeks/Month");
if(isValid)fnGetEventDate();
}
}
}
if(isValid)isValid=chkCombo(document.thisForm.opt_EventType,"Event Type");
if(isValid){
if(document.getElementById('divOtherCategory').style.display == "block"){
alert('Please Save the event category')
document.getElementById('txtEventName').focus();
isValid=false;
}else isValid=true;
}
if(isValid)isValid=isNull(document.thisForm.txtDescription,"Description");
/*if(isValid){
if(document.thisForm.txtSummary.value!="")
isValid=fnChkAlphaNum(document.thisForm.txtSummary,"Summary")
}*/
if(isValid){
if(document.thisForm.txtDressCode.value!="")
isValid=fnChkAlphaNum(document.thisForm.txtDressCode,"DressCode")
}
if(isValid){
if(document.thisForm.txtMusicStyle.value!="")
isValid=fnChkAlphaNum(document.thisForm.txtMusicStyle,"Music Style")
}
if(isValid){
if(document.thisForm.txtPrice.value!="")
isValid=notPrice(document.thisForm.txtPrice,"Price")
if(isValid){
if(parseInt(document.thisForm.txtPrice.value) == 0 ){
alert('Please enter valid Ticket Price')
document.thisForm.txtPrice.focus();
isValid=false;
}else isValid=true;
}
}
if(isValid){
if(document.thisForm.txtURL.value!="")
isValid=isURL(document.thisForm.txtURL,"URL");
}
return isValid;
//}catch(ex){alert(ex.message)}
}
//------------------GetEventDate---------------
function fnGetEventDate(){
if(document.thisForm.rdo_Recurring[1].checked){
document.thisForm.opt_FromDay.value=document.thisForm.opt_WDay.value;
}
else if(document.thisForm.rdo_Recurring[2].checked) {
if(document.thisForm.opt_MDay.value!=-2 )
document.thisForm.opt_FromDay.value=parseInt(document.thisForm.opt_MDay.value)+2;
else
document.thisForm.opt_FromDay.value=-2;
if(document.thisForm.opt_MDay.value==6){
document.thisForm.opt_FromDay.value=1;
}
}
if(document.thisForm.rdo_Recurring[0].checked){
RecurringEventType="Special";
//document.thisForm.txtEventEndDate.value = document.thisForm.txtEventDate.value;
LoadCostDetails('Special');
}
else if(document.thisForm.txtEventDate.value !="" && document.thisForm.txtNoofWeekMonth.value!=""){
if(document.thisForm.txtNoofWeekMonth.value.match(/^\d{0,9}$/)){
if(document.thisForm.rdo_Recurring[1].checked ){
RecurringEventType="Weekly";
if(gEventId == ""){
if(!document.thisForm.bDate.disabled)
isValid=chkCombo(document.thisForm.opt_WDay,"Weekly Day");
}
Recurring=document.thisForm.opt_WDay.value;
LoadCostDetails('Weekly');
}
else {
RecurringEventType="Monthly";
if(gEventId==""){
isValid=chkCombo(document.thisForm.opt_Week,"Week");
if(isValid)isValid=chkCombo(document.thisForm.opt_MDay,"Monthly Day");
if(isValid)Recurring=document.thisForm.opt_Week.value+"|"+document.thisForm.opt_MDay.value;
LoadCostDetails('Monthly');
}
}
if(gEventId == ""){
if(isValid){
var opt=0;var Month=0;var Week=0;
if(RecurringEventType=="Weekly") {opt=1;Week=document.thisForm.opt_WDay.value;}
else {opt=2;Month=document.thisForm.opt_Week.value;Week=document.thisForm.opt_MDay.value}
var EventEndDate=Wild.ManageEvents.GetEventEndDates(opt,Month,Week,new Date(document.thisForm.txtEventDate.value.replace('-',' ').replace('-',' ')), document.thisForm.txtNoofWeekMonth.value).value
var dt=new Date(EventEndDate.Rows[0]["EventDate"]);
document.thisForm.txtEventEndDate.value =Convert2Date(dt);
}
}
}else{
alert('Enter only Numbers in Number of Days');
document.thisForm.txtNoofWeekMonth.value="";
document.thisForm.txtNoofWeekMonth.focus();
}
}
}
//----------------discounts----------------------
function fnEventDiscounts(EventId){
window.location.href=gURL+"ManageDicount.aspx?EventId="+EventId;
}
//----------------------------------------------
/*function FCKeditor_OnComplete( editorInstance ){
objEditor = FCKeditorAPI.GetInstance('FCKEditor') ;
}*/
//uplaod photo
function UploadPhoto(){
if(PicFileId==0)
PicFileId=Wild.AjaxFunctions.GetLastNo('tblEvent','EventId').value;
childWind = window.open(gSSLURL+'uploadmanager.aspx?userid='+ListingId+'&Opt=Events&f='+PicFileId,'uploadmanager','height=320,width=530' );
}
function LoadImage2ImgTag(filename)
{
document.getElementById('CustomImage').src = filename;
document.getElementById('btn_Remove').style.display="block";
lastIndexOf = filename.lastIndexOf( '/');
filename = filename.substring( lastIndexOf +1 );
gImageFileName=filename;
}
//------recurring
function fnRecurringChange(RecurringType){
if(Trim(RecurringType) == "Special"){
//thisForm.txtTotalCost.value="";
//thisForm.txtTotalCost.value=""
document.getElementById('tr_EndDate').style.display="none"
document.thisForm.txtEventDate.value="";
document.thisForm.txtEventEndDate.value="";
document.getElementById('trNoOfWeekMonth').style.display ="none"
document.getElementById('trWeeklyClosingDate').style.display ="none"
document.getElementById('opt_WDay').style.display="none";
document.getElementById('opt_Week').style.display="none"
document.getElementById('opt_MDay').style.display="none"
// document.getElementById('btn_EndDate').style.display="block"
document.getElementById('trSpecialClosingDate').style.display =trstyle;
LoadCostDetails("Special")
//thisForm.txtTotalCost.value=""
}
else if(Trim(RecurringType)=="Weekly"){
document.getElementById('tr_EndDate').style.display=trstyle;
document.getElementById('opt_WDay').style.display="block";
document.getElementById('opt_Week').style.display="none";
document.getElementById('opt_MDay').style.display="none";
// document.getElementById('btn_EndDate').style.display="none";
document.thisForm.opt_MDay.value=-2;
document.thisForm.opt_Week.value=-2;
document.thisForm.txtEventDate.value="";
document.thisForm.txtEventEndDate.value="";
document.thisForm.txtNoofWeekMonth.value="";
document.getElementById('trNoOfWeekMonth').style.display =trstyle
document.getElementById('trSpecialClosingDate').style.display ="none";
document.getElementById('trWeeklyClosingDate').style.display=trstyle;
LoadCostDetails("Weekly")
document.thisForm.txtTotalCost.value="";
}
else {
document.getElementById('tr_EndDate').style.display=trstyle;
document.getElementById('opt_Week').style.display="block"
document.getElementById('opt_MDay').style.display="block"
document.getElementById('opt_WDay').style.display="none";
// document.getElementById('btn_EndDate').style.display="none";
document.thisForm.opt_WDay.value=-2;
document.thisForm.txtEventDate.value="";
document.thisForm.txtEventEndDate.value="";
document.thisForm.txtNoofWeekMonth.value="";
document.getElementById('trNoOfWeekMonth').style.display =trstyle
document.getElementById('trSpecialClosingDate').style.display ="none";
document.getElementById('trWeeklyClosingDate').style.display=trstyle;
LoadCostDetails('Monthly')
document.thisForm.txtTotalCost.value="";
}
}
//--------------------------Remove Photo---------------------
function RemovePhoto(){
Wild.AjaxFunctions.RemovePhoto('Events',gImageFileName)
document.getElementById('CustomImage').src ="images/na_logo.jpg";
document.getElementById('btn_Remove').style.display="none";
gImageFileName="";
}
//----
//-----------------------------------Show Guest-------------
function fnShowGuest(EventId){
fnSetVisibility('GuestList');
var str="";
str="<table border='0' width='735' class='border' align='center'>";
var ShowTable=Wild.ManageEvents.FetchTheGuest(EventId).value;
Rows=ShowTable.Rows.length;
if(CurrentPage==1){
start=0;
end=9;
if(end>=Rows)end=Rows-1;
}else{
start=(CurrentPage*10)-10;
end=(CurrentPage*10)-1;
if(end>=Rows)end=Rows-1;
}
if(Rows==0) {
document.getElementById("divGuestList").innerHTML="";
document.getElementById("divPage").innerHTML= "";
document.getElementById("divGuestList").innerHTML= "No GuestList found";
}
if(Rows>0)
{
str+="<tr><td width='100' bgcolor='#e2e2e2' class='tdblackbold'> Name</td><td bgcolor='#e2e2e2' class='tdblackbold'> Age</td><td bgcolor='#e2e2e2' class='tdblackbold'> City</td><td bgcolor='#e2e2e2' class='tdblackbold'> E Mail</td><td bgcolor='#e2e2e2' class='tdblackbold'> Phone</td><td bgcolor='#e2e2e2' class='tdblackbold'> Gender</td><td bgcolor='#e2e2e2' class='tdblackbold'> Date</td><td bgcolor='#e2e2e2' class='tdblackbold'> No of Guests</td><td bgcolor='#e2e2e2' class='tdblackbold'> Guests</td></tr>";
for(j=start;j<=end;j++){
var SD=new Date(ShowTable.Rows[j]["EventDate"].toDateString());
str+="<tr><td bgcolor='#efefef' class='tdblack'> "+fnFindQuotes(ShowTable.Rows[j]["FirstName"])+" " + fnFindQuotes(ShowTable.Rows[j]["LastName"]) +"</td><td bgcolor='#efefef' class='tdblack'> "+ShowTable.Rows[j]["Age"]+"</td><td bgcolor='#efefef' bgcolor='#efefef' class='tdblack'> "+fnFindQuotes(ShowTable.Rows[j]["City"])+"</td><td bgcolor='#efefef' class='tdblack'> "+ShowTable.Rows[j]["EmailId"]+"</td><td bgcolor='#efefef' class='tdblack'> "+ShowTable.Rows[j]["PhoneNumber"]+"</td><td bgcolor='#efefef' class='tdblack'> "+ShowTable.Rows[j]["Gender"]+"</td><td bgcolor='#efefef' class='tdblack'> "+Convert2Date(SD)+"</td><td bgcolor='#efefef' class='tdblack'> "+ShowTable.Rows[j]["NoOfGuest"]+"</td><td bgcolor='#efefef' class='tdblack'> "+fnFindQuotes(ShowTable.Rows[j]["GuestNames"])+"</td></tr>";
}
str+="</table>";
document.getElementById('divGuestList').innerHTML=str;
var pCount=Math.ceil(Rows/10)
var pstr="<table align='center'>"
for(i=1;i<=pCount;i++){
pstr=pstr+"<td><td onclick='javascript:fnPage(this)' id='page' class='tdblackbold'>" + i + "</td>"
}
document.getElementById('divPage').innerHTML= pstr;
}
}
| | | |
<uc1:wuctop id="WucTop1" runat="server">
| |
|
|
| | |
fnLeft();
|
<uc1:wuccountycityname id="WucCountyCityName1" runat="server">
fnMainEventMenu();
if(ListingId>0){
fnListingLogout();
}
| <uc1:wuclistinghomemenu id="Wuclistinghomemenu2" runat="server"> | if(WelcomeUserName!=""){
fnCheckForLogin(fnFindQuotes(' <%=Session["WelcomeUserName"]%>'));
}
| |
|
August & September promotion: List your events for only $1
each!
| | Category
|
| Event | | Event Type | | Recurring | | When | | Location | | Min Age | | Dress Code | | Music Style | | Price | | Web Site | | Description
| |
* FloridaGoneWild.com is not responsible for individual
business events. Please check back the day of the event to ensure that it has
not been canceled or rescheduled. | |
Title *
|
| Venue *
| | Minimum Age *
|
All Ages
16+
18+
21+
| Recurring *
|
Special | Not a Recurring Event | | Weekly |
Select Day
for(i=0;i<=arrDay.length-1;i++)document.write("<option value= " + eval(i+1) +">" + arrDay[i] +"</option>")
| | Monthly |
Select
for(i=0;i<=arrWeek.length-1;i++)document.write("<option value= " + eval(i+1) +">" + arrWeek[i] +"</option>")
|
Select Day
for(i=0;i<=arrMonthlyDay.length-1;i++)document.write("<option value= " +i +">" + arrMonthlyDay[i] +"</option>")
|
| Start Date *
|
Calendar.setup(
{
inputField : "txtEventDate", // ID of the input field
button : "bDate" // ID of the button
}
);
| Closing Date *
|
|
Calendar.setup(
{
inputField : "txtClosingDate", // ID of the input field
button : "bCDate" // ID of the button
}
);
Closing Date
|
Select Day
for(i=0;i<=arrDay.length-1;i++)document.write("<option value= " + eval(i+1) +">" + arrDay[i] +"</option>")
Select Day
for(i=0;i<=arrDay.length-1;i++)document.write("<option value= " + eval(i+1) +">" + arrDay[i] +"</option>")
| Start Time
*
|
document.write("<option value= " + -2 +"> Select</option>")
for(i=1;i<=12;i++)document.write("<option value= " + parseInt(i) +">" +parseInt(i) +"</option>")
:
for(i=0;i<=59;i++){if(i<10)document.write("<option value= 0" + i+ ">0" + i +"</option>");else document.write("<option value= " + i+ ">" + i +"</option>")}
am
pm
| End Time
|
document.write("<option value= " + -2 +">Select</option>")
for(i=1;i<=12;i++)
document.write("<option value= " + parseInt(i) +">" +parseInt(i) +"</option>")
:
for(i=0;i<=59;i++){if(i<10)document.write("<option value= 0" + i+ ">0" + i +"</option>");else document.write("<option value= " + i+ ">" + i +"</option>")}
am
pm
| No of Weeks/Month *
| | End Date *
| |
Credit Card details | |
var CurrentDateDes="";
var CurrentMonthAndYear="";
CurrentDateDes=Wild.AjaxFunctions.getCurrentYear().value;
CurrentMonthAndYear=CurrentDateDes.split(":");
FirstName *
| | LastName *
| | Address *
| | City *
| | State *
| | Zipcode *
| | Card Holder Name *
| | Card Type *
|
Select
Visa
MasterCard
American Express
Discover
| Card Number *
| | Expiration Date *
| Month
for(i=1;i<=12;i++){
document.write("<option value= "+ i +">" + i +"</option>")
}
document.thisForm.DDMonth.selectedIndex=parseInt(CurrentMonthAndYear[1]);
Year
for(i=parseInt(CurrentMonthAndYear[0]);i<=parseInt(CurrentMonthAndYear[0])+20;i++)document.write("<option value= " + i +">" + i +"</option>")
| Security Code[CVV Code] *
| | Cost Per Event *
| | Recurring *
| | Total Cost *
| |
| Event Type
*
|
| Description *
| | Custom Image |
| Optional | Summary | | Dress Code | | Music Style | | Ticket Price | | Website URL | (Ex:http://Sample.com) | All Fields are Mandatory *
| |
|
|
| fnBottom();
|
document.getElementById('opt_WDay').style.display="none"
document.getElementById('opt_Week').style.display="none"
document.getElementById('opt_MDay').style.display="none"
function tbChanged()
{
fnGetEventDate();
dtfrom = new Date(Wild.AjaxFunctions.getCurrentDate().value).toDateString();
if ( dtfrom != "" )
{
Calendar.setup(
{
inputField : "txtEventDate", // ID of the input field
button : "bDate",
dateRange : [dtfrom,"15-Apr-2010"] // ID of the button
}
);
}
}
function fnToSetnull(){
document.getElementById('txtDescription').value="";
document.getElementById('txtTitle').value="";
document.thisForm.opt_Age.value=0;
document.getElementById('tr_EndDate').style.display="none";
document.thisForm.opt_Category.value=0;
//document.thisForm.opt_City.value=0;
document.thisForm.opt_EndHr.value=-2;
document.thisForm.opt_EndMin.selectedIndex=0
document.thisForm.opt_EventType.value=0;
document.thisForm.opt_StartHr.value=-2;
document.thisForm.opt_StartMin.selectedIndex=0
document.thisForm.RecChk.checked=true;
document.getElementById('txtVenue').value="";
document.getElementById('txtEventDate').value="";
document.getElementById('txtSummary').value="";
document.getElementById('txtDressCode').value="";
document.getElementById('txtMusicStyle').value="";
document.getElementById('txtPrice').value="";
document.getElementById('txtURL').value="";
document.getElementById('txtNoofWeekMonth').value="";
document.getElementById('txtEventEndDate').value="";
document.getElementById('txtClosingDate').value="";
document.thisForm.opt_WDay.selectedIndex=0;
document.thisForm.opt_Age.selectedIndex=0;
document.thisForm.btn_Remove.style.display="none"
document.thisForm.opt_MDay.selectedIndex=0;
document.thisForm.opt_Week.selectedIndex=0;
document.thisForm.txt_FirstName.value="";
document.thisForm.txt_LastName.value="";
document.thisForm.txt_Address.value="";
document.thisForm.txt_City.value="";
document.thisForm.txt_State.value="";
document.thisForm.txt_Zipcode.value="";
document.thisForm.txt_CardHolder.value="";
document.thisForm.txt_CardNumber.value=
document.thisForm.txt_SecurityCode.value=
document.thisForm.txtEventCost.value=
document.thisForm.txtRecurringNo.value=
document.thisForm.txtTotalCost.value="";
document.thisForm.DDCardType.selectedIndex=0;
document.thisForm.txtNoofWeekMonth.readOnly=false;
document.getElementById('PaymentDetails').style.display="block";
for(i=0;i<3;i++){
document.thisForm.rdo_Recurring[i].disabled=false
} document.thisForm.opt_ToDay.disabled=false
document.thisForm.opt_WDay.disabled=false
document.thisForm.opt_MDay.disabled=false
document.thisForm.opt_Week.disabled=false
document.thisForm.bDate.disabled=false;
document.thisForm.bCDate.disabled=false;
//document.thisForm.btn_EndDate.disabled=false;
//document.thisForm.chkGuestList.checked=false;
document.getElementById('CustomImage').src='images/na_logo.jpg'
}
document.getElementById('trNoOfWeekMonth').style.display="none";
document.getElementById('trWeeklyClosingDate').style.display ="none";
//document.getElementById('trNoOfWeekMonth').style.display="none";
//--------------------------other Category-------------------
//------------------------Save ------------------
function fnSaveOtherCategory(){
var isValid=false;
var chkDuplicateTable
isValid=fnOtherCategoryValidate();
if(isValid){
if(document.thisForm.hidID.value==0){
DataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventCategories', null , "1=0" ).value;
if ( DataTable.Rows.length == 0 ){
// add new row() to the table
var addRowobj = new Object;
DataTable.addRow( addRowobj );
EditId="0";
chkDuplicateTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventCategories', null , "CategoryName='"+fnSingleQuoteReplace(Trim(document.thisForm.txtEventName.value))+"'").value;
}
}
else{
EditId=document.thisForm.hidID.value;
DataTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventCategories', null , "EventCategoryId="+EditId ).value;
ActionMsg="Updated Successfully";
chkDuplicateTable=Wild.AjaxFunctions.FetchTheDataFromDB('tblEventCategories', 'tblEventCategories1' , "CategoryName='"+ fnSingleQuoteReplace(Trim(document.thisForm.txtEventName.value)) + "' and EventCategoryId<>"+EditId ).value;
}
DataTable.Rows[0]["CategoryName"]=fnSingleQuoteReplace(Trim(document.thisForm.txtEventName.value));
if(chkDuplicateTable.Rows.length==0){
var UpdatedCount=Wild.AjaxFunctions.UpdateTheDataToDB(DataTable,'tblEventCategories','EventCategoryId',EditId).value;
if(UpdatedCount!=null){
document.getElementById('divOtherCategory').style.display="none";
var TypeDataTable=Wild.ManageEvents.FetchTheCategoryData().value;
table2dropdownWithOthers( TypeDataTable, 'EventCategoryId,CategoryName', 'opt_EventType',null , 'EventType',false);
}
}else{
document.thisForm.txtEventName.focus();
alert("EventCategory already exists");
}
}
}
//------------------------validate----------------
function fnOtherCategoryValidate(){
var isValid=false;
isValid=isNull(document.thisForm.txtEventName,"Event Category Name");
if(isValid)isValid=fnChkAlphaAdmin(document.thisForm.txtEventName,"Event Category Name ");
return isValid;
}
function fnChangeCategory(){
if(document.thisForm.opt_EventType.value==-3)
document.getElementById('divOtherCategory').style.display ="block";
else
document.getElementById('divOtherCategory').style.display ="none";
}
fnChangeCategory()
|
<uc1:wuchttpsgoogleanalystics id="WucHttpsGoogleAnalystics1" runat="server">
|
|
|
|
|
Paste the relevant code.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Um, you haven't got a window.onload call in that code.
Try adding an onload event to your body tag:
<body onload="javascript:myFunction();">
cheers
Ben
|
|
|
|
|
Hello,
when i press on some link i received the following error
Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed
i tried to install service pack and this option doesn't fixed the problam.
i working with --Server.CreateObject("IISSample.PermissionChecker")--element
asp 2. (no dot.net)
pls help my
|
|
|
|
|
|
so i can't to solve this problem if i do something in the asp file? (for ex:
write some code with other syntax)?
|
|
|
|
|
No - the code you have is the right code to load a COM object. If the error is that the object is not installed, no change to your code will install it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|