Jump to content

uploading files setting target window


Recommended Posts

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 post
Share on other sites

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 post
Share on other sites

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...