Reply
help with my script!!!
Old 07-29-2006, 08:04 PM help with my script!!!
atomicshockwave's Avatar
Experienced Talker

Posts: 38
Hi I have a JS file, for a JS windowing script, I am trying to combine (kinda) 2 functions and need some help.

function 1:

function jsWMLoadWindow(url) {
var window_id;
// Do we have any free windows left in the list?
if(this.free_windows.length < 1) {
var new_id = this.windows.length;
// Create the required HTML for a new window and spit it out
// into the page body. *NOTE* This only creates the outer DIV
// element shell, we rely on the jsWindow.create to create
// the inner content of the html "window"
// document.body.innerHTML += '<div id="window' + new_id + '" class="win" ' +
// 'onClick="WindowManager.setFocus('+new_id+')"></div>';
var new_window = this.new_window(new_id);

window_id = new_id;
} else {
window_id = this.free_windows.pop();
}

// FOCUS NEW WINDOWS
this.set_focus(window_id);



// SHOW IT
//this.windows[window_id].div_elem = document.getElementById("window"+window_id);
//div_elem = document.getElementById("window"+new_id);
this.windows[window_id].div_elem.style.left = 0; // + "px";
this.windows[window_id].div_elem.style.top = 0; // + "px";

this.windows[window_id].div_elem.style.display = "block";
document.getElementById("window"+window_id).style. display = "block";
document.getElementById("windowinner"+window_id).i nnerHTML = window_id;
//this.windows[window_id].div_elem.innerHTML =window_id;


}

and function 2:

function jsWMMinimizeWindow(win_id) {
var window_title = document.getElementById("windowtitle"+win_id).inne rHTML;

// add an entry to the icon bar
this.iconbar.add_item(win_id, window_title);

// finally we hide the window
document.getElementById("window"+win_id).style.dis play = 'none';

}

what i want to do is add the:
var window_title = document.getElementById("windowtitle"+win_id).inne rHTML;

// add an entry to the icon bar
this.iconbar.add_item(win_id, window_title);

to the first script so as to minamize the JS window but keep is visable when it loads.
atomicshockwave is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to help with my script!!!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11368 seconds with 12 queries