Lawrence Krubner
2006-May-26 20:44 UTC
I can not get any scriptaculous effects to finish with items visible
I''m sorry I can''t seem to get any of the scriptaculous
effects to work correctly. I''ve searched on the web
forum but found nothing relevant. The only time I get
an HTML element to fade or shrink gracefully is when I
use them as inline handlers and feed them ''this''
instead of the HTML element id. But I can not get
anything to appear. Things disappear but Appear and
Grow and all the other effects that might establish
visibility fail to work. This especially true of
elements where an external style sheet gives them an
initial value of display:none, and this remains true
even if I try to use Javascript to set the display
value before calling a Scriptaculous effect.
Using FireFox 1.5 I never get any Javascript errors in
the Javascript console, but instead, things just don''t
work - things disappear but do not reappear.
This causes the div to disappear but not reaapear:
<div style="display:block;" id="newMailList"
onclick=" Effect.Fade(''newMailList'');
Effect.Appear(''newMailList''); ">
<form method="post"
action="/media/audio/mcControlPanel.php"
id="createnewlist">
<h3>Name this list: </h3>
<input type="text" name="newsletterName"
class="white" />
<h3>Pick the emails for this list (<a
href="javascript:;"
onClick="checkAllCheckBoxInputs(''createnewlist'');">Check/Uncheck</a>):</h3>
<?php showAllEmailAddressesForSending(); ?>
<br />
<h3>Or add emails manually:</h3>
<textarea cols="100%" rows="5"
id="manualEmail"
name="manualEmail"></textarea>
<br />
<input type="submit" value="Save List"
class="button" />
<input type="hidden" name="choiceMade"
value="makeNewMailList" />
<input type="hidden" name="arrangement"
value="sendEmail" />
</form>
</div>
and here I was hoping to use Simon Willison''s addLoad
function to hand the command a reference instead of
the id, since that seems to work better, but this did
not work:
addLoadEvent(function() {
if(document.getElementById &&
document.getElementById("linkForNewMailList")){
var clickableItemThatWillTriggerChange
document.getElementById("linkForNewMailList");
var blockElementThatShouldBeEffected
document.getElementById("newMailList");
clickableItemThatWillTriggerChange.onclick function (){
blockElementThatShouldBeEffected.style.display "none";
new
Effect.SlideDown(blockElementThatShouldBeEffected);
blockElementThatShouldBeEffected.style.display "none";
return false;
}
}
});
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com