How to show details from web part as pop up window

Hello
I designed few web pages in SharePoint Designer 2010 and trying to customize it. I have a XSLTListView web part that is displaying filtered data from the external SQL database. When user choses the item from this list, I need it to show in the new pop
up window. I can't seem to find the way to do it. Saw multiple references to use SP.UI.ModalDialog.ShowPopupDialog(url), but I don't know how and where to incorporate it, since there is no place in the page where it actually specifies that url
of the page that I need to show as pop up.
Below there is a code for the XsltListWebPart, where I'm hoping I could make changes to make it pop up (it seems that this is the part that is calling the display details form). The form that I'd like to pop up is DispForm.aspx
<script>
function showpreview<xsl:value-of select="$ViewCounter" />(o) {
count = 1;
for(i = 0; i &lt; o.childNodes.length; i++)
var child = o.childNodes[i];
if (child.style.display == &quot;none&quot; &amp;&amp; child.tagName == &quot;DIV&quot;)
f = document.getElementById(&quot;n&quot; + count + &quot;<xsl:value-of select="$WPQ" />&quot;);
f.innerHTML = unescape(child.innerHTML) + &apos;&#160;&apos;;
count ++;
</script>
<div id="previewpaneerror{$ViewCounter}" style="width: 801px"></div>
<table cellspacing="0" cellpadding="0" border="0" id="previewpanetable{$ViewCounter}" dir="{List/@Direction}">
<xsl:choose>
<xsl:when test="not($dvt_RowCount=0)">
<tr>
<td valign="top" style="width: 186px">
<div class="ms-ppleft" style="width: 100px">
<table cellspacing="0" cellpadding="0" border="0" style="width: 122%">
<xsl:apply-templates select="." mode="RenderView"/>
</table>
</div>
</td>
<td valign="top">
<div id="preview1{generate-id()}" class="style2" style="width: 690px; margin-left: 30px;">
<table border="0" cellpadding="0" cellspacing="0">
<xsl:for-each select="ViewFields/FieldRef[not(@Explicit='TRUE')]">
<tr>
<td nowrap="nowrap" valign="top" class="ms-formlabel" style="width: 143px">
<nobr>
<xsl:value-of select="@DisplayName"/>
</nobr>
</td>
<td valign="top" class="ms-formbody" id="n{position()}{$WPQ}" style="width: 370px">
</td>
</tr>
</xsl:for-each>
</table>
</div>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td class="ms-vb">
<table class="ms-summarycustombody" cellpadding="0" cellspacing="0" border="0">
<xsl:call-template name="EmptyTemplate" />
</table>
</td>
</tr>
<tr>
<td height="5">
<img src="/_layouts/images/blank.gif" width="1" height="5" alt="" />
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:template>
Alla Sanders

Hi Alla,
You can show details from web part as pop up window using JavaScript with SP.UI.ModalDialog.ShowPopupDialog(url). Here is a demo you can refer to:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var obj1=$("a[id='forum0-NewPostLink']");
url="http://sp13"+obj1.attr("href");
//alert(url);
obj1.removeAttr("href");
obj1.click(function(){
openDialogBox(url);
function openDialogBox(url) {
var pageUrl=url;
var title="New Discussion";
SP.UI.ModalDialog.showModalDialog(
url: pageUrl,
autoSize: true,
title: title,
dialogReturnValueCallback: function (result){
if(result== SP.UI.DialogResult.OK){
//refresh parent window
window.location.href=window.location.href;
</script>
Reference:
https://social.technet.microsoft.com/Forums/en-US/f18062ed-2e17-440e-8e00-2904f5316802/discussion-board-forum-opens-in-other-page?forum=sharepointdevel
Best Regards,
Eric
Eric Tao
TechNet Community Support

Similar Messages

  • Don't show data from web service to Cross-Tab in xcelsius

    Hi all visitors
    I have created one web service and my web service will show data like this.
    Group ___Floor ____Amount
    Member__Floor 1__1000000
    Member__Floor 2__1000000
    Member__Floor 1__1000000
    Member__Floor 2__1000000
    Member__Floor 2__2200000
    Member__Floor 1__     1000000
    Member__Floor 1__     1000000
    In my xcelsius, i have option to make it to cross-tab.
    when i use that data( data above by manual) to excel spreadsheet. The data will change to
    Group______________Floor1________________Floor2______________GrandTotal
    Member____________5000000_____________ 3200000_____________8200000           
    GrandTotal__________5000000_____________ 3200000_____________8200000
    But when i load the data from web service,It doesn't show anything.
    (when i use list view to show data from web server, i see all data)
    How can i load data from web service and show the data like manually?
    Best Regards,

    Hi Tony,
    As per your example i have used the SUMIF fucntion
    have a glance at that and let me know if you need help
    Data coming from webservice >>     Concat     Group     Floor     Amount
                                              =C7&D7     Member     Floor1     1000000
                                              =C8&D8     Member     Floor2     1000000
                                              =C9&D9     Member     Floor1     1000000
                                              =C10&D10     Member     Floor2     1000000
                                               =C11&D11     Member     Floor2     2200000
                                               =C12&D12     Member     Floor1     1000000
                                              =C13&D13     Member     Floor1     1000000
    Cross Tab >>Group     Floor1                                                                    Floor2
          Member     =SUMIF($B$7:$B$13,$H$7&I6,$E$7:$E$13)     =SUMIF($B$7:$B$13,$H$7&J6,$E$7:$E$13)
         Grand Total     =SUM(I7)                                                                     =SUM(J7)
    Original data after
    Group     Floor1     Floor2
    Member     4,000,000     4,200,000
    Grand Total     4,000,000     4,200,000
    Hope this may solve your issue.
    Ley me know if you have any other issues.
    Regards,
    AnjaniKumar C.A.

  • How to show rss from other sites on my site?

    how to show rss from other sites on my site?
    i'd like to have a window on my site that shows rss from
    another site
    (their content in a window on my site)
    thanks
    lenny

    What version of DW do you have. The later versions have RSS
    script generators (I believe) for consuming feeds. Otherwise, you
    can use 3rd party sites to generate the code, or you can use a
    server side scripting language to consume the feeds.

  • Creating chart from web part sharepoint 2013 online

    hello, my name is peter and i know to solve the problem with creating charts from web part . i am familiar with excell services, but it doesnt solve my problem because it is not taking data from web parts so it is static. Thank you for your time

    If you want info about creating charts in web parts, this one is quite nice:
    http://social.technet.microsoft.com/wiki/contents/articles/17614.adding-charts-to-standard-webparts-and-visual-webparts.aspx
    If you're worrying about getting data from another web part, you need to use web part connections and start here:
    http://msdn.microsoft.com/en-us/library/ms469765(v=office.14).aspx
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • How do I reinstate the information bar that shows the prevention of opening a pop-up window?

    After Firefox opened the information bar telling me they blocked a pop-up window I inadvertently clicked the option link and deleted the information bar from coming up again.
    How do I reinstate the information bar that shows the prevention of opening a pop-up window?
    == This happened ==
    Just once or twice
    == I clicked the option link and selected the "do not show this again" option

    I set browser.popups.showPopupBlocker to false, and information bar still appears.
    When I also set privacy.popups.showBrowserMessage to false, it doesn't appear.
    To test, whether the information bar appears, I use
    [http://www.popuptest.com/popuptest3.html]
    So, set to true preferences
    privacy.popups.showBrowserMessage
    and
    browser.popups.showPopupBlocker
    Both of them!!!
    Does it help you?

  • Export the pdf from indesign some error Pop Up window (Failed to Export the PDF file). How slove the

    Export the pdf from indesign some error Pop Up window (Failed to Export the PDF file). How slove the problem
    Please some one help on this

    You need to try exporting the first half of the book.
    If that exports ok then export the other half of the book.
    Whatever half it fails on - keep dividing the book in half to find the culprit page or pages.
    For example if your book is 128 pages long:
    1. Export pages 1 - 63
    2. If these Fail to Export then
    3. try exporting1-32
    4. If these Fail to Export
    5. then try exporting1-16
    If it doesn't fail (step 2)
    Then export pages 64-128
    and 64-90 etc.
    until you find the pages causing the issues.

  • How to transfer photo from iPod classic 30 GB to windows 8

    How to transfer photo from iPod classic 30 GB to windows 8 ?

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How To : Sync playlists from iOS device back to itunes - Windows

    How To : How To : Sync playlists from iOS device back to itunes - Windows (May work on Mac too)
    NOTE - THIS WILL ONLY WORK IF YOU HAVE THE MUSIC FILES ON THE COMPUTER ALREADY
    If your like me and format your computers only to discover that you've lost all those time consuming playlists that you spent hours on, well your in luck.
    Without any Third-Pary programs it's possible to save those awesome playlists, and pull them back from the blink of oblivion.
    Step 1 - Connect iDevice to your computer and then open iTunes.
    Step 2 - Locate your iDevice on the left side bar on iTunes under the heading 'Devices', click the arrow on the left of the devices name and select a playlist.
    Step 3 - Right-Click the selected playlist and choose 'Export playlist', Save it as a Text file.
    Step 4 - In iTunes, up the top click 'File' then locate Library, move across to 'Import Playlist...', Select the playlist you just created and click open.
    Step 5 - Your playlist will appear on the left side bar under the heading 'Playlists', Select the playlist and attempt to play one of the songs contained.
    Step 6 - You would have been prompted that iTunes doesnt see the file, select 'Locate' and then go to the location of your music and locate the file.
    (Sorry dont have an image for this one due to having all my music already found)
    Step 7 - Doing this once will find all the music in the playlist given that it's in a similar location of the song you found.
    Congrats you have successfully moved a playlist back from oblivion

    There's a different method.
    1. On iTunes -> Devices -> <your device> -> Summary -> Check Manually manage music and videos.
    2. On iTunes -> Devices -> <your device> -> Summary -> uncheck Manually manage music and videos.
    done.

  • Mail -- How to show a Junk mailbox in a POP account

    How to show a Junk mailbox in a POP account
    I have two POP accounts on my iPhone 5s with iOS 8.1. The two accounts are identical except for the user name and of course the email address. In one account I have a Junk folder to which incoming messages can be moved. In the other account I have no such mailbox and can't for the life of me figure out how to show one.
    The steps to show one should (I think) be as follows, which works in the 'cooperative' account, and also on a second iPhone 5s:
    1) Open Mail.app.
    2) Heading: Mailboxes. Tap 'Edit'.
    3) Scroll down and tap 'Add Mailbox..'
    4) Tap account name.
    5) Tap 'Junk' (checks item).
    6) Tap Done, Done, Done (Junk mailbox appears in Mailbox list, and incoming messages can be moved there.)
    The problem in the uncooperative account is that at Step 5, there is no Junk item to check. There are only Sent and Trash. (In the other account there are Drafts, Sent, Junk, Trash).
    Solutions or suggestions welcome.

    Hopefully the screenshot will show.

  • I deleted my iMovie from computer and from my purchases list in AppStroe. When I'm trying to download it again from App Store a pop up window comes up and says: "These apps were already assigned to your Apple ID and are available in your Purchases list"

    I deleted my iMovie from computer and from my purchases list in AppStroe. When I'm trying to download it again from App Store a pop up window comes up and says: "These apps were already assigned to your Apple ID and are available in your Purchases list". Please help me to reinstall it.

    If new versions of iPhoto and the other iLife applications (iMovie and GarageBand) were purchased by the previous owner from the Mac App Store, then they will be locked to the previous owner's Apple ID and cannot be transferred to you. You will have to re-purchase them under your own Apple ID.
    If this is an older MBA that came with Snow Leopard or an earlier version of Mac OS X, though, the system would have come with an installation disk that included the iLife applications, a disk which the seller should have provided to you. Those iLife applications would be older versions, of course, and may or may not work in Lion depending on how old they are.
    Regards.

  • How can I shut off all of the pop-up windows for all the Firefox updates?

    How can I shut off all of the pop-up windows for all the Firefox and Thunderbird updates?
    Apparently now Mozilla creates new versions of their browser and email apps every two weeks instead of just creating updates... I'm tired of all of the pop-up requests for these constant installation requests and all the problems that the new version installations create... I just want to use the software and be left alone.
    I can't find a way to make Firefox and Thunderbird stop with the pop-up requests for new installations... is there a way to do this or has Mozilla just got it rigged so one can't just use the software without re-installing a new version every two weeks and running in to new plugin issues and missing features every time?
    Help!
    Thanks,
    numetro

    Is it possible that her computer is infected with malware.
    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • How do I get a web part to display items from a dropdownlist?

    I have a DropDownList that am filling with items from a list. The part of my code that am using to read the list and populating the drop down works just fine. I am now trying to figure out how to display the contents of the drop down on a web part. I know
    it sounds like a straight forward and easy thing to figure out, but I have blanked out. Does anyone have a snippet I can take a look at? This is how I am currently reading from a list to create the drop down...
    protected override void CreateChildControls()
    string title = string.Empty;
    EditorChoices = new DropDownList();
    string siteUrl = "mySite";
    using (SPSite site = new SPSite(siteUrl))
    SPWeb web = site.RootWeb;
    SPList list = web.Lists["testList"];
    SPQuery testQuery = new SPQuery();
    testQuery.Query = "<Query><Where><Geq><FieldRef Name='Title'/>" +
    "<Value Type='Number'>10</Value></Geq></Where></Query>";
    foreach (SPListItem item in list.GetItems(testQuery))
    title = Convert.ToString(item["Title"]);
    EditorChoices.Items.Add(title);
    Controls.Add(EditorChoices);
    base.CreateChildControls();
    ChildControlsCreated = true;
    I basically want to display the items returned from the query, which are now in the dropdownlist, to be displayed on my custom webpart. I really appreciate the help.
    Thanks
    UPDATE: My dropdownlist is a web part property. So when editing the web part, the drop down control appears in the web part property. Now that part is working just fine. The part am having an issue with is, the second part of my requirement is that I want
    to display that same information within the drop down on the web part. Not as another drop down, but just to display them as a vertical text list on the web part.

    Hello,
    >I want to be able to display all the entteries in the dropdown,
    Could you please provide more information? as per your description fisrt part is done, which was filling data in dropdown list. So what is next?
    If you want to get selected value from dropdown or filter value then you may try this link:
    http://bilbrobloggins.com/sharepoint/dropdown-list-box-filter-web-part-in-sharepoint-ndash-part-three/
    http://tmullenssharepoint.wordpress.com/2013/04/12/sharepoint-custom-web-part-properties-from-sharepoint-list/
    Correct me if i misunderstood
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to collect intranet user's MAC address from web part on document library

    I need the best solution for the following problem:
    Let's say for an intranet application just to do customization through a web part on a document library we need to collect MAC address of all user's machine who tries to access the particular document library. 
    main point to achieve is we want to give access only to few users to a particular document library. I think if we get unique mac address then also purpose can be solved. Is there any other way apart from mac?
    In SharePoint 2013 on premise application what is the best way to do this customization? early reply is highly appreciated.
    Thanks,

    Hi,
    Why do you need this?  SharePoint runs on top of ASP.NET so its limited to what ASP.NET can do.  A quick google returns results like:
    http://www.codeproject.com/Questions/303612/How-to-get-Mac-Address-of-Client-Machine-in-asp-ne
    It's highly unlikely you can achieve this, back to my first question - why?  Maybe you can achieve the requirement in a more supportable manner.  I'm assuming you want to track the user.
    Thanks
    Dave
    My SharePoint Blog - http://www.davehunter.co.uk Twitter -
    @davehunter

  • How to merge details from 2 different universe through webi (XIR2)u2026.

    I have 2 DPs with one common dimension and 2 uncommon dimensions each...
    DP1
    EmployeeID
    Name
    Address
    DP2
    EmployeeID
    Title
    BirthDate
    I bring both queries in. I merge on EmployeeID. To get the Name, Address, Title and BirthDate to all appear in the same block, I understand that I would have to make either Name/Address or Title/Birthdate to be details of there respective EmployeeID. My question is, what if I make these four columns details from within their respective universe (and not from the report). I can't get these columns to appear in the same block. Keeps getting incompatible object. What's the difference between making details on the report side (as oppose to from the universe)? I want to make it easy for report developers and not to always make uncommon demensions to be details from the report side.
    In each of the universe, when I create the details, I specify which dimensions they are associated with. From within the Webi report, once I merge the common dimension (EmployeeID), I would see the Imcompatible Object message only if I try to DRAG the detail objects into the same block. If I first go to the block, go to a column inside the block, right click and create new blank column, double click on blank column to see formula bar, paste detail item into formula bar...that would work....
    So in summary, this works after merging EmployeeID dimensions from 2 different universes...
    [EmployeeID], [Name], [Address], (create blank column and paste: =[Title] in formula of blank column)
    this does not work...
    [EmployeeID], [Name], [Address], (drag [Title] into column next to [Address]) {Incompatible Object message appears}
    If you create a details from the report side, all would work fine. You can merge all objects into same block without problems. I just don't understand why if a dimension has 10 details (and they are clearly attributes of a dimension) why can't these be done at the universe level and not have users recreate them at the report level.

    Hi Anthony,
    Following information might help you to resolve the issue.
    Inserting Detail object into table.
    Table already contains a merged dimension based on the Dimension object to which that Detail is associated.
    Error: "Cannot Drop Here: Incompatible Objects".
    Workflow:
    Create WebIntelligence report using Island Resorts Universe
    Select <Customer>, <Country of Origin>, <Age>, <Address>
    Add second query using: <Customer>, <Sales Person>, <Year>, <Revenue>
    Create merged dimension for <Customer> from Query 1 and Query 2
    Insert new table using objects: <Merged Customer>, <SAles Person>, <Year>, <Revenue>
    Try to insert <Age> or <Address>. Error "Cannot Drop Here: Incompatible Objects".
    Solution: 
    Logged as product defect: ADAPT00625276 Fixed in Service Pack 2.
    Workaround:
    Create a report level variable, defined as a Detail, which is associated to the <Merged Customer> merged dimension.
    Insert this report level variable into the table - no error is generated.
    I hope this will help you.
    Regards,
    Sarbhjeet Kaur

Maybe you are looking for