I'am new with javascritping not with programming. Is there nobody who can
help me with ths simple promblem? :) Please, please give me a hint.
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.sr c = 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.DropPi cture.Picture.s electedIndex;
var selection2 = document.DropPi cture.Directory .selectedIndex;
var theChoice = document.DropPi cture.Picture.o ptions[selection].value;
var theChoice2 = document.DropPi cture.Directory .options[selection].value;
document.pic.sr c = picLocation[theChoice2] + picFile[theChoice];
document.all.pi cWords.innerTex t = picText[theChoice];
}
</SCRIPT> 3 2309
Hello
Try:
document.pic.sr c = picLocation[selection2] + picFile[selection];
Instead of:
document.pic.sr c = picLocation[theChoice2] + picFile[theChoice];
What you initially wrote will only work if theChoice2/theChoice will contain
numeric values who are ranged from 0 to picLocation.len gth-1
You cannot access 'picFile' with a non numeric index.
hope that helps
Elias
"Lodewijk van Haringhal" <di**********@e chtniet.oo> wrote in message
news:3f******** *************** @news.xs4all.nl ... I'am new with javascritping not with programming. Is there nobody who can help me with ths simple promblem? :) Please, please give me a hint.
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.sr c = 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.DropPi cture.Picture.s electedIndex; var selection2 = document.DropPi cture.Directory .selectedIndex; var theChoice = document.DropPi cture.Picture.o ptions[selection].value; var theChoice2 = document.DropPi cture.Directory .options[selection].value; document.pic.sr c = picLocation[theChoice2] + picFile[theChoice]; document.all.pi cWords.innerTex t = picText[theChoice];
} </SCRIPT>
Hi Elias,
Thanks this works fine but now my choice is limited to the ammount of
entry's in the picLocation array. when there are 4 directories I can only
choose 4 pictures?
Can you help me with this? Try: document.pic.sr c = picLocation[selection2] + picFile[selection]; Instead of: document.pic.sr c = picLocation[theChoice2] + picFile[theChoice];
What you initially wrote will only work if theChoice2/theChoice will
contain numeric values who are ranged from 0 to picLocation.len gth-1
You cannot access 'picFile' with a non numeric index.
hope that helps Elias "Lodewijk van Haringhal" <di**********@e chtniet.oo> wrote in message news:3f******** *************** @news.xs4all.nl ... I'am new with javascritping not with programming. Is there nobody who
can help me with ths simple promblem? :) Please, please give me a hint.
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.sr c =
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.DropPi cture.Picture.s electedIndex; var selection2 = document.DropPi cture.Directory .selectedIndex; var theChoice = document.DropPi cture.Picture.o ptions[selection].value; var theChoice2 =
document.DropPi cture.Directory .options[selection].value; document.pic.sr c = picLocation[theChoice2] + picFile[theChoice]; document.all.pi cWords.innerTex t = picText[theChoice];
} </SCRIPT>
Hello Lodewijk,
1)You can increase values in both arrays in a parallel manner
2)in the location's listbox option values you set values that are in
the range of its array.
<option value="0">loc1</option>
etc...
all the values returned now will be from 0 to arraySize even if there
are more items in the listbox than in the array.
Elias
"Lodewijk van Haringhal" <di**********@e chtniet.oo> wrote in message news:<3f******* *************** *@news.xs4all.n l>... Hi Elias,
Thanks this works fine but now my choice is limited to the ammount of entry's in the picLocation array. when there are 4 directories I can only choose 4 pictures?
Can you help me with this? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Afonin |
last post by:
Hello,
I installed osCommerce on Apache server. By default it sends out e-mails
from the account 'nobody'. However, this option is turned off by the hosting
provider. Is there a way to make it send mail from a real account? Is there
a scripting solution for it (some PHP script)?
I would appreciate your advice.
Thank you,
|
by: Sullivan |
last post by:
When I run a CGI script (Python) with Python's CGIHTTPServer, it
should run with the UID of the user 'nobody' (as the documentation
says).
But if I let the CGI script e.g. create a file, it creates the
file with the UID of the user who started the CGIHTTPServer.
Any ideas what I am doing wrong here?
Thanks in advance for your help!
|
by: Brian Piotrowski |
last post by:
Hi All,
I'm trying to run a simple query from an ASP page. I want the query to
select each individual field in a table and compare it to another table. If
the value doesn't exist, I want it reported. Here's the code I have to do
this check:
'Check to see if there are any assemblies not in the database!
strSQL = "select...
|
by: Sjaakie |
last post by:
Hi there,
I'm trying to get HTML_ToPDF (3.3) running on en dedicated server,
safe_mode enabled. Been trying for more than 2 days now, without success.
Have similar script running on my own personal server. Safe mode disabled.
This is what I did so far:
---
I copied html2ps, ps2pdf and curl into...
|
by: rigga |
last post by:
Hi,
I am relatively new to php and am currently working on a site where I need
to use a collapsing menu system. I have written the code to do this
however I am completely at a loss to do one particular thing. To best
explain what the problem is I will give you an overview of how the menu
hangs together.
The menu looks like this:
| |
by: expertware |
last post by:
Dear friends,
My name is Pamela, I know little about CSS,
but I would like to ask a question
I have an image on a web page within a css layer:
<DIV ID=MyLayer
STYLE = "position: absolute;top:68px; left:563px;
width:640px;height:480px;">
<IMG src="ReportImageBox_12.54.52.png" width=640 height=480></IMG>
|
by: 63q2o4i02 |
last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning
Python the past few months and like it very much. A few years ago I
had an AI class where we had to use Lisp, and I absolutely hated it,
having learned C++ a few years prior. They didn't teach Lisp at all
and instead expected us to learn on our own. I wasn't aware I had to...
|
by: Jason |
last post by:
I'm troubleshooting a program that I didn't build, so forgive me on
this one. It's called email.php, and it looks like a program that the
original developer must have downloaded from somewhere.
The part of the program that sends an email states this:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html;...
|
by: Fro |
last post by:
Hi,
the operating system (Unix) considers a php-server as a user with name
"nobody". For example, if my php-script saves a file uploaded by a
user, the owner of the file will be "nobody". I would like to know if
"nobody" is considered as "group" or "others" (in terms of the "chmod"
command)? In other words, is "chmod g+w dirname" sufficient...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |