I have a radiobutton value Ascending from a pop-up screen to my that I can parse back to mainscreen using elementByID
1. when I hit the done button I call this object which is on my little pop-up screen:
function addSelectedItemsToOrderAsc()
{
var b = document.getElementById('radioSortBy') --this is my id='"radioSortBy'"
b.checked=true;
self.opener.addToParentListOrderByAsc(b);
window.close();
}
--from popup screen,
But the problem is from gettting my value from the popup box screen to my main screen.
2. The radioSortBy' element should then be transfered from addSelectedItemsToOrderAsc to "addToParentListOrderByAsc" functions
The addToParentListOrderByAsc looks like so, this function resides on my destination page, or main page
var OrderSourceAsc = document.getElementById('radioSortBy');
//OrderByList comes from my pop-up page
function addToParentListOrderByAsc(sourceList6) // to my destination page
{
var orderAscDestList = document.getElementById('sortByAsc'); //this is my hidden field on my mainInput Page
for(var countTwo = orderAscDestList.options.length - 1; countTwo >= 0; countTwo--) { // I AM GETTING AN ERROR objects.length is null or not an object because its not parsing my 'radioSortBy' value in ?
orderAscDestList.options[countTwo] = null;
}
for(var i = 0; i < sourceList6.options.length; i++) {
if (sourceList6.options != null)
orderAscDestList.options = new Option(sourceList6.options.text, sourceList6.options.value );
}
}
// Marks all the items as selected for the submit button.
function selectListAsc(sourceList6) {
var sourceList6 = document.getElementById('sortByAsc');
for(var i = 0; i < sourceList6.options.length; i++) {
if (sourceList6.options != null)
sourceList6.options.selected = true;
}
return true;
}
Can someone advise what I am doing wrong, still a newbie, thankyou.
1. when I hit the done button I call this object which is on my little pop-up screen:
function addSelectedItemsToOrderAsc()
{
var b = document.getElementById('radioSortBy') --this is my id='"radioSortBy'"
b.checked=true;
self.opener.addToParentListOrderByAsc(b);
window.close();
}
--from popup screen,
But the problem is from gettting my value from the popup box screen to my main screen.
2. The radioSortBy' element should then be transfered from addSelectedItemsToOrderAsc to "addToParentListOrderByAsc" functions
The addToParentListOrderByAsc looks like so, this function resides on my destination page, or main page
var OrderSourceAsc = document.getElementById('radioSortBy');
//OrderByList comes from my pop-up page
function addToParentListOrderByAsc(sourceList6) // to my destination page
{
var orderAscDestList = document.getElementById('sortByAsc'); //this is my hidden field on my mainInput Page
for(var countTwo = orderAscDestList.options.length - 1; countTwo >= 0; countTwo--) { // I AM GETTING AN ERROR objects.length is null or not an object because its not parsing my 'radioSortBy' value in ?
orderAscDestList.options[countTwo] = null;
}
for(var i = 0; i < sourceList6.options.length; i++) {
if (sourceList6.options != null)
orderAscDestList.options = new Option(sourceList6.options.text, sourceList6.options.value );
}
}
// Marks all the items as selected for the submit button.
function selectListAsc(sourceList6) {
var sourceList6 = document.getElementById('sortByAsc');
for(var i = 0; i < sourceList6.options.length; i++) {
if (sourceList6.options != null)
sourceList6.options.selected = true;
}
return true;
}
Can someone advise what I am doing wrong, still a newbie, thankyou.