943,907 Members | Top Members by Rank

Ad:
Sep 12th, 2008
0

For my website i need floating window

Expand Post »
Hi,
I am working on one website for that i need like floating window. (mean when visitor will open the website that window has to come and it should be timelimit aftr that it has to close atomatically. for that window more and close is required).


Cheersssss,
Kavithakesav
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
kavithakesav is offline Offline
52 posts
since Nov 2007
Sep 12th, 2008
0

Re: For my website i need floating window

Assuming that this your index.html
html Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>index page</title>
javascript Syntax (Toggle Plain Text)
  1. <script type="text/javascript">
  2. <!--
  3. window.onload = function()
  4. {
  5. /* You must replaced this with your own page that you wish to be loaded */
  6.  
  7. window.open('floating.html', targe='_blank', 'toolbar = no, scrollbars = no, location = no, width = 500, height = 500');
  8. }
  9. //-->
  10. </script>
html Syntax (Toggle Plain Text)
  1. </head>
  2. <body>
  3.  
  4. </body>
  5. </html>

And this will be our floating window, clocked for 10secs and when it reaches its limit this wil automaticaly close!
Enjoy coding...

html Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>floting page</title>
javascript Syntax (Toggle Plain Text)
  1. <script type="text/javascript">
  2. <!--
  3. ////////////////////////////////////////
  4. /////////////By Essential///////////
  5. ////////////////////////////////////////
  6.  
  7. window.onload = clocked; function clocked()
  8. {
  9. x = 10;
  10. var timer = setTimeout('clocked()', 1000);
  11. x = x - timer;
  12.  
  13. document.getElementById('countdown').innerHTML = 'You still have 0' + x + ' sec. remaining before this window close!';
  14. if ( timer == 10 ) { clearTimeout( timer );window.close(); }
  15. }
  16.  
  17. //-->
  18. </script>
html Syntax (Toggle Plain Text)
  1. </head>
  2. <body>
  3. <p align="center">
  4. <span id="countdown">&nbsp;</span>
  5. <p>
  6. </body>
  7. </html>
Featured Poster
Reputation Points: 114
Solved Threads: 138
Posting Shark
essential is offline Offline
973 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: help ajax and image
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: AJAX Dropdown menu to text field population





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC