Forum Moderators: phranque

Message Too Old, No Replies

expand button

i need an expand section button

         

laurasamps

4:15 pm on Jun 18, 2010 (gmt 0)

10+ Year Member



hi, i think i am in the right place, apologies if not.

i am building a flash site for the first time, and i am using a template. i have an FAQ section and i want only the questions to appear on first viewing, with each one clickable to show the answer.

if this was in dreamweaver i'd find it easy, but flash is a whole new thing to me and i havent got a clue! any advise greatly appreciated!

thanks

MichaelBluejay

6:14 pm on Jun 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, my first advice is to ditch Flash. Flash generally adds no value and only annoys your visitors. Google "flash sucks" and you'll see what I mean. I back out of Flash sites as soon as I stumble upon them.

Next, if I understand you correctly, you can show the FAQ answers on demand like so. This has nothing to do with Flash, by the way.


<style type=text/css>
.answer {display:none}
</style>

<script type=text/javascript>
function show(whatToShow) {
document.getElementById(whatToShow).style.display='block';
}
</script>

<p><a href=q1.htm onclick="show('a1')">Why is a hamster when it spins?</a>
<p class=answer id=a1>The higher, the fewer.

<p><a href=q2.htm onclick="show('a2')">What's the difference between a duck?</a>
<p class=answer id=a2>One leg is both the same.

laurasamps

6:40 pm on Jun 20, 2010 (gmt 0)

10+ Year Member



its not my choice to use flash, trust me, i hate it, but my boss wants it, so i'll have to stcik at it. so is this code still able to apply to flash? where do i save it etc?

MichaelBluejay

10:30 am on Jun 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You put the code where you want the FAQ to appear. The code has nothing to do with Flash. It's standard HTML/CSS/JavaScript which should work on any page whether Flash is used or not.

There's a possibility that your Flash template is set up to override anything you try to add to the page (or push it way down the page), in which case it's likely that no one can help you unless they can actually see your template and the code, (and even then it likely wouldn't be an easy fix), which would mean that you can't get help on WebmasterWorld, since you can't post url's here. Here's yet another reason where Flash can make things unnecessarily difficult.

If you don't know how to add code to a file, then you can't do this on your own. Being a webmaster requires being able to figure out something that basic on your own.