Hi. I'm trying to apply a fade effect with the following code, but I
keep getting the error in the subject line. Help is appreciated.
Thanks!
Here's the code:
[CODE]
<script type="text/javascript" src="~/scriptaculous/lib/
prototype.js"></script>
<script type="text/javascript" src="~/scriptaculous/src/effects.js"></
script>
<script type="text/javascript">
var mainImgNum = 1;
function rotateDisplay()
{
if(mainImgNum == 1)
{
mainImgNum = 2;
}
else if(mainImgNum == 2)
{
mainImgNum = 3;
}
else
{
mainImgNum = 1;
}
new Effect.Fade('col', { queue: { position:'end', scope:'fader'},
afterFinish: function()
{
$('col').src = 'images/billboard_'+mainImgNum+'.gif';
Element.removeClassName('btn1','btnBottomCMS');
Element.removeClassName('btn2','btnBottomCMS');
Element.removeClassName('btn3','btnBottomCMS');
new Effect.Appear('col', {queue: {position:
'end',scope:'fader'} });
Element.addClassName('btn'+mainImgNum,'btnBottomCMS_active');
}});
}
function showGraph()
{
var val = Math.floor(Math.random()*3);
if(val == 0)
{
document.write("<h3 class=\"network_reach\"><span>Network Reach</
span></h3> <div><img src=\"images/nr_graph.png\" /></div> <p>We
have maintained the largest online reach for 31 consecutive months -
currently reaching over <strong>85% of the Internet universe</strong>,
according to comScore Media Metrix, December 2006.</p>");
}
else if(val == 2)
{
document.write("<h3 class=\"top_advertisers\"><span>Top
Advertisers</span></h3> <div><img src=\"images/nr_graph.png\" /></
div> <p>We have worked with <br/><strong>9 out of the top 10</strong>
online advertisers, according to Ad Age.</p>");
}
else
{
document.write("<h3 class=\"top_agencies\"><span>Top Agencies</
span></h3> <div><img src=\"images/nr_graph.png\" /></div> <p>We
have worked with <br/><strong>16 out of the top 20 agencies</strong>,
according to Ad Age.</p>");
}
}
onload = function()
{
//externalLinks();
var interval_name = setInterval(rotateDisplay, 6000);
}
</script>
<div id="home">
<div class="left_col">
<div class="col">
<asp:LinkButton id="btn1" PostBackUrl="~/LearnMore.aspx?
section=goverview" text="<%$ Resources:DefaultMasterResources,
GuaranteedCPMsHeader %>"
CssClass="btnBottomCMS" Width="180px" runat="server" Font-
Size="smaller" />
<p><asp:Label ID="lblGuaranteed" Text="<%$
Resources:DefaultMasterResources, GuaranteedCPMs %>" runat="server" /
></p>
</div>
<div class="col">
<asp:LinkButton id="btn2" PostBackUrl="~/LearnMore.aspx?
section=invcontrol" text="<%$ Resources:DefaultMasterResources,
InventoryControlHeader %>"
CssClass="btnBottomCMS" Width="180px" runat="server" Font-
Size="smaller" />
<p><asp:Label ID="lblInventory" Text="<%$
Resources:DefaultMasterResources, InventoryControl %>" runat="server" /
></p>
</div>
<div class="col last_col">
<asp:LinkButton id="btn3" PostBackUrl="~/LearnMore.aspx?
section=qadv" text="<%$ Resources:DefaultMasterResources,
QualityAdvertisersHeader %>"
CssClass="btnBottomCMS" Width="180px" runat="server" Font-
Size="smaller" />
<p><asp:Label ID="lblQuality" Text="<%$
Resources:DefaultMasterResources, QualityAdvertisers %>"
runat="server" /></p>
</div>
</div>
<div class="right_col">
<script type="text/javascript">showGraph();</script>
</div>
</div>
[/CODE]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---