hello, i think the real problem is this
function toggle(div,olddiv)
{
if(div != olddiv)
{
document.getElementById(olddiv).style.display = '''';
document.getElementById(div).style.display = ''block'';
}
else
{
document.getElementById(div).style.display = ''block'';
}
for(var i = 1;i < this.count;i++)
{
var span = document.getElementById("TabSpan" + i);
span.className = ''passiveTab'';
span.onmouseover = new Function("myTabs.m_over("+i+")");
span.onmouseout = new Function("myTabs.m_out("+i+")");
span.onclick = new Function("myTabs.makeActive("+i+")");
}
}
This row
span.onmouseover = new Function("myTabs.m_over("+i+")");
i think i cant access the myTabs inside the class function. But,, why?
Thats works fine on another page
> i have written a own tab class and tested it on another webseite
> successfuly but now i try to use it on another page and always get some
> errors. this is the class call
>
> <script language="JavaScript"
type="text/JavaScript">
> var card = ''CardDiv1'';
> var tabs = new TabCard(5,card);
> tabs.makeActive(5);
> loadAllTabs();
> </script>
>
> when i now call it like this
>
> <span class="passiveTab" ID="TabSpan1"
onClick="tabs.makeActive(1);"
> onMouseOver="tabs.m_over(1)"
onMouseOut="tabs.m_out(1)">
>
> i get always errors like this
>
> Error: tabs is not defined
>
>
> whats wrong?
>
>
> ____________
> Virus checked by G DATA AntiVirusKit
> Version: AVK 17.7690 from 13.09.2007
> Virus news: www.antiviruslab.com
>
>
>
> >
____________
Virus checked by G DATA AntiVirusKit
Version: AVK 17.7691 from 13.09.2007
Virus news: www.antiviruslab.com
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---