Hello
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');
selectMonth.name= "expirationMonth";
selectMonth.id = "expirationMonth";
selectMonth.className = "expirationMonth";
for(var i=0;i<month.length;i++)
{
var mt = i;
mt = document.createElement('option');
mt.text=month[i];
mt.name="month";
mt.value=month[i];
selectMonth.appendChild(mt);
}
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,
PH
On Wednesday, October 16, 2013 2:57:38 AM UTC-5, pame...@aol.com wrote:
-- 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');
selectMonth.name= "expirationMonth";
selectMonth.id = "expirationMonth";
selectMonth.className = "expirationMonth";
for(var i=0;i<month.length;i++)
{
var mt = i;
mt = document.createElement('option');
mt.text=month[i];
mt.name="month";
mt.value=month[i];
selectMonth.appendChild(mt);
}
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,
PH
On Wednesday, October 16, 2013 2:57:38 AM UTC-5, pame...@aol.com wrote:
Hello:
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 = document.dynamicform.mt.value //this is from dropt down box doesn't work
Thank You In Advance,
PH
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 javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.