well crap.... : /
without disabling it, you have to click the submit button twice and the first click clears the fiel field... sigh
  ----- Original Message -----
  From: S. Isaac Dealey
  To: CF-Talk
  Sent: Sunday, August 15, 2004 8:03 PM
  Subject: Re: Fiel Field style : )

  Ahh... you lose the file any time you disable the field.

  > nope... i added this.imagefield1.disabled=false; in the
  > <form> tag
  > extremely weird.... you have to click the upload button
  > twice and the first click clears the imagefield1 field
  > then end up with the same CF error

  > i tried adding then i get a JS error
  > saying "Access denied" booooo

  > this is what it is now....

  > <cfif isdefined('form.upload')>
  > <cffile action="" filefield="imagefield1"
  > destination="#request.imagepath#\cache"
  > nameconflict="makeunique">
  > </cfif>

  > <cfoutput>
  > <form name="imageform" action="" method="post"
  > enctype="multipart/form-data"
  > >   >    <input type="file" name="imagefield1" style="display:
  >    none;">
  >    <input type="text" name="imagefield2" size="30">
  >    <input type="button" class="formbutton" >   >    ield1.disabled=false;imagefield1.click();imagefield2.va
  >    lue=imagefield1.value;imagefield1.disabled=true;"
  >    value="Browse..."><br>
  >    <input type="submit" name="upload" class="formbutton"
  >    value="Upload Image">
  > </form>
  > </cfoutput>

  >   ----- Original Message -----
  >   From: S. Isaac Dealey
  >   To: CF-Talk
  >   Sent: Sunday, August 15, 2004 7:03 PM
  >   Subject: Re: Fiel Field style : )

  >   put this in your form:
  >    = false;"

  >   > I have been trying to figure out forever how to change
  >   > the
  >   > style on the Browse button of a file field and have
  >   > finally got it.... but using the code below Coldfusion
  >   > returns an error saying:
  >   > The form field "imagefield1" did not contain a file.
  >   > same thing from imagefield2 of course... its not a
  >   > file
  >   > field

  >   > if you take the style off of imagefield1 you can see
  >   > that
  >   > the same text is in there that is in the imagefield2
  >   > field

  >   > <cfif isdefined('form.upload')>
  >   > <cffile action="" filefield="imagefield1"
  >   > destination="#request.imagepath#\cache"
  >   > nameconflict="makeunique">
  >   > </cfif>

  >   > <cfoutput>
  >   > <form name="imageform"
  >   > action="">   >   > ex.cfm?adminaction=images&imgaction=add&imgsect=#url.i
  >   > mgse
  >   > ct#" method="post" enctype="multipart/form-data">
  >   >    <input type="file" name="imagefield1"
  >   >    style="display:
  >   >    none;">
  >   >    <input type="text" name="imagefield2" size="30">
  >   >    <input type="button" class="formbutton"
  >   >    >   >   >    ield1.disabled=false;imagefield1.click();imagefield
  >   >    2.va
  >   >    lue=imagefield1.value;imagefield1.disabled=true;"
  >   >    value="Browse..."><br>
  >   >     <input type="submit" name="upload"
  >   >     class="formbutton"
  >   >     value="Upload Image">
  >   > </form>
  >   > </cfoutput>

  >   > any thoughts? or is it just another failed attempt at
  >   > trying to change the look of that damned "Browse"
  >   > button

  >
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to