page design – layers/frames/javascript?

Hello everybody,

I’m trying to design a site which includes an area in the middle that changes when you click on the buttons around this. That probably won’t make sense therefore see here — http: //home. iprimus. com. au/jediwdog/stephens. htm – with the work in progress (I’ve fixed this green lines incidentally so ignore those)…

The area of which says ‘blah blah blah’ needs to change when I mouse click on the ‘Dealers’ or ‘Contact’ buttons and potentially will likely need to have a scroll bar. I’ve seen web pages that achieve that (eg. http: //www. urthboy. com in addition to http: //www. elefanttraks. com/) but WE haven’t been able to figure out how.

I pondered using layers as well as making one visible as the other is invisible, for example. but a) I never established how to do it and b) WHEN I realised that whenever they didn’t have their window maximised on the screen then the text would show up somewhere different.

Someone pointed me into a javascript example (http: //www. alistapart. com/d/eatcake/final. html) but I don’t know anything about javascript in addition to I wasn’t sure if this can achieve exactly what I had been looking for.

I also pondered frames but that may be extremely limiting so I became going to stay away out of that.

Can anyone help me whatsoever There must be a way!

Thanks earlier!
Neil (the HACK-designer)

The primary of those a couple uses a div together with overflow: auto; within its definition. This means that you size (and, normally, position) your div absolutely and also the overflow command generally says " if the text doesn’t easily fit in here then remain a scrollbar in"…

Cost-free uses frames.

If you watch the source code for any two pages you will be able to figure out exactly how they work.

Sean

Another way will be to give the div which has the blah wording a id like as

Code:
< div align=" center" id=" texttochange" > blah blah blah... < /div>

Then, to the buttons that alter the text when clicked you’d probably add the onClick event and create a JavaScript function that passes within a integer argument.

You can then use that number to pull range value, and established the divs content material by going

Code:
insurance. getElementById(" texttochange" ). innerHTML = contentnum;

If you have to have further help or perhaps want a demo of why I will write the script in your case.

But all you’ve got to do will be
ANY: create a javascript array considering the different text for each button (dealers, speak to etc)

B: For each image, add a onClick function that calls any javascript function which has a number as it has the argument

C: Use the presented number to acquire the arrays benefit at that job and use getElementById(" div_id_name" ). innerHTML = arraynamenumber;

Thanks to both of you for your support!

seanmiller: I wish I could figure them out from looking at your code! I can’t even find out how the www. urthboy. com page creates the layer remain in the same position once the IE window is resized. If you examine http: //home. iprimus. com. au/jediwdog/stephens. htm (I’ve up-to-date the page) once more and resize your IE window, you’ll note that the text most of moves… I’ve tried to copy everything within the div label too. Or is the fact that why they get another div in the div

bfsog: If I’m confused with the above then I’m hella-confused considering the javascript stuff! Remorseful! I don’t find out where to even beging with putting javascript within my page. Any help you can give me would be greatly appreciated! Because I said above, I’ve updated the page so it has the three layers i always want to swap between areas up (except for their exact position ‘cos I couldn’t figure out how to keep it there).

THANKYOU THANKYOU THANKYOU!!
Neil.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *