logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-22-2006, 02:49 PM   #1
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default Hard to topic please take a look

I Know I'm getting a lot of time today but I do appreciate it. I just find that I have loads of questions but I am learning loads from you guys.

Again, with reference to the site I'm working on

http://www.spenvalleykitchens.co.uk/worktops_30mm.html

You know how I'm using swap image behavior to swap images is it possible to have one of these buttons display text once clicked on. I know I could just make this an image but is there another way? or what is the best way? I don't really want to make the text an image. Could I make the button open a separate web page into this table cell? like an iframe or something??

Any suggestions very welcome.
Ricky55 is offline   Reply With Quote
Old 02-22-2006, 03:29 PM   #2
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

set a div with an id where you want the text to appear

Code:
<div id="texter"></div>
now write a little function...

Code:
function txt(t){

d = document.getElementById('texter');

       switch(t){
       case '1': d.innerHTML = "***********"; break; // for button 1
       case '2': d.innerHTML = "***********"; break; // for button 2
       case '3': d.innerHTML = "***********"; break; // for button 3

       }

}
in the function i have *******. You need to insert your text in there which will display when each button is clicked

now on every button you have an onClick which will look somthing like..

Code:
onClick="MM_swap()"
// this fires your image function

where you have your onclick add...

Code:
onClick="MM_swap();txt('1')"
//notice i have added that function call txt() plus an argument of 1 you will need to add that function to every button but change the argument to 2 and then 3 , 4, 5 etc depending on how many buttons you have

if you have 5 buttons then you will need 5 case's in the function
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 02-22-2006, 03:50 PM   #3
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

But honestly ricky, why don't you just open a new page?
The web is made out of pages, not sites. Then people can bookmark your seperate pages, it can be found in search engines, they can be linked to etc. Plus the fact that people expect links to open new pages.
domedia is offline   Reply With Quote
Old 02-22-2006, 04:08 PM   #4
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

I think it will use the new page method as I only partly understand the first method. I wish I knew more about coding.

What code is that, is that java or just html?

Its actually just the first button that needs to load text so what would I do just make the first button load a new page based upon the orginal?

Thanks again

ricky
Ricky55 is offline   Reply With Quote
Old 02-22-2006, 04:53 PM   #5
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

domedia how do you mean open a new page could you just explain how this would work, bear in mind that its onlt the first button that would open text rather than the image and its the first button that would require text.

http://www.spenvalleykitchens.co.uk/worktops_30mm.html

so on this example the terracotta button would open some text rather than an image, I want the text to appear just where the image is at the moment.
Ricky55 is offline   Reply With Quote
Old 02-22-2006, 05:31 PM   #6
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Create a regular link
Code:
<a href="file.html>Link</a>
and let it go to a new page with the page the way you want it to look, with the terracotta text.
domedia is offline   Reply With Quote
Old 02-22-2006, 08:55 PM   #7
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

Ok yes that would work but what would happen when one of the other buttons was clicked?? Would this jump back to the original page? I just don't quite know what you mean.

Sorry if i'm being a bit thick..

cheers

ricky55
Ricky55 is offline   Reply With Quote
Old 02-22-2006, 09:04 PM   #8
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

You would make one page for each page you want. heh sounds kinda weird doesn't it?

Then make sure all your links would go to the appropiate page.
Anyone else try to explain the basics of linking to different pages on your site?
domedia is offline   Reply With Quote
Old 02-22-2006, 09:14 PM   #9
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

sorry mate I thought you meant this but this would be a bit of a ball ache.

Just been messing with layers and the show / hide behaviour this appears to do what I want.

What do you think of layers are they ok to use?? whats browser support like for them?

Thanks for all your help

Ricky55

The other way would of course just be to have the text typed out and saved as an image....
Ricky55 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com