Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-01-2009, 08:17 AM   PM User | #1
yasirjamal
New Coder

 
Join Date: Feb 2009
Posts: 25
Thanks: 2
Thanked 0 Times in 0 Posts
yasirjamal has a little shameless behaviour in the past
Div image container

Dear Friends,

I am making a website. In the right side of my page there are buttons and website is not in english language or not compataible for dreamweaver. I have to convert the text to gif images. I want when i click to a button the came in div container. Actullay I succes to do this when i am clicking the image is coming on div but i have these following problems.

1: I have set div on my page. When i am clicking on a button div is moving without overflow in preveiw mode. My div is absoulte.

2: When i clicking in a button the image in coming but when i click the next button the next image is coming on the bottom side of the first image. Which i dont want. I want when i click the button only that image came on div. Each button have a image.

Thank You
Waiting for your replies
yasirjamal is offline   Reply With Quote
Old 03-01-2009, 08:59 AM   PM User | #2
Actinia
Regular Coder

 
Actinia's Avatar
 
Join Date: Feb 2007
Location: Essex, UK
Posts: 250
Thanks: 1
Thanked 23 Times in 22 Posts
Actinia is on a distinguished road
Firstly, it would help if we could see your code. Either post a link to your code on a server, or include your code in your message, using the CODE tags (use the '#' icon on the message editor).

I would guess that what you need to do is to set the display of your images. For each image that you wish to display, set the style.display to "block". When you want to display another image, set the style.display of the original image to "none".

What I would do is to include all images within your DIV, with the default style.display of each set to "none". Then, each button would activate one image, setting the display.style to "block". You will need to keep tabs on any previous image, setting its display.style to "none".

An alternative (but less efficient) way would be for each button to set the innerHTML property of the DIV with the desired image.

John
Actinia is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 11:51 AM.


Advertisement
Log in to turn off these ads.