real time interaction with html form |
real time interaction with html form |
raymar1 |
Jan 14 2016, 01:23 PM
Post
#1
|
Group: Members Posts: 1 Joined: 14-January 16 Member No.: 23,906 |
Hi there, I'm wondering if anyone can help me
I have an image slideshow javascript which works fine. It goes through my folder which has images called image1.png, image2.png etc. The line of code that traverses the images is: QUOTE dimages[i].src="image"+(i+1)+".png"; I'm interested in changing that "1" value to be a variable, so if I changed it to 2 it would show me every other image. If I have an HTML form, such as below: QUOTE <select name="select" size="5"> <option value="select_one">1</option> <option value="select_two">2</option> <option value="select_three">3</option> <option value="select_four">4</option> <option value="select_five">5</option> </select> How would I go about changing the value that currently says i+1 to be i+whatever_value_is_selected_on_the_form Many thanks This post has been edited by raymar1: Jan 14 2016, 01:23 PM |
CharlesEF |
Jan 14 2016, 02:34 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Attached is a sample of what needs to be done. You really should change the option value to be the actual number instead of the 'select_one', etc ... values you currently use. If you really want to leave things as they are then you need to comment the 1 line in the function and un-comment the other line. If you have any questions just ask.
temp.html ( 748bytes ) Number of downloads: 493 |
Lo-Fi Version | Time is now: 19th March 2024 - 12:37 AM |