PDA

View Full Version : Need Help!



kingnoob
01-27-2007, 10:00 AM
OK. May I just ask if you know Prototype v2.0 and Scriptaculous Effect Engine?

If not, please do not continue reading the post, because the rest of the question is regarding these two engines.

Because after putting this:

...
<script>
function bbStylemd() {
new Effect.SwitchOff($('style1'));
new Effect.BlindDown('nextstyle');
new Effect.SlideUp('nextstyle2',{ delay: 10});
in my script, and defined that my div is for the whole page:


<body onload="someFunction1();someFunction2()" ...>
<div id="bbStylebody">...
<table....>
...</table>
</div>
<div id="nextstyle">
...
...
</div></body>


and I have this:
Line: (the body tag)
Error: Object Expected

When I had defined everything. all including someFunction1() and someFunction2() on the page.

Please assist me in the problem of the Object Expected thing. After adding something, it returned an error.

Thanks in advance!

jscheuer1
01-27-2007, 11:32 AM
At the very least, this needs to be closed:


<script>
function bbStylemd() {
new Effect.SwitchOff($('style1'));
new Effect.BlindDown('nextstyle');
new Effect.SlideUp('nextstyle2',{ delay: 10});
}

The script tag should have a type attribute and if it isn't a part of a script block that is already closed, it also needs to be closed:


<script type="text/javascript">
function bbStylemd() {
new Effect.SwitchOff($('style1'));
new Effect.BlindDown('nextstyle');
new Effect.SlideUp('nextstyle2',{ delay: 10});
}
</script>