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

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 12-20-2012, 08:29 AM   PM User | #1
Darren_RSA
New Coder

 
Join Date: Sep 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Darren_RSA is an unknown quantity at this point
Changing label's text with next and previous buttons

Hi,

I have a label that needs to change its text each time a 'next' or 'previous' button is clicked.

Basically I want to use it as a caption for several images, any help?
Darren_RSA is offline   Reply With Quote
Old 12-20-2012, 09:11 AM   PM User | #2
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
Of course you need to attach a click event to the buttons which will change the <label> contents every time the button is clicked.

You should provide the code you have already so that we can help you.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Old 12-20-2012, 09:28 AM   PM User | #3
Darren_RSA
New Coder

 
Join Date: Sep 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Darren_RSA is an unknown quantity at this point
This is the code I currently have:

Code:
	<div id = "carousel1" style="width:960px; height:280px;background:none;overflow:scroll; margin-top: 20px">            
        
	<!-- All images with class of "cloudcarousel" will be turned into carousel items -->
        <!-- You can place links around these images -->
        <a href="1.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/01.jpg" alt=""/></a>
        <a href="2.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/02.jpg" alt=""/></a>
        <a href="3.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/03.jpg" alt=""/></a>
        <a href="4.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/04.jpg" alt=""/></a>
        <a href="5.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/05.jpg" alt=""/></a>
        <a href="6.html" rel="lightbox"><img class="cloudcarousel" src="images/slider/06.jpg" alt=""/></a>
        
        <input id="slider-left-but" type="button" value="" style="cursor:pointer"/>
        <input id="slider-right-but" type="button" value="" style="cursor:pointer"/>

        <label id="caption" style="float:left; margin:260px 0px 0px 350px;">Click The Image To Read More</label>

    	</div>
Darren_RSA is offline   Reply With Quote
Old 12-20-2012, 09:30 AM   PM User | #4
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
Well, that is HTML code. You need Javascript code to trigger events.

Where is the Javascript code you are using to trigger events so that we can help you?
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Old 12-20-2012, 09:41 AM   PM User | #5
Darren_RSA
New Coder

 
Join Date: Sep 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Darren_RSA is an unknown quantity at this point
Can I not have a new script to do this?
Darren_RSA is offline   Reply With Quote
Old 12-20-2012, 09:44 AM   PM User | #6
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
You need to have at least something done so that we can guide you on what to do. So at least make a wireframe.

But the lightbox seems like a JS script itself.

If not, you can get somebody to do it for you at the Web Projects and Jobs forum section.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Old 12-20-2012, 09:46 AM   PM User | #7
Darren_RSA
New Coder

 
Join Date: Sep 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Darren_RSA is an unknown quantity at this point
Oh ok, I haven't got a script yet and I got no idea how to start it.
Darren_RSA 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 12:35 AM.


Advertisement
Log in to turn off these ads.