I am new with iframes. Currently I am creating an iframe within an existing form. The main form has couple of checboxes, and also the iframe has couple of checkboxes. I want to pass the values of iframe checkboxes to another page when a submit button is clicked. The submit button is present in the main page. Is there a way to do this. I was trying to use a hidden text box in the main page which will get populated with the iframe checkbox value, but this does not seem to be working.
function checKer(inputID) // where inputID = checkbox
{
var x = document.ScannedSearch.elements[inputID];
var y = window.iframecat.document.SelectCategories.IFrame1;
if(y.checked == true)
{
alert('Is checked and has a value of y = ' + y.value);
}
else
{
alert('Is not checked');
}
}
</script>
<body>
<form name="ScannedSearch" method="post" action="filler1.cfm">
<input type="text" name="iframecategories" value="">
IFrame3: <input type="checkbox" id="testcheck" value="IFrame3" onClick="checKer('testcheck')";/>
IFrame4: <input type="checkbox" name="try2" value="IFrame4" />
I am sorry but my first iframes.cfm page is like follows. I have around 5 checkboxes, so I am the id of that checkbox as an argument, and it shows object expected error.
function checKer(inputID) // where inputID = checkbox
{
var x = document.ScannedSearch.elements[inputID];
var ifOb =document.getElementById("iframecat");
var y = ifOb.document.forms["SelectCategories"].elements[inputID];
if(y.checked == true)
{
alert('Is checked and has a value of y = ' + y.value);
}
else
{
alert('Is not checked');
}
}
</script>
<body>
<form name="ScannedSearch" method="post" action="filler1.cfm">
<input type="text" name="iframecategories" value="">
IFrame3: <input type="checkbox" id="testcheck" value="IFrame3" onClick="checKer('testcheck')";/>
IFrame4: <input type="checkbox" name="try2" value="IFrame4" />
Bookmarks