mnoisette
asked on
Create an "Upload a Document" button web part in other document libaries
1. Created a subsite and used the "Document Center" template.
2. Exported the "Upload a Document" button from that site.
3. Uploaded the button web part to the Web Part Library.
4. On the Home page I added the "Upload a Button" web part.
5. The button works on the subsite fine.
6. On the home page the button will not open the "upload.aspx" page.
Here is a copy of the code for the button. They are exactly the same for both the home page and subsite.
<div class="ms-uploadbtnlink">< button onclick="javascript:OpenNe wFormUrl(& #39;DropOf fLibrary/F orms/uploa d.aspx' ;);return false;" type="submit"><nobr><img alt="Upload a Document" src="/_layouts/Images/uplo addoc.png" /> <s pan>Upload a Document</span></nobr></bu tton> </div>
2. Exported the "Upload a Document" button from that site.
3. Uploaded the button web part to the Web Part Library.
4. On the Home page I added the "Upload a Button" web part.
5. The button works on the subsite fine.
6. On the home page the button will not open the "upload.aspx" page.
Here is a copy of the code for the button. They are exactly the same for both the home page and subsite.
<div class="ms-uploadbtnlink"><
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a charm!
For instance your website URL is
myintranet/home
and your subsite is
myintranet/departments/IT
then currently your upload for subsite pointing to
myintranet/departments/IT/
you have to give FULL path on the code above
so that it knows which department or subsite library you trying to upload too.
Currently the URL is translated to
myintranet/DropOffLibrary/
and thats why it does not work