Refresh modal dialog query
-
14 aprilie 2012 01:52
Hi,
I have a sharepoint 2010 system where you click a link on a page and it opens a modal dialog where you can upload single or multiple documents. When that is done (by pressing close), it goes to a different modal dialog which displays the document properties.
On this dialog that displays the properties, when it opens, I need to refresh it. How could this be done? Is it best to use js?
Also, if I do insert this refresh, this must not close the dialog but keep it dispayed.
Any advice appreciated.
Thanks
Toate mesajele
-
14 aprilie 2012 02:13
QUICK way to do it is to use a designer for the popup page and write a javascript code to refresh the button using a refresh input button tag.The uRL for the page can be retrived by right clicking it and getting the properties url.
Below link has some usefull links regarding modal popup,
http://jitu-meck.blogspot.in/2011/12/working-with-modal-popup-in-sharepoint.html
Ashish Ranjan (Please click "Marked As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you)
-
15 aprilie 2012 07:53
Hi,
I guess you are talking about the document library uploading the documents and editing its properties.
Please correct me if my understanding is wrong.
If am correct , yes u can add javascript on the editform.aspx. But before that can i know the reason why you need to refresh the page on page load again?
-
15 aprilie 2012 17:30
Hi,
I guess you are talking about the document library uploading the documents and editing its properties.
Please correct me if my understanding is wrong.
If am correct , yes u can add javascript on the editform.aspx. But before that can i know the reason why you need to refresh the page on page load again?
Hi,
Yeah, it is editform.aspx (checked in page properties).
The reason why is that this page is opened via the client but it needs to postback to the server to retrieve some values. The page is full of declarative markup. How can I refresh the page on its load, via js?
Thanks
-
16 aprilie 2012 05:22
hi,
You can add a content editor web part on the page and write your Ecma script ( typically your Client Object Model) which will be able to read the data from the server and assign it to the fields.
1. Adding a Conent editor webpart on the EditForm.aspx
If you are on SP2010 , click on Library tab, under the option Form Webparts, select edit form. Add a content editor webpart. Write your script that will be able to read the data from the server.
2. To assign the value back to the fields on the form refer this blog.
Hope this helps.
-
16 aprilie 2012 09:34As opposed to reading the values, a simple refresh would be preferred.
-
16 aprilie 2012 10:10
If you refresh, how will the write request be made to the server?
At this point am really unsure of what you looking for. If you just need to refresh the form, so that it pulls the latest data!! ( Are you updating the list item before the edit form opens through a even handler??)
If its just a refresh, you can write your javascript saying
window.location.href=document.url. //Did you try ths.- Marcat ca răspuns de Qiao WeiMicrosoft Contingent Staff, Moderator 26 aprilie 2012 09:39
-
16 aprilie 2012 11:12
Hi,
I haven't tried that, no. I will insert that. Assume it goes within script tags.