Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 38
Trades: 0
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
 
 
Register now for full access!
Reply     « Reply to help with my script!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.20095 seconds with 12 queries