omlarsen
Posts: 3
|
| Posted: 06/15/2006, 2:43 AM |
|
Hi all,
I have a record form with two fields for images.
Often the second image is empty so I used the one pixcel image "dot.gif". as default.
Until now I have used the to put the filenames in a textbox
and the images are sent to the server with ftp-upload.
Now I want to use the "File upload".
Is possible to put in the default "dot.gif" here?
In "AfterExecuteInsert/Update" I try to update the record and put "dot.gif" into empty field. But it goes wrong.
The filename is updated but the filesize is 0 byte and i get the message: "The file not found".
if I can set the value in filesize, will it all work then ?
I know I can choose "dot.gif" every time the field is empty and Iget a lot of "200606150036230.dot.gif".
Thank You
omlarsen
|
 |
 |
feha
Posts: 712
|
| Posted: 06/15/2006, 8:57 AM |
|
you can't is the upload component renames your file
try to use wherever you want to show your images in label
image filed is empty than set default dot.gif
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
Rey
|
| Posted: 06/21/2006, 6:28 PM |
|
Reference this link it worked for me http://forums.codecharge.com/posts.php?post_id=76151
To not display the image icon if the content of the field linked to that image is empty,
Bring up the page with the image of the Image Link, left click on the red form container. Obtain the form name from the properties window, now left click on the Command Image Link. Obtain the Image link name . use this example for your script:
If form_name. Image_link_name.Value = "" then form_name. Image_link_name.Value = " dot.gif "
Underneath is the script I use on my site.
If articles1. Image link_name.Value = "" then articles1.images_url.Value = " dot.gif "
Now Insert the script in the Before Show event of the label of your Image_link that will display your image. Publish and test, good luck.
|
|
|
 |
Rey
|
| Posted: 06/21/2006, 6:33 PM |
|
Correction this is the script I use.
If articles1.images_url.Value = "" then articles1.images_url.Value = "NoPhoto.gif"
|
|
|
 |
|