KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using the following html beginning form code: <form id="uploadpic" method="post" target="uppic" name="upform" action="/cgi-bin/inpost.cgi" enctype="multipart/form-data"> to try and load a page, however the page opens in a new tab. I don't think this is part of the problem, but I'll include this anyways. This is the submit button code in the form: <input name="filename" id="filename" type="file" onchange="submitFormAfterImageCheck();" /> And this is the function it calls: function submitFormAfterImageCheck() { if(/(\.jpeg|\.jpg|\.JPG|\.gif|\.png|\.tiff)$/.test(document.getElementById("filename").value)) { nogo = "go"; document.getElementById("uploadpic").submit(); $("#upload").html("<center>LOADING...</center>"); $('#link').hide(); $('#update_post').hide(); } else { alert("You can only upload an image."); } } iFrame code: <iframe id="uppic" name="uppic"></iframe> Why isn't this submitting to the iframe?
Tags (comma-separated)
Save Edits
Cancel