edwind Posted March 29, 2011 Share Posted March 29, 2011 I have a simple form to upload images but the action="upload_file.php" opens a new(replacement) window and when that window is closed I lose the page I was on. I need to return to the original window. PHP being server side gives me a problem of directing the user so I would like to change the html in the original form to set the action to open the php result in a new(additonal) window and set the window size to small such as width="300" and heigh="200" so that the original wondow can still be seen underneath.Can I set 'target' within the form action html? Link to comment Share on other sites More sharing options...
thescientist Posted March 29, 2011 Share Posted March 29, 2011 you could just use AJAX to send a GET request to the server and have the form processed that way, and then after the request submits successfully and get's whatever response you need, you can open up a window and pass the data on the query string.Personally, accessibility guidelines dictate that a user should determine how a new window is opened, either as a "pop-up" or in the same window pane. You can also have the form submit to itself, which means the form and the upload_file.php are the same page, and then you can use PHP and conditional statements to execute some sort of desired behavior/functionality upon a successful submit case. Link to comment Share on other sites More sharing options...
edwind Posted March 29, 2011 Author Share Posted March 29, 2011 Thankyou for your reply 'thescientist' but you just made me feel like I'd been slapped with a wet fish. I did not understand a word.However, by trying to solve the problem myself I have found that putting 'target="_blank"' in the opening form command, I acheive exactly what I want with Firefox but IE simply reports 'Invalid file'. Can anyone please help around this little problem. And please no jargon! I am but a simple photographer with an interest in doing my own website. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.