hello,
this is the situation…
I can select an image from in flash. When I click on upload in flash, I call a javascript function test();. This also works because I’ve tested it with an alert().
In the function test() I’ve placed a click event on the submit button, so he would submit my image to a php file, but its always permission denied… arghhh
document.forms.form1.elements[0].click();
//opens the browse dialog–>works
function test()
{
alert(“uploaden”);
document.forms.form1.elements[1].click();
//document.form1.submit();
}
I tried 2 ways
-
document.forms.form1.elements[1].click();
//posts the image to php --> doesn’t work --> permission denied!!! -
document.form1.submit();
//output: object has no such methods or properties
// FORM
//
form name="form1" ACTION="portfolio/upload.php"
METHOD="POST" ENCTYPE="multipart/form-data">
input type="file" name="file" onChange="doFlashCommand(this.value)">
input type="submit" name="submit" value="testen">
/form>
//deleted those < otherwise it showed up as a real form
I don’t work with frames, everything is on one page…
I don’t know it anymore, getting frustrated…
Tested the the click event in another example and there it works… :s
(same code)
grtz