Author |
Topic |
|
wij2
Novice
10 Posts |
Posted - 05 Dec 2006 : 22:13:16
|
Hi,
I'm quite new with DHE and I'm trying to make the size of a label relative to the size of the browser screen but I can't figure out how to achive this.
Can anyone help me?
Thanks!
Regards,
Marco. |
|
arov
Super User
Italy
448 Posts |
Posted - 06 Dec 2006 : 08:59:04
|
Hi wij2! Welcome to Dynamic World!
my method is this: I test my site for 800x600, 1024x768 and 1280x1024 resolution Use the "center image" command and label size < 800(x) and < 600(y) and try. Look for example : www.soundandsoul.it or www.speziallapari.it
however other methods exist ;)
::arov:: |
|
|
T00N
Super User
573 Posts |
Posted - 06 Dec 2006 : 12:11:02
|
I don't think this is possible in dhe. |
|
|
arov
Super User
Italy
448 Posts |
Posted - 06 Dec 2006 : 13:55:36
|
??? I have not understood the question ???
::arov:: |
|
|
arov
Super User
Italy
448 Posts |
Posted - 06 Dec 2006 : 13:58:56
|
ops... now I have understood. The size of the browser window! Sorry![4 |-|]
For first open of homepage I don't think this is possible, but for other page (and return to home page) you can use the javascript windows.open(...) with size options.
::arov:: |
Edited by - arov on 06 Dec 2006 14:05:28 |
|
|
Waldorf
Super User
Belgium
284 Posts |
Posted - 07 Dec 2006 : 17:59:52
|
not possible |
* "Happiness" is making -> The <- Choice! *
|
|
|
wij2
Novice
10 Posts |
Posted - 08 Dec 2006 : 15:54:03
|
What about Arov's option to use the events option for a page...
I'm thinking of using the onResize event and then equally resize the label; will this work?
I think that should be done with Java because there is not a 'resize' action, Davide? Is this something for the future? |
|
|
wij2
Novice
10 Posts |
Posted - 09 Dec 2006 : 01:14:20
|
OK... I think I've got it working (in IE for now!)
If you go to www.wij-2.nl you will see it working at the 'Aerobic Combit Fit'-page.
It's a combi of 2 javascripts in the 'Page-Top-Code' in DHE: <script type="text/javascript"> function adjust_object(n,min,max){ o=jsGetLayerObject('ldhe'+n) var w=document.body.offsetWidth - 100 if (w > max) w=max if (w < min) w=min o.style.width=w }
function jsGetLayerObject(n) { var o if (isDom2) return document.getElementById(n) if (isNS) return document.layers[n] if (isIE) return document.all(n) if (o=eval('document.'+n)) return o;return null } </script>
And an 'onResize' event with an 'JavaCall' action in DHE: adjust_object('Label1',200,530);
What do you think? Am i missing something?
|
|
|
T00N
Super User
573 Posts |
Posted - 09 Dec 2006 : 08:51:01
|
?
I don't see any difference?! |
|
|
Waldorf
Super User
Belgium
284 Posts |
Posted - 09 Dec 2006 : 10:41:52
|
??? It's all in the mind ;-) |
* "Happiness" is making -> The <- Choice! *
|
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 09 Dec 2006 : 12:21:35
|
For Internet Explorer it's very simple to do but for other browsers I think not... I'll create this feature when it will be compatible with many browsers as possible ;-) |
Regards, Davide |
|
|
wij2
Novice
10 Posts |
Posted - 10 Dec 2006 : 08:18:51
|
Hi Toon and Waldorf,
Strange that you don't dee any diff: - go to www.wij-2.nl - click on Wij2-logo - enter known userid/pwd - click on 'Aerobic Combi Fit'-button - make size of browser-window smaller - ... you'll now see the diff - do the same with the 'wie zijn wij'-page; the text on this page is not resizing...
With me again?
Regards,
Marco. |
|
|
T00N
Super User
573 Posts |
Posted - 10 Dec 2006 : 08:27:46
|
Nope,
I tried both and both look the same. I measured you're page and it both cases it's 800px wide. |
|
|
wij2
Novice
10 Posts |
Posted - 10 Dec 2006 : 13:13:09
|
Hmmm.. that's strange or we are not on the 'same page' or you doing something different. Are you using IE?
The size in pixs will not change but the text-box will (should) resize while the browser-screen is resizing. |
|
|
T00N
Super User
573 Posts |
Posted - 10 Dec 2006 : 13:30:18
|
hmm, texbox size stays 550px
I'm using firefox btw. |
|
|
Waldorf
Super User
Belgium
284 Posts |
Posted - 10 Dec 2006 : 15:01:31
|
I'm juicing Opera [2 :D]...no diff.
* |
* "Happiness" is making -> The <- Choice! *
|
Edited by - Waldorf on 10 Dec 2006 15:04:09 |
|
|
wij2
Novice
10 Posts |
Posted - 17 Dec 2006 : 10:37:28
|
OK, that explains why Toon and Waldorf don't see any difference!
As I mentioned in my post of '09 Dec 2006 : 01:14:20', right now it is only supporting IE.
I need to work on it to also support other browsers.
Thanks for testing! |
|
|
|
Topic |
|