Solved

Script suggetion...

Posted on 2002-05-23
5
191 Views
Last Modified: 2006-11-17

Hi...

I have this code... and want to take your opinion about
applying needed modifications:


<<<< Start Code >>>>>>>

<script language="javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);setInterval("a()",10);
setInterval("b()",1000000);self.focus();function a(){}
function b(){self.focus()};
</script>

<<<< End  Code  >>>>>>>



Here is what it *currently* does:
**It maximize the window to the full screen.
**It activates the window (so if there are other windows opened
this one become active
**It re-activates the window every 10 minuets (1000000 Milliseconds).


What i want it to do:
**Maximize the window to full screen.
** Do  >NOT< activate the window, so if there are
other windows.... this one remains in the background (not the active
window).
** After 10 minuets, it activates the window (i.e. send it from
the background to the main active window).

Can this be done? how?

thanks.

0
Comment
Question by:innovator
5 Comments
 
LVL 7

Accepted Solution

by:
axis_img earned 200 total points
Comment Utility
Try adding self.blur() in the code so that it hides itself below any active windows when it loads. For your example, it would be:

<script language="javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);setInterval("a()",10);
self.blur();
setInterval("b()",1000000);self.focus();function a(){}
function b(){self.focus()};
</script>


Try this and let me know if this is what you are wanting...
Barry
0
 
LVL 30

Expert Comment

by:third
Comment Utility
and remove self.focus(),


<script language="javascript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);setInterval("a()",10);
setInterval("b()",1000000);
self.blur();
function b(){self.focus()};
</script>

0
 
LVL 7

Expert Comment

by:axis_img
Comment Utility
Yep... Didn't see the redundancy there. Wonder why that was there in the first place. It does not hurt anything, but just redundant nonetheless.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
I wonder if it will resize and move while it is blurred, if so perhaps the self.blur() should be the first statement
0
 

Author Comment

by:innovator
Comment Utility
yes it worked. Thanks everybody.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now