newbie: html's select, prompting dialogs and javascript

F

Federico

Hello,

I have an Html SELECT named "jorl", with several options with values
1,2,3. I would like that if user selects "3", a dialog appears prompting
the user to input a number, and then use that number as the value of
the "jorl" SELECT.

(I learned how to detect when "3" is selected, but I have no idea how to
show a dialog, and how to set the value of "jorl")

Any clue? is this possible in javascript? Where can I find information
(appart from the newsgroup)?

Thanks for your help,
Federico
 
F

Federico

I give more details:

function samplesize(value) {
if(value=="3")
document.options.jorl.value = prompt("Enter sample size","65");
alert(document.options.jorl.value);
}

this function is called when ths select "jorl" is changed, a dialog
appears, but I'm not able to change the value of jorl, which remains as "3".
 
F

Federico

I found what the problem was: I cannot change the select that way. I
solved my problems creating a hidden input and storing there the values
as set by the user.

Anyway, thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top