Link to home
Start Free TrialLog in
Avatar of AliciaVee
AliciaVee

asked on

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
Avatar of marilyng
marilyng

btw, javascript will work on the R6 client, what version are you using?
try to set the frames' width/heignt in percent.

hope this helps.  
Avatar of Sjef Bosman
Try to fix one frame in size, and set those that may vary to *
Avatar of AliciaVee

ASKER

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?
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.
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
https://www.experts-exchange.com/questions/20406732/Frameset-Problem.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.
========================================================
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.. :)
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>
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.
ASKER CERTIFIED SOLUTION
Avatar of marilyng
marilyng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Glad I was able to help.