Posted by Mark D Smith on April 22, 2005, 10:01 am
Please log in for more thread options
Hi
I am using input type file to upload a logo for a form using php.
Now i have a preview button and if the user uses the browse button to select
an allowed image (input box contains say c:imagesimage1.jpg) when
previewed the code displays the image and any text in a textbox ok.
Using <input type="submit" value="<< Back"
onClick="javascript:history.back();"> the form keeps all inputs but looses
the c:imagesimage1.jpg
is there a way round this or do i have to live with it?
Mark
Posted by kaeli on April 22, 2005, 8:32 am
Please log in for more thread options
usenet@NOSPAM.obantec.net enlightened us with...
> Hi
>
> I am using input type file to upload a logo for a form using php.
> Now i have a preview button and if the user uses the browse button to select
> an allowed image (input box contains say c:imagesimage1.jpg) when
> previewed the code displays the image and any text in a textbox ok.
> Using <input type="submit" value="<< Back"
> onClick="javascript:history.back();"> the form keeps all inputs but looses
> the c:imagesimage1.jpg
>
> is there a way round this or do i have to live with it?
The fact that the fields stay filled in at all is browser-dependent.
To ensure everyone gets to keep the values, take care of it on the server
side by not using history.back and instead use a link that goes to that page
with URL params (or a form with post, or session vars, or whatever) then use
PHP to fill in the values.
--
--
~kaeli~
Abdicate (v.), to give up all hope of ever having a flat
stomach.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace
Posted by Mark D Smith on April 22, 2005, 3:02 pm
Please log in for more thread options
> usenet@NOSPAM.obantec.net enlightened us with...
> > Hi
> >
> > I am using input type file to upload a logo for a form using php.
> > Now i have a preview button and if the user uses the browse button to
select
> > an allowed image (input box contains say c:imagesimage1.jpg) when
> > previewed the code displays the image and any text in a textbox ok.
> > Using <input type="submit" value="<< Back"
> > onClick="javascript:history.back();"> the form keeps all inputs but
looses
> > the c:imagesimage1.jpg
> >
> > is there a way round this or do i have to live with it?
>
> The fact that the fields stay filled in at all is browser-dependent.
>
> To ensure everyone gets to keep the values, take care of it on the server
> side by not using history.back and instead use a link that goes to that
page
> with URL params (or a form with post, or session vars, or whatever) then
use
> PHP to fill in the values.
>
>
> --
> --
> ~kaeli~
> Abdicate (v.), to give up all hope of ever having a flat
> stomach.
> http://www.ipwebdesign.net/wildAtHeart > http://www.ipwebdesign.net/kaelisSpace >
Good idea! I'll simple have it post the data back and as you say have php
fill in the values.