Closed Thread Icon

Preserved Topic: Brattas "windows" onresizebrowser help.. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18440" title="Pages that link to Preserved Topic: Brattas &amp;quot;windows&amp;quot; onresizebrowser help.. (Page 1 of 1)" rel="nofollow" >Preserved Topic: Brattas &quot;windows&quot; onresizebrowser help.. <span class="small">(Page 1 of 1)</span>\

 
sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-24-2002 13:54

Hi all..

I'm attempting to use Brattas (www.dhtmlcentral.com) windows script.

Its all gone pretty well - apart from one thing.. I need the content windows to resize if the browser window resizes.. I even think all of the funtions required are already there, I just can't get the damn thing to fire when the window resizes...

Can anyone help? Please!?
http://www.sonicsnail.com/bratta

cheers,

Pete

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-24-2002 16:56

sonicsnail, not quite

All of the resize stuff you see in that code is for reflowing the content of the dhtml windows when they resize. It has no provision for linking the browser resizing to the sizing of the dhtml windows.

Unless Bratta has scripts specifically for that, you're going to have to add that functionality. If you're up to it, it might be possible to do that. I'm not sure just how involved it would be. I'll be checking in later today to how this thread goes.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-24-2002 23:45

Thanks for the input Bugimus..

If you check out the dhtmlcentral.com front page, the windows in use there DO resize with the browser...

I've had a look at his code with no success in figuring it out.. care to have a look? See if you can spot what I'm missing?

Theres a function in there called "createwindow" - surely its just a matter of firing that function on browser-resize??

or anyone else?!

thanks,

Pete.



[This message has been edited by sonicsnail (edited 03-24-2002).]

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-25-2002 05:25

Yes, indeed they do. Lemme see what he's calling to do that.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-25-2002 15:17

No joy?

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-25-2002 17:37

Well, I found some resize code in his coolmenus script from the main page but it still doesn't look like the windowscripts by themselves are built with that functionality.

I even went to his forums, and saw your question there too btw , and there were about 4 other posts asking this exact same question. None of them had any useful answers except one. And it simply said to write your own resize function

So, not much joy in all of that, sorry. I can keep looking at his main page code to see just how he is linking the window resizing to the page resizing. It's not real obvious to me at this point because of his coding style.

. . : newThing

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-25-2002 18:14

Thanks Bugs.. I appreciate your time and efforts..

Yeah.. I also posted on the DHTMLcentral forum.. no joy there yet either.. though a search through their archives did find a few similar queries - it would seem that this script just doesn't lend itself well to this alteration. I'm wishing I had the know-how to start from scratch.

I'm kind of hoping that maX or InI will jump in with some wisdom pearls.. I don't believe for a second that this is beyond the gurus here (though maybe the time/work involved is beyond reasonable expection..).

BTW - your newThing ---^ is very cool!

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-25-2002 18:26

Would it be a (simple) possibility to just *refresh* the page onresize?.. What I don't want is to incurr a further server-hit/load-time - but if its going to redraw the page from the cache that might be ok???

hmmm?

Another Thought!:

Isn't it possible to re-run ALL the DHTML on a page at once.. kind of onresize="all_functions()" kind of idea? Sort of redrawing whats there without a refresh?



[This message has been edited by sonicsnail (edited 03-25-2002).]

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-25-2002 21:26

================================
--------------- I DID IT! --------------------
================================

Yes, I worked it out.. all on my lonesome... after *too* long staring at the code, I managed to slowly learn what it did..

I basically made my own function that re-runs the create_window function...

I haven't tested in NS4 - I think I'll have to document.reload for those peeps... and it isn't perfect as "maximising" only makes the window as big as the browser *was*.. PLUS I have to declare each window twice.. but I've only got 4 (and might go as high as 6 maybe) so thats no biggy.

BUT I am SO happy.. and learned a LOT in the process.

I'll upload it in a minute so you can check out my hack.

If anyone wants to help address - the NS4 issue, maximising issue, and double declaration - I'm all ears!!



Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-25-2002 23:12

Wonderful!!!

That was a lot simpler than I had anticipated. Without knowing what all his code is doing it's hard to know what calling createwindow would do repeatedly.

As a test to see if that was what he was doing I moved one of your windows out of its original placement and resized. The window snapped back to its original spot. This is the exact same behavior I get from Bratta's home page.

Congrats!!!

. . : newThing

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-25-2002 23:59

Thanks Bugs..

one small favour -

can you identify which variable I need to redeclare so that after resizing the browser, the "maximise" function works correctly for the new browser size?? At present, when I do this it "remembers" the previous browser width/height and max's to those dimensions...

though I dare say another 24 hours and I'll stumble upon it!

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-26-2002 00:58

function lib_doc_size(){ //Page positions - needed!
this.x=0;this.x2=bw.ie && document.body.offsetWidth-20

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-26-2002 01:26

winpage.x2 and winpage.y2 need to be updated for the windows to maximize to the new browser size. The win_maximize function uses them to calculate how big to make them.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-26-2002 01:42

Ok, I think I found it. Instead of calling lib_doc_size() by itself in your trythis(), do this:

winpage=new lib_doc_size()

That will update the winpage members x2 and y2 for the maximize. I hope that works!

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 03-26-2002 01:45

I just read the netscape part of your troubles. Just reload the page if you have NN4

function trythis(){
if(!bw.ns4){ //Due to the netscape 4 resize bug we reload the page for netscape
winpage=new lib_doc_size()
create_window(0,"200","100",Peteswidth2,"200","#EAFAFA","#ffffcc");
create_window(1,"200","305",Peteswidth2,"100","#EAFAFA","#ffffcc");
create_window(2,Peteswidth3,"410",Peteswidth4,"100","#EAFAFA","#ffffcc");
create_window(3,"200","410",Peteswidth4,"100","#EAFAFA","#ffffcc");
} else location.reload() //NS4 RELOAD
}

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 03-26-2002 02:06

Thanks Bugs, you hit the nail on the head.

I had trawled through the same bits, and had tried

newpage=new lib_doc_size()

which gave no errors but didn't work..

This site's going to be very exciting to work on indeed. I've got a PHP developer on board who's going to put a big fat engine behind the site to allow Evanton's council, organisations, etc can post local news and events, along with discussion, chat and a Wireless "Metropolitan Area Network".

Thanks again for helping me out - the sites workings are pretty cool now, and once I decide how to deploy some sweet graphics, I think I'm onto a winner.. (don't critique it yet though cos I know theres loads I need to fix!)

Now I must go to bed (1am).. work in the morning. Kind of a two-jobs at the minute - bags under the eyes etc, but loving it :-)

Pete

« BackwardsOnwards »

Show Forum Drop Down Menu