1

is that right? If I go to a library in the designer, i can see upload.aspx there. Can't create a new one (and i guess that is because there is really only one per site, or collection?). Anyway, I can open upload.aspx in advanced and put some script under PlaceHolderMain, but unlike any other page/form,etc I have worked with, this one won't respond to anything. alert('hi'); will not worK?

am i missing something?

2 Answers 2

1

You shouldn't manipulate (OOTB) Upload.aspx since it is not recommended!

You best chance is to use Custom Action with Location="ScriptLink". It loads the JavaScript on all the site pages and even the dialogs. You can have a custom actions in a feature (Site Collection/Web). See this example

2
  • 1
    To be a little more verbose for Falak, editing files in the hive breaks your warranty. It is possible to make your own virtual layouts folder to do branding for these files, but it heavily impacts maintainability. Falaks answer stands. (You can also change the master page for the upload.aspx by creating your own layouts folder... still not recommended)
    – Hugh Wood
    Commented Dec 4, 2012 at 15:12
  • I see. thanks for the info. If i could simply figure out how to pass the ID from dialog init to the edit form to save variables...i wouldn't have this problem. lol...thanks guys.
    – Justin
    Commented Dec 4, 2012 at 15:28
0

Justin, There are tricks that you can implement to still manupulate the upload page client-side without changing the form. I have done this through the use of an iframe. From the host page (example: All Items.aspx) you would load the upload.aspx page into an iframe and once loaded, you can manipulate it from the host page because it is being served from the same domain. With the help of some UX/UI concepts (ie: overlays, animated 'busy' icons) the user will never nitice they actually in a different page.

This is the trick I use with the upload widget in SPWidgets ( http://purtuga.github.com/SPWidgets/ ).Use it as a reference should you decide to use this approach.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.