girionis
asked on
Submit a form within an iframe along with the main form.
Hello I have a main form which contains an iframe. The iframe itself also contains a from. I am trying to submit the iframe form alongside with the parent form. I am just wondering if this is possible without copying the iframe's form values into hidden fields in the main form.
Any thoughts on this are appreciated.
Thank you.
Any thoughts on this are appreciated.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello dorward thank you for your quick reply. Yes I know about the value of the file inputs, that';s why I asked if I can do it without javascript.
I will look into using a <div> element and I will get back to you.
I will look into using a <div> element and I will get back to you.
ASKER
Ok using a div made things better but there is still a problem. I add the <input type="file"> dynamically to the form (we do not know in advance how many files the user will upload) but everytime I add a new file type it resets all the previous ones. I am using the following javascript:
divData.innerHTML = divData + "<input type='file'" + cnt + "'><br>"
where divData is the name of the div element and cnt is a global counter.
If I try to do it differently, adding an element to the node using
document.getElementById('d ivData').a ppendChild (inputFile );
where inputFile is the input type file I create,
it just does not send any of those with the request.
Any more thoughts?
divData.innerHTML = divData + "<input type='file'" + cnt + "'><br>"
where divData is the name of the div element and cnt is a global counter.
If I try to do it differently, adding an element to the node using
document.getElementById('d
where inputFile is the input type file I create,
it just does not send any of those with the request.
Any more thoughts?
ASKER
Sorry, this:
> divData.innerHTML = divData + "<input type='file'" + cnt + "'><br>"
is actually
divData.innerHTML = divData + "<input type='file' name='fileName'" + cnt + "'><br>"
> divData.innerHTML = divData + "<input type='file'" + cnt + "'><br>"
is actually
divData.innerHTML = divData + "<input type='file' name='fileName'" + cnt + "'><br>"
ASKER
I will ask this question in the JavaScript category. Thank you for your help.
ASKER