|
-
Oct 10th, 2002, 11:53 AM
#1
Thread Starter
Frenzied Member
(Javascript) I am getting an "Object Expected" error when my object is there...
My onBlur is not going to the function and is acting like it is not available...
the caller
Code:
<div id="BookingFeeF" align="left"><input name="BookingFee" onBlur="alert('***');updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
the callee
Code:
function updateDatabase(){
alert('gh');
var args;
args = saveForm("Admin");
window.open('hotel_modify.asp?' + args, 'DoStealth');
}
I get the first alert but not the second... What is going on here bob?
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 12:58 PM
#2
Code:
args = saveForm("Admin");
Is the saveForm one there?
-
Oct 10th, 2002, 01:05 PM
#3
Thread Starter
Frenzied Member
yeah... but wouldent that 'gh' alert fire either way?
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:07 PM
#4
Thread Starter
Frenzied Member
I took everything out of the update function (except for the alert) and it still dosent get there.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:12 PM
#5
yeah thats true, don't you love it when everything looks
alright but stil won't work
the only other suggestion is to reduce to updateDatabase function to just the alert and maybe stick a semi-colon after function call *clutching at straws*
If the function doesn't work with just the alert in it, then
at least you've ruled out the functio as being the problem
not much help but there you go
-
Oct 10th, 2002, 01:15 PM
#6
Thread Starter
Frenzied Member
Originally posted by DeadEyes
the only other suggestion is to reduce to updateDatabase function to just the alert
see post above yours 
this one is driving me bonkers.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:15 PM
#7
hmm I was too slow with that idea.
could the first alert be messing up the blur event?
-
Oct 10th, 2002, 01:17 PM
#8
Thread Starter
Frenzied Member
i think so but i was getting the error before i added it, and have taken it out again... also tried the ; (also clutching straws )after the function call and still dosent work.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:20 PM
#9
Thread Starter
Frenzied Member
here is the whole page (once it gets to the user (it is an asp page))
Code:
<HTML>
<HEAD>
<TITLE>Taxes & Charges</TITLE>
<STYLE TYPE="text/css">
<!--
BODY { font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt;}
INPUT { color: Black; font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt;}
SELECT { color: Black; font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt;}
OPTION { color: Black; font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt;}
#LabelHolder1 { position:absolute; top:010px; left:10px; height:175px; width:114px; background-color: #999999; }
#CommissionRateL{ position:absolute; top:010px; width:105px; text-align:right; }
#Commission_Vs_NetL{ position:absolute; top:34px; width:105px; text-align:right; }
#IsLiveL { position:absolute; top:058px; width:105px; text-align:right; }
#EditInitialsL { position:absolute; top:082px; width:105px; text-align:right; }
#LastEditTSL { position:absolute; top:106px; width:105px; text-align:right; }
#CategoryL { position:absolute; top:130px; width:105px; text-align:right; }
#WebHotelIDL { position:absolute; top:154px; width:105px; text-align:right; }
#FieldHolder1 { position:absolute; top:10px; left:124px; height:175px; width:159px; background-color: #ffffff;}
#CommissionRateF{ position:absolute; top:005px; left:3px; }
#Commission_Vs_NetF{ position:absolute; top:29px; left:3px; }
#IsLiveF { position:absolute; top:053px; left:3px; }
#EditInitialsF { position:absolute; top:077px; left:3px; }
#LastEditTSF { position:absolute; top:101px; left:3px; }
#CategoryF { position:absolute; top:125px; left:3px; }
#WebHotelIDF { position:absolute; top:149px; left:3px; }
#LabelHolder2 { position:absolute; top:10px; left:294px; height:175px; width:145px; background-color: #999999;}
#SCHorLXRL { position:absolute; top:010px; width:135px; text-align:right; }
#FinalPaymentDueDaysL{ position:absolute; top:34px; width:135px; text-align:right; }
#BookingFeeL { position:absolute; top:058px; width:135px; text-align:right; }
#BookingFeesL { position:absolute; top:082px; width:135px; text-align:right; }
#SystemFeeL { position:absolute; top:106px; width:135px; text-align:right; }
#MinimumReservationFeeL { position:absolute; top:130px; width:135px; text-align:right; }
#FieldHolder2 { position:absolute; top:10px; left:439px; height:175px; width:159px; background-color: #ffffff;}
#SCHorLXRF { position:absolute; top:005px; left:3px; }
#FinalPaymentDueDaysF{ position:absolute; top:29px; left:3px; }
#BookingFeeF { position:absolute; top:053px; left:3px; }
#BookingFeesF { position:absolute; top:077px; left:3px; }
#SystemFeeF { position:absolute; top:101px; left:3px; }
#MinimumReservationFeeF { position:absolute; top:125px; left:3px; }
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
function stopErrors() {
return true;
}
window.onerror = stopErrors;
function updateDatabase(){
alert('gh');
// var args;
// args = saveForm("Admin");
// window.open('hotel_modify.asp?' + args, 'DoStealth');
}
function saveForm(formName) {
var formObj = eval('document.forms.' + formName);
var args = ";
var separator = ";
with (formObj) {
for (i=0;i<length;i++) {
theName = elements[i].id;
strValue = ConvertReturns(elements[i].value);
theValue = escape(strValue);
if (elements[i].checked){
theValue = "Y";
}
args += separator + theName + "=" + theValue;
separator = "&";
}
}
return args;
}
function ConvertReturns(input) {
var output = ";
for (var i = 0; i < input.length; i++) {
if ((input.charCodeAt(i) == 13) && (input.charCodeAt(i + 1) == 10)) {
i++;
output += "
";
} else {
output += input.charAt(i);
}
}
return output;
}
</SCRIPT>
</head>
<body bgcolor="#cccccc">
<form name="Admin">
<div id="LabelHolder1">
<span id="CommissionRateL">Commission Rate:</span>
<span id="Commission_Vs_NetL">Commission vs Net:</span>
<span id="IsLiveL">Is Live:</span>
<span id="EditInitialsL">Edit Initials:</span>
<span id="LastEditTSL">Last Edit TS:</span>
<span id="CategoryL">Category:</span>
<span id="WebHotelIDL">Web Hotel ID:</span>
</div>
<div id="FieldHolder1">
<div id="CommissionRateF" align="left"><input name="CommissionRate" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value="0"></div>
<div id="Commission_Vs_NetF" align="left">
<select name="commission_vs_net" onChange="updateDatabase()" style="WIDTH: 152px;">
<option value=""></option>
<option value="c">Commission</option><option value="n">Net</option>
</select>
</div>
<div id="IsLiveF" align="left">
<select name="islive" onChange="updateDatabase()" style="WIDTH: 152px;">
<option value=""></option>
<option value="y">Yes</option><option value="n">No</option>
</select>
</div>
<div id="EditInitialsF" align="left"><input name="EditInitials" SIZE=27 Style="width:151px;" Value="ds"></div>
<div id="LastEditTSF" align="left"><input name="LastEditTS" SIZE=27 Style="width:151px;" Value="10/8/2002 11:15:05 AM"></div>
<div id="CategoryF" align="left"><input name="Category" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
<div id="WebHotelIDF" align="left"><input name="WebHotelID" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value="0"></div>
</div>
<div id="LabelHolder2">
<span id="SCHorLXRL">SCH or LXR:</span>
<span id="FinalPaymentDueDaysL">Final Payment Due Days:</span>
<span id="BookingFeeL">Booking Fee %:</span>
<span id="BookingFeesL">Booking Fees:</span>
<span id="SystemFeeL">System Fee:</span>
<span id="MinimumReservationFeeL">Minimum Reservation Fee:</span>
</div>
<div id="FieldHolder2">
<div id="SCHorLXRF">
<select name="SchLxr" onChange="updateDatabase()" style="WIDTH: 152px;">
<option value=""></option>
<option value="sch">SCH</option><option value="lxr">LXR</option>
</select>
</div>
<div id="FinalPaymentDueDaysF" align="left"><input name="FinalPaymentDueDays" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
<div id="BookingFeeF" align="left"><input name="BookingFee" onBlur="updateDatabase();" SIZE=27 Style="width:151px;" Value=""></div>
<div id="BookingFeesF" align="left"><input name="BookingFees" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
<div id="SystemFeeF" align="left"><input name="SystemFee" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
<div id="MinimumReservationFeeF" align="left"><input name="MinimumReservationFee" onBlur="updateDatabase()" SIZE=27 Style="width:151px;" Value=""></div>
</div>
</form>
</body>
</html>
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:23 PM
#10
should the input have a type? like text or somthing
-
Oct 10th, 2002, 01:24 PM
#11
Thread Starter
Frenzied Member
I GOT IT!!!! There is a few places I only had one " (i probably did a search and repace for "" to change to " (for a block of asp code) and had the scope too large.
Thanks for the help!
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:24 PM
#12
Thread Starter
Frenzied Member
Originally posted by DeadEyes
should the input have a type? like text or somthing
Its good practice to but w/o it the default is text
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 10th, 2002, 01:27 PM
#13
well you learn somthing new every day 
I'm always messin up find and replaces as well
now you can relax and have a drink
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|