Connecting Tech Pros Worldwide Help | Site Map

Annoting problem with script

Benton
Guest
 
Posts: n/a
#1: Mar 7 '06
Hi there,

I'm following the instructions to use NiftyCorners, a javascript library.
Following the examples, I've set up a first try. But I got a javascript
error 'object was expected'. Please see the offending line below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title>
<link type="text/css" rel="stylesheet" href="mystyles.css" />
<link rel="stylesheet" type="text/css" href="niftyCorners.css" />
<link rel="stylesheet" type="text/css" href="niftyPrint.css" media="print"
/>
<script type="text/javascript" src="nifty.js"></script>
<script type="text/javascript">
window.onload=function(){
if(!NiftyCheck()) // <=== Error here ====
return;
Rounded("div.PrinIzq","all","#FFF","#D4DDFF","smoo th");
}
</script>

</head>
<body>
<table>
<tr>
<td style="width: 100px">
<div id="Panel1" class="PrinIzq">

Error is always on the first line of the function, no matter if I move the
script which contains it out of the head section. Inspecting the NiftyCode
samples I see no difference, I'm doing just what they say and their samples
work, so I am puzzled. I have the "nifty.js" file and all the css files on
the same folder as the HTML page.

I appreciate any clues.

Regards,

-Benton


Janwillem Borleffs
Guest
 
Posts: n/a
#2: Mar 7 '06

re: Annoting problem with script


Benton wrote:[color=blue]
> if(!NiftyCheck()) // <=== Error here ====
>[/color]

if (!NiftyCheck()) { // <=== Error Gone ====


JW


Janwillem Borleffs
Guest
 
Posts: n/a
#3: Mar 7 '06

re: Annoting problem with script


Janwillem Borleffs wrote:[color=blue]
> if (!NiftyCheck()) { // <=== Error Gone ====
>[/color]

Sorry, judged too soon; Try the javascript console (Extra -> JavaScript
Console) of FireFox for debugging.


JW


Benton
Guest
 
Posts: n/a
#4: Mar 7 '06

re: Annoting problem with script


> Janwillem Borleffs wrote:[color=blue][color=green]
>> if (!NiftyCheck()) { // <=== Error Gone ====
>>[/color]
>
> Sorry, judged too soon; Try the javascript console (Extra -> JavaScript
> Console) of FireFox for debugging.
>[/color]
Thanks, I've found the solution. Somehow source code of the nifty.js file
was corrupted. I replaced the file and problem went away.

Regards,

-Benton


Closed Thread