473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

I think it has something to do with array...but not sure...pls help

Please help me with this script. I have two lists in my form. One to choose
a directory and one to choose a picture. The script bellow works perfect
without the directory choose function.
I tried to make the directory choose function myself but I did not succeed.
I think I made a mistake here: document.pic.src = picLocation[theChoice2] +
picFile[theChoice];

Please give me a hint or a solution.
Thanks!

the script:

function changePicture()
{
var picFile = new Array ("empty.gif", "01vk.gif", "02vk.gif", "03vk.gif",
"04vk.gif", "05vk.gif", "06vk.gif", "07vk.gif",
"08vk.gif", "09vk.gif", "10vk.gif"); //change filename

var picLocation = new Array ("", "pic/Gif thumbs vk/", "pic2/Gif thumbs
vk/", "pic3/Gif thumbs vk/",
"pic4/Gif thumbs vk/", "pic5/Gif thumbs vk/");
//change filelocation

/* txt addition
var picText = new Array ("", "Kaart 1", "Kaart 2", "Kaart 3", "Kaart 4",
"Kaart 5", "Kaart 6", "Kaart 7", "Kaart 8", "Kaart
9", "Kaart 10");

var selection = document.DropPicture.Picture.selectedIndex;
var selection2 = document.DropPicture.Directory.selectedIndex;
var theChoice = document.DropPicture.Picture.options[selection].value;
var theChoice2 = document.DropPicture.Directory.options[selection].value;
document.pic.src = picLocation[theChoice2] + picFile[theChoice];
document.all.picWords.innerText = picText[theChoice];

}
</SCRIPT>

Jul 20 '05 #1
2 1341

"Lodewijk van Haringhal" <di**********@echtniet.oo> schreef in bericht
news:3f***********************@news.xs4all.nl...

I tried to make the directory choose function myself but I did not succeed. I think I made a mistake here: document.pic.src = picLocation[theChoice2] + picFile[theChoice];

Please give me a hint or a solution.
Thanks!

the script: ....
var picLocation = new Array ("", "pic/Gif thumbs vk/", "pic2/Gif thumbs


Don't create directories with spaces in their names. Change 'Gif thumbs vk'
in something like 'Gif_thumbs_vk'

JW

Jul 20 '05 #2
> Don't create directories with spaces in their names. Change 'Gif thumbs
vk'
in something like 'Gif_thumbs_vk'


Thanks but that is not the problem and solution :(
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Trosen | last post by:
Hi Everyone, I hope someone can help, I'm pretty new to pro*c programming. I have the following application setup: a pro*c program calls a stored procedure and recieves a cursor back: the...
0
by: Erik Summers | last post by:
I am new to php/mysql but not new to server side scripting in general. I have built an app using DreamWeaver MX, PHP and MySQL. It is working well but there is one final functionality I need and...
2
by: Antti Nummiaho | last post by:
Consider the following javascript: var temp = new Array(new Array(0)) document.writeln(temp) temp = new Array(new Array(0,1)) document.writeln(temp) One would assume that it would print "0...
8
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
33
by: Peace | last post by:
I am having trouble writing code to turn an array into a delimited string. Dim splitout As String splitout = Join(DataArray(rows, columns), " ") rows and columns are integers representing rows...
5
by: Varangian | last post by:
ImageButton ship; ship = new ImageButton; for (int i=0; i<5; i++) { ship.ImageUrl = pathofImage; ship.ID = "ShipNo" + i.ToString(); ship.Click += new...
29
by: GhostInAK | last post by:
I'm seeing a terribly distubing number of questions that have no purpose in existing. As an example: How do I change the position of a stream? Hmm.. Could it be some method on the stream...
10
by: Cainnech | last post by:
Hi guys, I'm a bit puzzled by a script I'm trying to write. I'm doing a script which wil automatically generates a series of commands which can then be executed by a third party application. Very...
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.