?
Solved

How to control window size

Posted on 2004-03-29
16
Medium Priority
?
209 Views
Last Modified: 2013-12-18
HI

I have a requirement that would open a link in a smaller window

Here is the link
@If(ItemNo ="";""; "[<A HREF=\'/" + @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument" + "\'>Click Link to Open Action</A>]")

Cheers

James
0
Comment
Question by:adspmo
[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
  • 4
  • 4
  • +1
16 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 10707751
You have to change the call to window.open ... there are parameters for the call, which include width and height values.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 1500 total points
ID: 10708002
use function and pass the url to the function like this , paste this is JSHeader

function winOpen(url) {

window.open( url, "height=100,widht=100");

}


@If(ItemNo ="";@Return("#");"" );
url =  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";
"[<A HREF=" + "javscript:winOpen('" + url +  "')" + "</A>]"

PS: Check quotes to match in url parameter

~Hemanth

0
 
LVL 14

Expert Comment

by:p_partha
ID: 10708210
in hemanth's answer there was a typo it's not javscript, it's javascript


;-)

Partha
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:adspmo
ID: 10708247
There are a few things her I don't get

@If(ItemNo ="";@Return("#");"" ); Return # else nothing???
url =  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";What do they click on to open window???
"[<A HREF=" + "javscript:winOpen(\'" + url +  "\')" + "</A>]"

+ "</A>]"+ what??
0
 
LVL 14

Expert Comment

by:p_partha
ID: 10708264
@If(ItemNo ="";@Return("#");"" );
url =  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";
"[<A HREF=" + "javascript:winOpen('" + url +  "')" + "Click Link to open action</A>]"


Partha
0
 
LVL 14

Expert Comment

by:p_partha
ID: 10708288
sorry typo

@If(ItemNo ="";@Return("#");"" );
url =  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";
"[<A HREF=" + "javascript:winOpen('" + url +  "')" + ">Click Link to open action</A>]"

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10708291
@return will stop execution of href and just point to current document if itemno happens to be null.

Partha blame it on my fat finger ;-)

0
 

Author Comment

by:adspmo
ID: 10714311
OK

I have added, the folowing . It now shows Click Link to open action beside every document

@If(ItemNo ="";@Return("#");"" );
url =  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";
"[<A HREF=" + "javascript:winOpen('" + url +  "')" + ">Click Link to open action</A>]"
 
function winOpen(url) {
window.open( url, "height=100,widht=100");
}
The URL is javascript: RTGOpenWindow('javascript:winOpen('')', 'RTGWin')
When clicked it says erorr on page
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10714440
missed : in the formula, try this one

@If(ItemNo ="";@Return("#");"" );
url :=  @ReplaceSubstring(@Subset(@DbName;-1); "\\"; "/") + "/LINK2/" + ItemNo + "?Opendocument";
"[<A HREF=" + "javascript:winOpen('" + url +  "')" + ">Click Link to open action</A>]"
0
 

Author Comment

by:adspmo
ID: 10714526
Here is the URL
javascript: RTGOpenWindow('javascript:winOpen('PPM/PPMREQ.nsf/LINK2/100150?Opendocument')', 'RTGWin')

I get error on page still. Is it theRTGOpenWindow?
0
 
LVL 14

Expert Comment

by:p_partha
ID: 10714545
there is no RTGopenwindow, use the one which hemanth gave you

Partha
0
 

Author Comment

by:adspmo
ID: 10714628
function RTGOpenWindow( DocURL, WinName, WinArgs, WinTitle )
{
      a = WinArgs ? WinArgs : "left=0, top=0,width=" + (screen.availWidth-7) + ",height=" + (screen.availHeight-27) + ",status=no,toolbar=no,menubar=no,location=no,resizable=no"
      n = WinName ? WinName : "RTG" + document.uniqueID
      t = WinTitle ? WinTitle : ""
      win = window.open(DocURL, n, a)
      setTimeout("win.focus()", 100)

}
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10714809
Oh, James, c'mon, it was staring you in the face, all along!  RTGOpenWindow dynamically calculates what it thinks is an appropriate window size (availWidth-7, availHeight-27), unless you pass in your own parameters.

So, ALL you need to do is change the RTGOpenWindow call:

javascript: RTGOpenWindow('PPM/PPMREQ.nsf/LINK2/100150?Opendocument', 'RTGWin', 'width=400,height=250')
0
 

Author Comment

by:adspmo
ID: 10715469
Ya

I saw that I just can't figure out why it is opening full screen
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10715721
well you have the function already ?

Qwal already gave the method how to use it. Unless you are getting some other error.

0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10715880
James,

I remember you called this function elsewhere, so you know how to use it. Theonly difference is, that you need to make sure there is a third parameter to the RTF... call, which says 'width=x,height=y' (x and y are pixel counts).
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 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