/    Sign up×
Community /Pin to ProfileBookmark

low-level disk calculations problem

I am starting a data recovery business. Now, the key to data recovery is accuracy and speed. The challenge is, being accurate translates (at least by hand) to being slow, and being speedy translates to being less accurate. This risks a person’s data, which i simply can’t afford to do!
SO: to solve the problem, i am making a suite of JavaScript’ed HTML forms to make the complex calculations more accurately for me. Between the soon-to-be suite of JavaScripts, and a good hex editor with disk-open, i can have both the speed AND the accuracy!

Next up: the problem. I am getting an “Object expected” error at line 92.
LINE 92:

[code=php]<input type=button onclick=”dothemath()” value=”Calculate”>[/code]

This is the button to do the calculation. The other form elements are right alongside this button, in a table.

DotheMath():

[code=php]
function DotheMath()
{
//input
with (document.disk)
{
BPB_RootEntCnt = .BPB_RootEntCnt;
BPB_BytsPerSec = .BPB_BytsPerSec;
BPB_FATSz16 = .BPB_FATSz16;
BPB_FATSz32 = .BPB_FATSz32;
BPB_ResvdSecCnt = .BPB_ResvdSecCnt;
BPB_NumFATs = .BPB_NumFats;
}

//process
RootDirSectors = ((BPB_RootEntCnt * 32) + (BPB_BytsPerSec – 1)) / BPB_BytsPerSec;
if (BPB_FATSz16 != 0)
FATSz = BPB_FATSz16;
else
FATSz = BPB_FATSz32;
FirstDataSector = BPB_ResvdSecCnt + (BPB_NumFATs * FATSz) + RootDirSectors;

//output
document.disk.output.value = FirstDataSector;
}
[/code]

I’ll just put my function there, just in case it’s the problem. So, can anyone tell me what’s the problem with line 92? (if you need more info i can provide it, just ask!)

Thanks!
Any and [b]ALL[/b] help is GREATLY appreciated!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Willy_DuittMar 07.2005 — Your function name does not match your function call...

Case is important... [b]Do[/b] is not the same as [b]do[/b]...

.....Willy
Copy linkTweet thisAlerts:
@jakykongauthorMar 09.2005 — SHOOT! so obvious! Man i need to get used to this case sensitivity thing ...

I'm used to a C compiler that is case-insensitive. So i have gotten VERY VERY used to not worrying about case. JavaScript is a LOT different from ANSI C (ISO 1989).

Well, that should solve the problem. Thanks!
Copy linkTweet thisAlerts:
@Willy_DuittMar 09.2005 — Don't you mean VERY very... ?

Cheers and good luck;

.....Willy
×

Success!

Help @jakykong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...