473,503 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Frame destruction

dmjpro
2,476 Top Contributor
I can simulate a frame destruction by make the frame invisible. But if i want to totally destroy the frame then i tried a code ..but it not working properly ... just .. simply could invalidate the frame ..but still i could get the frame object reference ..

Please have a look at my code ..
Expand|Select|Wrap|Line Numbers
  1. <frameset rows="50%,50%" border="1">
  2. <frame src="controlPage.html" id="controlFrame" />
  3. <frame src="" id="emptyFrame" />
  4. </frameset>
  5.  
The source code of
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function destroy(){
  3. var emptyFrame = parent.document.getElementById('emptyFrame');
  4. emptyFrame.parentNode.removeChild(emptyFrame);
  5. emptyFrame.src = 'http://www.google.co.in';
  6. alert(emptyFrame);
  7. }
  8. </script>
  9. </head>
  10.  
  11. <body>
  12. <input type="button" name="ClickMe" onclick="destroy()" value="Click Me"/>
  13. </body>
  14.  
If i didn't call removeChild then i could set the src property but if i deleted then i couldn't set the src property. But still i m having the frame reference .. why it's not getting tottaly wiped out .... ?
Mar 21 '09 #1
3 1262
acoder
16,027 Recognized Expert Moderator MVP
Set it to null.
Mar 21 '09 #2
dmjpro
2,476 Top Contributor
Then should i be destroying it by calling removeChild anymore ? I think no ... ;)
Mar 22 '09 #3
dmjpro
2,476 Top Contributor
Sorry what i silly comments i passed ... Sorry!!
Actually i need to destroy ..just to dereference the variable i need set it to null :P
Mar 22 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
9241
by: Kathryn | last post by:
I hope you can help as this is driving me crazy! I have an asp which has 3 frames on it as follows: <FRAMESET rows="50%,*,10%"> <FRAME src="rundetailstop.asp" name="rundetailstop"...
5
1847
by: Gandalf | last post by:
Hello (it's the newbie again). If I have a class class Foo{ public: Foo(){cout<<"Making"<<endl;} ~Foo(){cout<<"Destroying"<<endl;} }; void func(Foo x){}
2
3428
by: Maik Wiege | last post by:
Hi! I want to show a blinking text over my derived CMDIChildWnd-class. The blinking is done by one view which is hold by my frame. I set up a timer and write text to the parent frame, which works...
0
1225
by: Stephan Keil | last post by:
Hi all, consider a class class X { static X& OneX() { static X sgl1; return sgl1; } static X& TheX() { static X sgl2(OneX()); return sgl2; } }; and two source files with global variables
5
4415
by: Frame | last post by:
I'm looking for tutorials or articles considering HTML Frames and how to handle them with Javascript. E.g. samples how Frames can exchange information, can a Frame instruct other Frame to update...
9
2989
by: plahey | last post by:
I have been dabbling in Python for a while now. One of the things that really appeals to me is that I can seem to be able to use C++-style RAII idioms to deal with resource management issues. ...
6
2232
by: Pablo | last post by:
Hello, I am writing a windows application using C++ and BorlandBuilder 6 compiler. It is an event driven program and I need to create objects of some classes written by me. One of the classes...
2
4301
by: Dennis Jones | last post by:
Hello, I have a class that will eventually look something like this: class TTableHolder { private: boost::scoped_ptr<TSessionFSession; boost::shared_ptr<TTableFTable;
7
3394
by: BeautifulMind | last post by:
In case of inheritence the order of execution of constructors is in the order of derivation and order of destructor execution is in reverse order of derivation. Is this case also true in case...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7282
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,...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6998
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...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
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,...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
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...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.