PDA

View Full Version : a couple of DIV questions


liverfarm
03-08-2010, 03:02 AM
Hi,
I'm playing around with some ideas for a clients website and trying to make it as quick as possible to run. The idea is to have a flash banner with a little bit of continuous animation that just keeps playing the whole time while all the text and images appear in an area ive created with DIV tags.

I've built a template and have just realised that everytime a buttons links to a new page, the flash banner is going to reload and start again and not have the continual seemless playback i was hoping for.

This has led me to thinking, maybe there is a way i can have my buttons just reload what info is inside the DIV rather than the whole page. Is this possible? I was thinking maybe using XML and loading a new XML doc with each button, but i dont know how to go about it (still relatively new to the whole coding stuff :P)

Second problem i have is, i was wanting to make the background of my DIV semi transparent while keeping the text at 100% opacity still. I have managed to make the background colour work, but the text changes with it. Any ideas?
Thanks in advance

Ricky55
03-08-2010, 08:54 PM
yes you can do this, just call the loaded content into a frame.

Your opacity can be achieved by either using a transparent png file as a background image in the Div or you could use CSS3 RGBA to specify a colour with a level of alpha. Bear in mind though that RGBA is not supported in IE.

Things don't need to look the same in every browser though.

liverfarm
03-09-2010, 12:23 AM
Hi thanks for the reply,
I just changed it to RGBA and it seems to be working fine now, Damn Explorer making things difficult.

Im still unsure about the calling new content thing. Sorry, i might need this spelled out for me, im still just starting to get my head around the whole coding aspect of webdesign

liverfarm
03-10-2010, 01:14 PM
So i've been looking into this and i think maybe the best way to go is using javascript? I'm trying to learn as much as i can about it, but im still unsure on how to get it working.

I have some rollover image buttons that i want to use to load info into a DIV. This should give the illusion of different pages, even though its really just the one.

How can i do this? I think javascript loading a different XML into the DIV when i click a button sounds right... i just have no idea how to go about it or code it. Any ideas guys?
Thanks

gentleone
03-11-2010, 11:31 PM
I have some rollover image buttons that i want to use to load info into a DIV. This should give the illusion of different pages, even though its really just the one.

AJAX (Asynchronous Javascript And XML) is indeed what your looking for, but it has also its downsides.

DWcourse
03-11-2010, 11:48 PM
Why the illusion of different pages? Why not just different pages?

liverfarm
03-12-2010, 12:49 AM
AJAX? ill have to look into it, ive never heard of it before.

I want the illusion of different pages because im going to have an animated flash banner at the top of the page, and everytime i go to a new page, i dont want the banner to have to reload or start the animation again