PDA

View Full Version : Help! Anyone with a knowledge of Java please read!



Paddy
28th April 2000, 03:03
Help!

As some of you know I have to design a web site as part of my genetics module.
However, I need the users system resolution to change from 800*600 to 1024*768.
I know that the graphics adapters at Uni will handle that resolution change.

How can I get the browser to automatically do this?
If anyone knows of / or can write a Java applet to do this I will be very grateful.

Thank for any contributions!

Patrick

SteveC
28th April 2000, 03:45
I don't actually know (I hardly know any Java) but I don't think that a browser will let you anywhere near system settings such as this.

Try web sites such as javascripts.com or just do a search.

------------------
Cheers,
Steve

"Life is what we make of it, yet most of us just fake"

Paddy
28th April 2000, 07:36
Cheers Steve,

I have found many scripts that detect your browsers resolution settings and then redirect the page accordingly...

Can I do this any other way then?
There must be a little utility out there that changes your desktop resolution without any user input....

Oh dear

Hunsow
28th April 2000, 08:18
I certainly hope not. A good written html page looks good on any resolution. The reason internet uses html is that it doesn't matter what your settings are, it will always show correctly on your screen. A webpage that must use a specific resolution defeats the purpose of using html, is simply stupid and would get the lowest grade if I had a say in it.

SteveC
28th April 2000, 08:28
I couldn't agree more with Hunsow (but didn't want to sound so mean!) as I work in a web design company and we work to fit as many resolutions as possible. 800x600 is a definite must in our books.

------------------
Cheers,
Steve

"Life is what we make of it, yet most of us just fake"

Hunsow
28th April 2000, 09:17
That did sound mean, the reason is attempted java abuse, which I forgot to talk about.

Changing the computer settings without asking the user is of course a big nono. It would be really sad if that would be possible, and even more sad if someone would make use of that, and yet even more sad if that person would think it would be a good idea to do so.

Jord
28th April 2000, 09:41
Patrick,

You might want to look at the bookmarklets (http://www.bookmarklets.com/).

Maybe something you're looking for is in there http://forums.murc.ws/ubb/smile.gif

Jord.

Paddy
28th April 2000, 13:20
come on guys! be nice!

This is coursework, not a professional web site!

i created the page to look nice on my pc. If i wanted it to look good at other resolutions then i would have taken that into account.

If I cant get a java applet(or other) to resize the desktop than i will have to do it manually.

i just need some help, please.....
I am not after constructive critisism, i need this to be completed by next week, i dont have the time to redo it.

Thanks anyway

Patrick
----------
cheers for the link Jord, I will check it out!

Frankfurt
28th April 2000, 13:54
just a thought paddy, are u allowed to use CGI in the program, because if you are im fairly certain you could find something similar to what you are asking for online...but what do i know i aint in the web development bizz... http://forums.murc.ws/ubb/frown.gif

Frankfurt

JamesA
28th April 2000, 13:57
Patrick,

You missed Steve, and Hunsow's points. It cannot and should not be possible for a Java applet or HTML or JavaScript to change the display resolution of a machine.

Your only recourse is to write a CGI program in C/C++/VB or even PERL(for Win32 and some Win32 specific modules) that changes the display resolution of the machine that host the CGI program (i.e. the webserver) WHEN a HTTP request to the CGI program is called. Of course, if the target display machine/server uses the X windowing system, you would have to write the CGI for that platform.

Again, in order for the target machine to change its resolution, you must have:

0) Write a CGI program that interacts with a webserver or write a CGI/webserver.
1) the CGI program that has permission to change the resolution of the server.
2) your scripts/HTML must contain embedded calls to this CGI program.

As you can see, this is very very very very painful to do in the last minute.

Your best bet is to design your HTML pages for the least common denominator.

Your lesson should be to never use HTML editors (e.g. FrontPage) for WYSIWYG purposes. It was never meant to be.

Of course, there are a lot tricks you can do to HTML to make it look somewhat consistent across platforms and machines.

Good luck!


------------------
JamesA: Just a Dumbass MURCer
System Details (http://web.raex.com/~jdang/demerzel.html)

"Have you had any licorice lately?"

{Edit Reason: I cannot write without grammar and spelling mistakes.}


[This message has been edited by JamesA (edited 28 April 2000).]

JamesA
28th April 2000, 14:14
Patrick,

{Assuming your target machine uses Windows and MS I.E. ..}

Perhaps you should search for ActiveX/COM solutions (and the use of <embed> or <object> HTML tags) to take command of the client system.

These ActiveX/COM objects can be easily abused by a malicious users, and probably isn't popular, and hence not easy to find. Some underground hacker sites may have this object.

Anyway, saw your project, and I thought it looks pretty decent. Why do you have the need to alter the target machine's resolution? What is the minimum resolution for your pages to be viewed properly?

As Steve has mentioned, your page should be properly viewable at 800x600.

For more guidelines on HTML/webpage design:
<a href="http://www.webpagesthatsuck.com/" target="_blank">Web Pages That Suck -- The web site version of the book</a>

Again, good luck!



------------------
JamesA: Just a Dumbass MURCer
System Details (http://web.raex.com/~jdang/demerzel.html)

"Have you had any licorice lately?"

cjolley
28th April 2000, 14:27
I can not even imagine an applet getting access to system properties that deep.
If applets could get that deep into a victim's system someone would have written an applet to set a victim's graphics subsystem to 2048x2048 at 300hz and kill the victim's monitor when a page is accessed.
Yikes!! http://forums.murc.ws/ubb/frown.gif
chuck

JamesA
28th April 2000, 14:43
Good example Chuck! http://forums.murc.ws/ubb/smile.gif

Anyone remember when you could visit a website, and it shuts down your Win95 system? http://forums.murc.ws/ubb/smile.gif

Ah.. Those were the days.. http://forums.murc.ws/ubb/wink.gif



------------------
JamesA: Just a Dumbass MURCer
System Details (http://web.raex.com/~jdang/demerzel.html)

"Have you had any licorice lately?"

Paddy
28th April 2000, 15:59
giggle giggle, i suppose so....

so of the graphic dont fit onto the page when viewed at 800*600....

If it cant be done then it cant be done...

I will just have to alter the machies resolution manualy before hand.


oh sod it, it looks fine to me now anyway

(the uploaded version is crap)

cherrs lads

Patrick

Wombat
28th April 2000, 19:53
Java can't do what you're asking, but ActiveX (IE only, I think) could do it. Of course, I consider ActiveX a virus, and many other people do as well.
Can't you resize the graphic, and then just link to the larger version?

Lmg
1st May 2000, 14:48
i dont know a anything about java/activex, but i would be really pissed if i went to a site and my screen res was changed. isnt this basically hacking and acsesing somebodys computer without their permision?
my mum would shit a brick when her old ibm vga started to squeal.

Lee