|
|
 |
Re: FN-FORUM: Javascript problem (another one!)
date posted 8th August 2003 16:07
Thanks very much Luke, I'm not sure how clear it is yet, but I'll give it a
go.... basically to describe what you would have seen....
I have a div on the left hand side of the page which contains a list of
links - linking to text telling people what they need to know to do an
online (French) course. The idea is that when the link is clicked the text
appears in the div specially made for it on the right hand side of the
screen - so the info is available if it's needed and there's no large scroll
required...
So I shall attach the code to the things I have and see what happens!
Thanks very much, again for the help, it's driving me nuts!
Nita
;o)
----- Original Message -----
From: "Luke Perman" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, August 08, 2003 2:30 PM
Subject: Re: FN-FORUM: Javascript problem (another one!)
>
> hi nita,
>
> yea, i'm not sure what the problem is -- i have the same trouble with
> my new re-designed website - i've converted the whole site to be CSS
> driven and now it freezes up in IE on the mac! everything works fine
> in Windoze though -- so i'm gonna have to do some figuring out on the
> mac side..
>
>
> here's a really simple piece of javascript for swapping the visibility
> of a DIV:
>
>
> function swapIn(thisone) {
> theLayer=thisone+"layer";
> document.all[theLayer].style.visibility = 'visible';
> }
>
> function swapOut(thisone) {
> theLayer=thisone+"layer";
> document.all[theLayer].style.visibility = 'hidden';
> }
>
>
>
> #biglayer { visibility: hidden; }
>
>
>
> and in the BODY, the DIV needs to be named 'whateverlayer', then
> simply add the onClick or onMouseover property to your link that causes
> the action:
>
> la la la la la
>
>
>
>
> you may have to do some fiddling with the 'position' and 'display'
> attributes in your CSS to get the DIV to behave as you want it to...
>
> the reason i create the variable "theLayer" inside the function is that
> i usually have an image change associated with the layer swap also, and
> so the functions 'swapIn' and 'swapOut' will have the extra line:
>
> document.images[thisone].src = myImages[3].src;
>
> to handle that action in the same breath, having the image named the
> same as the layer (minus the 'layer' suffix of course...)
>
>
> er, i hope that's all clear hehe
> luke
>
>
> On Friday, August 8, 2003, at 02:10 PM, Nita wrote:
>
> > Thanks Luke, that's great, I was considering using the visibilty of the
> > layers as my next option.... I shall use this instead... I'd be really
> > grateful for code snippets, thanks very much!
> >
> > Sorry about the crashing! Is there any known reason why it might do
> > that?
> > I've had a similar problem with another page I made using stylesheets
> > which
> > crashed a friends Mac...
>
>
> ==========
> fido.net are pleased to sponsor these Freelancers messages. For all
> your web hosting needs check out http://www.fido.net/ with hosting
> packages starting from just £46.95 a year including VAT.
> Free 0871 Fax2Email numbers also available online!
> http://www.fido.net/ - the internet made simple! - 0800 1072 666
>
> To advertise here: http://www.freelancers.net/advertising.html
>
> |
 |
|