Originally posted by baby hi danial
Thanks for your help. The code works!
really appericate it
Btw when i try to modify the coding to suit my function for updating. It gives me a error msg
Error Type:
Dundas.Upload.2 (0x80004005)
Failed to get the boundary.
/project_virtual/process_update.asp, line 26
any idea what does Failed to get bounday means???
I have no idea, I have never used this component before, just wrote the code using the example and help file. I use pure code to upload files as some server does not allow installing component.
Post line 25, and few lines before and after it, i might figure out the problem.
hm... i didnt modify any of the coding before line 26 and after that.. I only modify the adding of sql statment
I think its some problem when passing variables from one page to the other.. I am attaching my 2 pages
Search update and processupdate
search update display result in text box and allow user to change it and i include the picture browse inputbox to also allow user to change the picture.
Then this information is passed to processupdate to be updated into my DB.
I used get instead of post in form action. They showed me that information is passed to process_updated form.
But txtcode is not passed over. That makes me wonder.
The culprit is disabled="true".. Seems like once u disabled a text box the information cant be passed over to other pages.
Or at least in my case.
Danial, is it possible to forced a resolution for the picture displayed? Eg: 500 x 400. Picture bigger that this will be scaled down. is that possible?
Or you could use javascript on client side to resize the image, but that wont look good, as when loaded the image will be shown as big and resized after few mili second.
Originally posted by abhijit Check if ReadOnly works in Netscape Browser. I don't think it does.
Cheers,
Abhijit
Depends on what version of Netscape you are using. Older version of NS does not support ReadOnly, but neither does it support Disabled! It is supported in newer version of NS. Opera and Mozilla supports it as far as i know.
ReadOnly is a valid property as described in the W3 HTML Specification.
Danial - Remeber that time u helped me on storing the pathing of where the picture is stored into the Database?
It stored a path EG: c:\inetpub\pictures\upload\123.gif
This is fine when i run the asp on my computer.
But when i tried accessing the asp pages from other computer. They cant find the image file. Becos its pointing to c:\inetpub\pictures\upload\123.gif but this file is not on their computer.
Store the images on the webserver and not on your local pc.
Also use Server.MApPath to get the relative path of the image.
Regards,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
hi baby,
server.mappath can be used to map absolute paths to relative paths. Check This Link For More
u are developing your program on your pc, but you need to host it on a web-server so that everyone can access it.
How are you accessing the asp from another pc? Where is the location of the webserver?
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Ok. My suggestion to you is store the mapped path inside the database instead of the absolute path.
Then when your asp reads the path, it will show the image correctly on your friend's pc as well.
Check it out.
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
i tried changing it to pictures\upload\emilia123.gif or project\pictures\upload\emilia123.gif but cant work =(
Change it to
pictures/upload/emilia123.gif Notice the difference in the slash. And then check it out.
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Originally posted by baby after some tweaking i finally got it able to work
But i did this by hardcoding
this is what i did
server.MapPath("pictures\upload\ddtree.gif")
it works for this.. But this is not what i wanted cos i will be taking the path value from my database
i want it to be something like this
server.MapPath(rs.fields("Picture")) but i get a type mismatch error
cani noe the excat syntax?
your field contains the c:\ so its giving an error.
when you store you will have to do a server.mappath
that ways everyone accessing the page will be able to see the pictures.
Detailed Explanation follows:
+++++++++++++++++++++++++++++
When you upload the image, you are storing the image in your local drive.
You are also storing the same absolute path of the drive.
This is causing this path to be displayed in property of the img tag.
<img>c:\localpath\yourimage.jpg</img>
Instead of storing the local path of the image, my suggestion to you is to
store the relative path in the database.
So when your webpage is accessed through any pc, the path displayed in the localpath will be
<img>/localpath/yourimage.jpg</img>
Am I being clear or do you need some more explanations?
Originally posted by baby ok i solved it.. By doing another way around...By putting default value into my picture column... Thx all for the help.....
way to go baby!
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog