Solved

XSL Editor Parameters - to open a max size new window

Posted on 2013-01-30
8
866 Views
Last Modified: 2013-01-30
Hi experts,

<xsl:when test="@ContentType='Process'">
<a href="http://company.net/sites/sg/Forms/DispForm.aspx?ID={@ID}&amp;Source=http://.company.net/sites/sg/Forms/AllItems.aspx" target="_blank">
<xsl:value-of select="@FileLeafRef"/>
</a>
 </xsl:when>

However the window appears small. How do I ensure the window is max size- What do I need to add to the a href?
0
Comment
Question by:sharepoint2013
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 50
ID: 38836797
Hello,

forcing a new window to maximise is not a good idea. Most people would be quite cross if the control of the new window size was overridden. With current monitor sizes and screen resolutions, a maximised window often makes it harder to digest the content.

Having said that, it is possible. You need some javascript in the file and then include a call to that js function in the link.

There are two examples in this question (the accepted solutions)

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22146450.html

cheers, teylyn
0
 

Author Comment

by:sharepoint2013
ID: 38837822
Saw it. would it be possible to put the <script> tag in the xsl editor?

How do i integrate it into the onclick line without the <script> tag? eg:

..href="http://company.net/sites/sg/Forms/DispForm.aspx?ID={@ID}&amp;Source=http://.company.net/sites/sg/Forms/AllItems.aspx"

onClick="return !window.open(this.href,this.target,'width=1024,height=250')"

target="_blank">

Is this fine?
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 total points
ID: 38837946
You can put the script anywhere in the page, for example just above the link tag.

<xsl:when test="@ContentType='Process'">
						<script>
						  function winpop(url){
						  var w = screen.width;
    						var h = screen.height;
						    popup = window.open(url,&apos;popup&apos;,&apos;screenX=0,screenY=0,left=0,top=0,width=&apos;+w+&apos;,height=&apos;+h);
							  }
						</script>
						<a href="http://company.net/sites/sg/Forms/DispForm.aspx?ID={@ID}&amp;Source=http://.company.net/sites/sg/Forms/AllItems.aspx" onClick="winpop(this.href);return false;">
							<xsl:value-of select="@FileLeafRef"/>
						</a>
					</xsl:when>

Open in new window

0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:sharepoint2013
ID: 38838055
Sorry for my lack of knowledge.

Where do I put the width and height size?
0
 

Author Comment

by:sharepoint2013
ID: 38838061
Sorry I tried and it works perfect!
0
 
LVL 50
ID: 38838063
You don't.

Because you don't know what they are. Each user can have a different screen resolution.

Javascript will calculate them. The script works as is. I copied it from my test site.
0
 

Author Comment

by:sharepoint2013
ID: 38838294
The problem is, the new window does not have back forward buttons..

i inserted toolbar=yes and status=yes and location=yes

Still no effrt.
0
 

Author Comment

by:sharepoint2013
ID: 38838305
nvm i fixed it
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint and CAML query help 4 26
Regarding Disk IO 3 88
Add Rows on a Table 8 54
CSS background-color 5 21
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question