473,769 Members | 6,739 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FAQ Topic - How do I modify the current browser window?

-----------------------------------------------------------------------
FAQ Topic - How do I modify the current browser window?
-----------------------------------------------------------------------

In a default security environment you are very limited in how much
you can modify the current browser window. You can use
` window.resizeTo ` or ` window.moveTo ` to resize or move a
window respectively, but that is it. Normally you can only
suggest chrome changes in a ` window.open `

http://msdn.microsoft.com/workshop/a...ods/open_0.asp
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javas cript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers.

Mar 15 '07 #1
31 3543
In comp.lang.javas cript message <45************ ***********@new s.sunsite.
dk>, Thu, 15 Mar 2007 00:00:02, FAQ server <ja********@dot internet.be>
posted:
>FAQ Topic - How do I modify the current browser window?
To an incomer, that might be taken as referring to modifying the
displayed contents. Something like "... current browser window
properties?" might help. Any better offers?

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk DOS 3.3, 6.20 ; WinXP.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <URL:http://www.merlyn.demo n.co.uk/programs/00index.htm>
My DOS <URL:http://www.merlyn.demo n.co.uk/batfiles.htm- also batprogs.htm.
Mar 16 '07 #2
Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:
In comp.lang.javas cript message <45************ ***********@new s.sunsite.
dk>, Thu, 15 Mar 2007 00:00:02, FAQ server <ja********@dot internet.be>
posted:
>>FAQ Topic - How do I modify the current browser window?

To an incomer, that might be taken as referring to modifying the
displayed contents. Something like "... current browser window
properties?" might help. Any better offers?
Current browser window size and/or position on the screen.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 16 '07 #3
In comp.lang.javas cript message <Xn************ ********@194.10 9.133.242>
, Fri, 16 Mar 2007 16:13:47, Evertjan. <ex************ **@interxnl.net >
posted:
>Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:
>In comp.lang.javas cript message <45************ ***********@new s.sunsite.
dk>, Thu, 15 Mar 2007 00:00:02, FAQ server <ja********@dot internet.be>
posted:
>>>FAQ Topic - How do I modify the current browser window?

To an incomer, that might be taken as referring to modifying the
displayed contents. Something like "... current browser window
properties?" might help. Any better offers?

Current browser window size and/or position on the screen.
Except that a Subject Line ought to be a single line, when the window
width allows 72 characters of default text. And 'properties' also
applies to modification of other window features.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v6.05 MIME.
<URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demo n.co.uk/clpb-faq.txt RAH Prins : c.l.p.b mFAQ;
<URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zipTimo Salmi's Turbo Pascal FAQ.
Mar 16 '07 #4
"Evertjan." <ex************ **@interxnl.net wrote in
news:Xn******** ************@19 4.109.133.242:
Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:
>In comp.lang.javas cript message <45************ ***********@new s.sunsite.
dk>, Thu, 15 Mar 2007 00:00:02, FAQ server <ja********@dot internet.be>
posted:
>>>FAQ Topic - How do I modify the current browser window?

To an incomer, that might be taken as referring to modifying the
displayed contents.
Actually, you can use "document.write " to rewrite the entire page. Be
careful about what you put into the head and body sections, because you
essentially destroy the original script used to create what you write.

I have found as well that it helps to make judicious use of "setTimeout " in
order to prevent a multithreaded browser from clobbering the code if the
thread executing the script gets ahead of the one creating it.

In a way, you can write self-modifying code even if your entire web site is
on a static server. It can serve as a method to "hide" things from script
kiddies, because by the time he uses the "View Source" command, the
original code is gone. (Of course, a hax0r knows how to see the original.)
Mar 17 '07 #5
Mike Duffy said the following on 3/16/2007 6:39 PM:
"Evertjan." <ex************ **@interxnl.net wrote in
news:Xn******** ************@19 4.109.133.242:
>Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:
>>In comp.lang.javas cript message <45************ ***********@new s.sunsite.
dk>, Thu, 15 Mar 2007 00:00:02, FAQ server <ja********@dot internet.be>
posted:

FAQ Topic - How do I modify the current browser window?
To an incomer, that might be taken as referring to modifying the
displayed contents.

Actually, you can use "document.write " to rewrite the entire page. Be
careful about what you put into the head and body sections, because you
essentially destroy the original script used to create what you write.
Which has nothing to do with the FAQ entry.
I have found as well that it helps to make judicious use of "setTimeout " in
order to prevent a multithreaded browser from clobbering the code if the
thread executing the script gets ahead of the one creating it.
There are no "multithrea ded browsers" and/or script engines.
In a way, you can write self-modifying code even if your entire web site is
on a static server. It can serve as a method to "hide" things from script
kiddies, because by the time he uses the "View Source" command, the
original code is gone. (Of course, a hax0r knows how to see the original.)
It doesn't even take a "hax0r" (whatever that me be), it simply takes a
decent browser.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 17 '07 #6
Randy Webb <Hi************ @aol.comwrote in
news:DN******** ************@gi ganews.com:
Mike Duffy said the following on 3/16/2007 6:39 PM:
>"Evertjan." <ex************ **@interxnl.net wrote in
news:Xn******* *************@1 94.109.133.242:
>>Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:

In comp.lang.javas cript message
<45********* **************@ news.sunsite. dk>, Thu, 15 Mar 2007
00:00:02, FAQ server <ja********@dot internet.bepost ed:

FAQ Topic - How do I modify the current browser window?
>Actually, you can use "document.write " to rewrite the entire page.
Which has nothing to do with the FAQ entry.
Re-writing the entire page should modify the browser window. Or is there a
distinction between the content of the window and properties of the window?
Both contents and properties would seem to be components.
There are no "multithrea ded browsers" and/or script engines.
I noticed that the setTimeout would allow the reload to execute, so I guess
I made a bad assumption. If you leave it out, you end up with a completely
blank page. Multiple threads in the browser could explain this behaviour,
but I am willing to accept your assertion that they do not come into play.
So what else could it be?
It doesn't even take a "hax0r" (whatever that me be),
It was a (lame) attempt at a joke. It's how script kiddies spell "hacker".
Mar 17 '07 #7
Mike Duffy said the following on 3/17/2007 9:10 AM:
Randy Webb <Hi************ @aol.comwrote in
news:DN******** ************@gi ganews.com:
>Mike Duffy said the following on 3/16/2007 6:39 PM:
>>"Evertjan." <ex************ **@interxnl.net wrote in
news:Xn****** **************@ 194.109.133.242 :

Dr J R Stockton wrote on 15 mrt 2007 in comp.lang.javas cript:

In comp.lang.javas cript message
<45******** *************** @news.sunsite. dk>, Thu, 15 Mar 2007
00:00:02, FAQ server <ja********@dot internet.bepost ed:
>
>FAQ Topic - How do I modify the current browser window?
>>Actually, you can use "document.write " to rewrite the entire page.
>Which has nothing to do with the FAQ entry.

Re-writing the entire page should modify the browser window. Or is there a
distinction between the content of the window and properties of the window?
Both contents and properties would seem to be components.
With respect to that FAQ Entry, the "window" is the toolbars, borders
and such. The content is covered in 4.15 with DynWrite.
>There are no "multithrea ded browsers" and/or script engines.

I noticed that the setTimeout would allow the reload to execute, so I guess
I made a bad assumption. If you leave it out, you end up with a completely
blank page. Multiple threads in the browser could explain this behaviour,
but I am willing to accept your assertion that they do not come into play.
So what else could it be?
It is a timing issue where the display won't get updated until current
script finishes executing. The setTimeout introduces a delay by causing
script execution to stop and start over. During that delay the display
gets updated.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 17 '07 #8
VK
On Mar 17, 10:16 pm, Randy Webb <HikksNotAtH... @aol.comwrote:
I noticed that the setTimeout would allow the reload to execute, so I guess
I made a bad assumption. If you leave it out, you end up with a completely
blank page. Multiple threads in the browser could explain this behaviour,
but I am willing to accept your assertion that they do not come into play.
So what else could it be?

It is a timing issue where the display won't get updated until current
script finishes executing. The setTimeout introduces a delay by causing
script execution to stop and start over. During that delay the display
gets updated.
Right, see the provisional FAQ entry at
http://groups.google.com/group/comp....470812c5e4d3b5

P.S. If FAQ Editor is anywhere around: are the technical problems
solved by now to add the FAQ to the common list?
Mar 17 '07 #9
VK said the following on 3/17/2007 5:46 PM:
On Mar 17, 10:16 pm, Randy Webb <HikksNotAtH... @aol.comwrote:
>>I noticed that the setTimeout would allow the reload to execute, so I guess
I made a bad assumption. If you leave it out, you end up with a completely
blank page. Multiple threads in the browser could explain this behaviour,
but I am willing to accept your assertion that they do not come into play.
So what else could it be?
It is a timing issue where the display won't get updated until current
script finishes executing. The setTimeout introduces a delay by causing
script execution to stop and start over. During that delay the display
gets updated.

Right, see the provisional FAQ entry at
http://groups.google.com/group/comp....470812c5e4d3b5
With "provisiona l" being the ky word
P.S. If FAQ Editor is anywhere around: are the technical problems
solved by now to add the FAQ to the common list?
"add the FAQ to the common list"? WTF are you talking about? Or do you
even know?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 17 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
263
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current page in a browser? ----------------------------------------------------------------------- Using the DOM and Microsoft's innerHTML extension, the following would be sufficient to modify the content of any element that can have content: `` <div id="anID">Some Content</div'' with script of ``...
4
426
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current browser window? ----------------------------------------------------------------------- In a default security environment you are very limited in how much you can modify the current browser window. You can use ` window.resizeTo ` or ` window.moveTo ` to resize or move a window respectively, but that is it. Normally you can...
1
1281
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current page in a browser? ----------------------------------------------------------------------- Using the DOM the non-standard but widely implemented innerHTML extension, the following would be sufficient to modify the content of any element that can have content: ` <div id="anID">Some Content</div` with script of `...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.