IMPUT TYPE=IMAGE / HELP PLEASE!

Discussion in 'ASP General' started by Coby Herd, Jan 16, 2006.

  1. Coby Herd

    Coby Herd Guest

    I have a content mgmt page that allows a user to update products in his
    store - (actually a used car lot). All of the fields work perfectly - when
    he puts content in.changes prices, etc it writes to the database and when
    the page is refreshed the changes appear.

    The problem is the image fields. They work OK if you put the correct HTML
    tags in
    i.e.-<img src="images/imagename.jpg"> I need a simpler way of doing this so
    I tried to change the for the form fields from
    <input size=28 name="image" value="<%= Server.HTMLEncode(image & "") %>"
    maxlength=100

    to
    <input type="file" size=28 name="image" value="<%= Server.HTMLEncode(image &
    "") %>" maxlength=100>

    it sorta works and sorta doesn't - The whole location of the file I am
    trying to insert i.e.-
    C:\Documents and Settings\Administrator\My Documents\My Pictures\coby1c.jpg
    gets put into the field

    I need to find out how to have the script just put the image tag he wants
    into the field

    Any suggestions?
    and thanx for any help

    CobyfromBrooklyn
     
    Coby Herd, Jan 16, 2006
    #1
    1. Advertising

  2. Coby Herd

    Patrice Guest

    You can't define programmatically the value for an input type=file field for
    security reasons...

    Depending on what you are trying to do you could just display the image and
    use the form field only if the user want to update the current image...

    --
    Patrice

    "Coby Herd" <> a écrit dans le message de
    news:%...
    > I have a content mgmt page that allows a user to update products in his
    > store - (actually a used car lot). All of the fields work perfectly - when
    > he puts content in.changes prices, etc it writes to the database and when
    > the page is refreshed the changes appear.
    >
    > The problem is the image fields. They work OK if you put the correct HTML
    > tags in
    > i.e.-<img src="images/imagename.jpg"> I need a simpler way of doing this

    so
    > I tried to change the for the form fields from
    > <input size=28 name="image" value="<%= Server.HTMLEncode(image & "") %>"
    > maxlength=100
    >
    > to
    > <input type="file" size=28 name="image" value="<%= Server.HTMLEncode(image

    &
    > "") %>" maxlength=100>
    >
    > it sorta works and sorta doesn't - The whole location of the file I am
    > trying to insert i.e.-
    > C:\Documents and Settings\Administrator\My Documents\My

    Pictures\coby1c.jpg
    > gets put into the field
    >
    > I need to find out how to have the script just put the image tag he wants
    > into the field
    >
    > Any suggestions?
    > and thanx for any help
    >
    > CobyfromBrooklyn
    >
    >
     
    Patrice, Jan 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    521
    Chris Uppal
    May 5, 2005
  2. richp
    Replies:
    10
    Views:
    644
    Safalra
    Feb 2, 2004
  3. KK
    Replies:
    2
    Views:
    594
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,764
    Mike Hewson
    Jan 7, 2005
  5. jomla

    to replace characters into an imput

    jomla, Aug 25, 2010, in forum: Javascript
    Replies:
    2
    Views:
    83
    jomla
    Aug 25, 2010
Loading...

Share This Page