Re: Can't get value of select option from dynamically created form

Wednesday, October 16, 2013

On this topic mybe I should have given more information

This is my code

var month = new Array("January","Februray","March","April","May","June","July","August","September","October","November","December")
    var selectMonth =  document.createElement('select'); "expirationMonth"; = "expirationMonth";
    selectMonth.className = "expirationMonth";
       for(var i=0;i<month.length;i++)
         var mt = i;
          mt = document.createElement('option');
 Of course I appending everything.

I have tried several things but it will either give me the index of  1 or 2 so on but not the actual month.
This is some of the things I tried which I thought should have worked.

getit =document.dynamicform.month.options[dynamicform.month.selectedIndex].value;

getit =document.dynamicform.expirationMonth.options[dynamicform.expirationMonth.selectedIndex].value;

var getit =dynamicform.month.options[dynamicform.month.options.selectedIndex].value;

Not Luck! :(

Thanking You In Advance,

On Wednesday, October 16, 2013 2:57:38 AM UTC-5, wrote:

I attempting to update information from a form which consist of a text box and two drop down boxes.
I amble to get the information from the form for description but can't get date or year from drop down boxes.

This is what I use to get information from form for description

var des = document.dynamicform.description.value;

  var expmonth =  //this is from dropt down box doesn't work

Thank You In Advance,

You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit


Post a Comment

Note: Only a member of this blog may post a comment.

Copyright © 2010 Web Design | Free Blogger Templates by Splashy Templates | Layout by Atomic Website Templates

Vida de bombeiro Recipes Informatica Humor Jokes Mensagens Curiosity Saude Video Games Animals Diario das Mensagens Eletronica Rei Jesus News Noticias da TV Artesanato Esportes Noticias Atuais Games Pets Career Religion Recreation Business Education Autos Academics Style Television Programming Motosport Humor News The Games Home Downs World News Internet Design Entertaimment Celebrities 1001 Games Doctor Pets Net Downs World Enter Jesus Mensagensr Android Rub Letras Dialogue cosmetics Genexus lasofia thebushrajr wingshock tripedes gorduravegetal dainfamia dejavu-transpersonal jsbenfica republicadasbadanas ruiherbon iranianforaryans eaystcheyl fotosdanadir Só Humor Curiosity Gifs Medical Female American Health Madeira Designer PPS Divertidas Estate Travel Estate Writing Computer Matilde Ocultos Matilde futebolcomnoticias girassol lettheworldturn topdigitalnet Bem amado enjohnny produceideas foodasticos cronicasdoimaginario downloadsdegraca compactandoletras newcuriosidades blogdoarmario arrozinhoii