Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 How to create label with dynamic size
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wij2
Novice

10 Posts

Posted - 05 Dec 2006 :  22:13:16  Show Profile  Visit wij2's Homepage  Reply with Quote
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  Show Profile  Visit arov's Homepage  Reply with Quote
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::
Go to Top of Page

T00N
Super User

573 Posts

Posted - 06 Dec 2006 :  12:11:02  Show Profile  Visit T00N's Homepage  Reply with Quote
I don't think this is possible in dhe.
Go to Top of Page

arov
Super User

Italy
448 Posts

Posted - 06 Dec 2006 :  13:55:36  Show Profile  Visit arov's Homepage  Reply with Quote
??? I have not understood the question ???

::arov::
Go to Top of Page

arov
Super User

Italy
448 Posts

Posted - 06 Dec 2006 :  13:58:56  Show Profile  Visit arov's Homepage  Reply with Quote
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
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 07 Dec 2006 :  17:59:52  Show Profile  Visit Waldorf's Homepage  Reply with Quote
not possible

*
"Happiness" is making -> The <- Choice!
*
Go to Top of Page

wij2
Novice

10 Posts

Posted - 08 Dec 2006 :  15:54:03  Show Profile  Visit wij2's Homepage  Reply with Quote
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?
Go to Top of Page

wij2
Novice

10 Posts

Posted - 09 Dec 2006 :  01:14:20  Show Profile  Visit wij2's Homepage  Reply with Quote
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?

Go to Top of Page

T00N
Super User

573 Posts

Posted - 09 Dec 2006 :  08:51:01  Show Profile  Visit T00N's Homepage  Reply with Quote
?

I don't see any difference?!
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 09 Dec 2006 :  10:41:52  Show Profile  Visit Waldorf's Homepage  Reply with Quote
???
It's all in the mind ;-)

*
"Happiness" is making -> The <- Choice!
*
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 09 Dec 2006 :  12:21:35  Show Profile  Visit s.dav's Homepage  Reply with Quote
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
Go to Top of Page

wij2
Novice

10 Posts

Posted - 10 Dec 2006 :  08:18:51  Show Profile  Visit wij2's Homepage  Reply with Quote
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.
Go to Top of Page

T00N
Super User

573 Posts

Posted - 10 Dec 2006 :  08:27:46  Show Profile  Visit T00N's Homepage  Reply with Quote
Nope,

I tried both and both look the same.
I measured you're page and it both cases it's 800px wide.
Go to Top of Page

wij2
Novice

10 Posts

Posted - 10 Dec 2006 :  13:13:09  Show Profile  Visit wij2's Homepage  Reply with Quote
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.
Go to Top of Page

T00N
Super User

573 Posts

Posted - 10 Dec 2006 :  13:30:18  Show Profile  Visit T00N's Homepage  Reply with Quote
hmm, texbox size stays 550px

I'm using firefox btw.
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 10 Dec 2006 :  15:01:31  Show Profile  Visit Waldorf's Homepage  Reply with Quote
I'm juicing Opera [2 :D]...no diff.

*

*
"Happiness" is making -> The <- Choice!
*

Edited by - Waldorf on 10 Dec 2006 15:04:09
Go to Top of Page

wij2
Novice

10 Posts

Posted - 17 Dec 2006 :  10:37:28  Show Profile  Visit wij2's Homepage  Reply with Quote
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!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000