User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,616 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,194 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Toggle div visibility

Join Date: Oct 2007
Posts: 6
Reputation: buggsword is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
buggsword buggsword is offline Offline
Newbie Poster

Toggle div visibility

  #1  
Oct 7th, 2007
Hello,
I am new to javascript and am aware that this topic is well documented, but not in the way I need the script to work?

I am able to show/ hide a div using the the following:

function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
}
return true;
}

With a link using:
<a href="#" onClick="return toggleMe('flashOverlay')">Info</a>

The problem I have is that I need to toggle this script with a link in Flash MX, which will not allow me to use "onClick=". Is it possible to have the div show/hide via <a href></a> only?

Thanks in advance
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 9:05 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC