[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • Last Modified:

Adjust Frameset based on PC resolution

Experts,

I've seen some solutions for this problem, but they are for the web using javascript.  I have a client only application and I would like to use two framesets and load whatever one fits, based on either a 800x600 or 1024x768 resolution.  Unless there is a better way?  If I don't do this, my banner graphic and my menu graphic fall off the pages.

Right now, I have sized down the graphics to fit 800x600, but it looks so small when viewing on 1024x768, which I believe will be the majority settings of the users.  Any ideas?  

I want to try and get this done within the next day.

thanks in advance,
AliciaV
0
AliciaVee
Asked:
AliciaVee
1 Solution
 
marilyngCommented:
0
 
marilyngCommented:
btw, javascript will work on the R6 client, what version are you using?
0
 
cezarFCommented:
try to set the frames' width/heignt in percent.

hope this helps.  
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sjef BosmanGroupware ConsultantCommented:
Try to fix one frame in size, and set those that may vary to *
0
 
AliciaVeeAuthor Commented:
marilyng,

I do have the frameset in percents and it doesn't help -- its because of the graphic images I'm using.  I need to size those to fit the resolution -- which makes me think I need to use two frame?  I looked at the enum settings -- not sure how I would use that for Notes?  I am using Notes 6.5 -- so you think the javascript code will help?  
I think i'll need a little help with that, let me find it and post.

sfjef,

Right now I am using a framset that fits on 800x600 and it fits on 1024x768, but the graphics look lost, too much white space?
0
 
marilyngCommented:
Alicia..  

I usually compose to the print paper size :)  

But, if you look at the Notes Mail file in 800x600 and then in 1024x768, you'll see that it stretches..

So, the art here is the tables, and image splitting.  You wrap one big table that sizes to 100% around your smalled fixed width tables.  Agreed, the graphics resized to a % look pretty awful, but usually you don't put big graphics on a web page because of the time it takes to download them to the client computer.  Usually you slice the graphic, and nest it in a fixed table, and that table is nested in a variable width table with other elements like rectangles and boxes that can resize without problems.

For instance for a rounded edge, plain color rectangle, you slice the image into thirds: the middle that can stretch and the two ends that cannot.

I'll look in my javascript snippets for a resolution size,  the other is visual basic that you can incorporate into lotus script.
0
 
AliciaVeeAuthor Commented:
marilyng,

Ah -- all good info and makes sense.  Yep -- I resized the graphic to a percent and yuk!  Very pixelage and jagged edges :(

Below is the javascript code found at
http://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_20406732.html

I'll add it in and see what happens.  My first question is how do I address the setting that I use to auto launch a predefined frameset in the database properties box?  My two framesets: MainFrame and MainFrame800.  If I set the launch properties to MainFrame, will this code automatically change it to MainFrame800?  I have not worked with Javascript code before.

Code:
========================================================
In short this is how it works:
First create a blank page, call it "Load" (or anything you want).
Set the launch properties for the database to open this page when the database is opened from the web.

On the page have the following JavaScript code in the onLoad event:

var pathname=window.location.pathname;
filename=pathname.substring(0, pathname.lastIndexOf('.nsf')+4);
switch (screen.width)
    {
    case 640:
        location.replace(filename + "/640x480?OpenFrameSet";
        break;
    case 800:
        location.replace(filename + "/800x600?OpenFrameSet";
        break;
    case 1024:
        location.replace(filename + "/1024x768?OpenFrameSet";
        break;
    default:
        location.replace(filename + "/640x480?OpenFrameSet";
    }

This script will open a frameset, depending on the screen width of the client.
The names of the framesets in this example are
640x480
800x600
1024x768
If the resolution is different from the above the 640x480 frameset is opened.
========================================================
0
 
marilyngCommented:
my thought would be to do this on a session, since they're obviously not going to change displays in the middle of the session.  So, I would collect their display when the open the database and put the value into a profile, or environment value (depending on if your web or client).

This way you can redirect to the correct opening frame when they open the database, otherwise you'll have to collect it on a splash page frameset..

Then of course, there's the problem of coming back to the frameset or navigating in or out to maintain the correct frameset interactively.

Don't know if I've ever created a database with only one frameset.. :)
0
 
marilyngCommented:
Try this for your resolution (javascript)
<HTML>
<BODY>
<script language=JavaScript><!--
var swidth=screen.width
var sheight=screen.height
alert("Your resolution is " + swidth + " x " + sheight);
//-->
</Script>
</HTML>
</BODY>
0
 
AliciaVeeAuthor Commented:
marilyng,

Where do I put this?  My database is Notes client.  Right now, I adjusted my graphics and frame for 800x600 pc -- so it works okay, not exactly what I was shooting for, but I see this is a lot harder than anticipated.

I'll try your code anyway -- just let me knw where I put it.  

thanks.
0
 
marilyngCommented:
Ah,

JS Header: set to CLIENT

var swidth=screen.width
var sheight=screen.height
alert("Your resolution is " + swidth + " x " + sheight);
function setscreenvalues(){
      document.forms[0].screenw.value=swidth;
      document.forms[0].screenh.value=sheight;
}

OnLoad: set to client
setscreenvalues()

On your form, put the two fields:  

screenw, text, editable, (case sensitive, go to properties, and type "screenw" in the ID)
screenh, text, editable, (same as above, type "screenh" in the ID)

Save your form, open it in client - now you have your resolution.  So, offhand, simply, do a splash screen/form that collects this and direct the users to the right framset. ?

Or, you can continue with the onload, and direct them using javascript to the right framset.. (you'll get a flicker)
0
 
AliciaVeeAuthor Commented:
Ah - very cool!  Thanks!  Sorry, I've been away a bit the past several weeks and got so busy.  I'm back to a normal pace.

Thanks again for your help.  I will certainly make good use of this code.

AliciaV
0
 
marilyngCommented:
Glad I was able to help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now