-2

i have two framesets like below

<FRAMESET ROWS="*, 0">   
   <FRAME SRC="index.php" FRAMEBORDER=0 id="contentfrm" name="contentfrm">
   <FRAME SRC="music.php" FRAMEBORDER=0 id="musicfrm" name="musicfrm" NORESIZE SCROLLING="no" >  
  </noframes>    
</FRAMESET><noframes></noframes>

My first frame is website with full screen,second frame have some music player,

so when user clicking on first frame link i need to add some loading animation for full page,

i can track the click event of the first frame site within second frame.

but i don't know how to append some contents to html of page for 4-5 seconds (html of the current page not the frame ).

can anyone tell me how to cover the page(append some html to page for little time) for 5-6 second when i click on first frameset link thank you

Suneth Kalhara
  • 1,116
  • 4
  • 16
  • 40
  • http://stackoverflow.com/questions/4263509/why-are-frames-deprecated-in-html please read this. use an iframe. FRAMES have been deprecated. – rlemon May 12 '12 at 14:29
  • can't site is up and running nicely ;) i asking about something like : Displaying a div layer over a frameset? – Suneth Kalhara May 12 '12 at 14:31
  • not for long... DEPRECIATED means it will soon be removed. then your site will fail to function on all modern browsers. – rlemon May 12 '12 at 14:34
  • no worries, works on iPad nicely :) – Suneth Kalhara May 12 '12 at 14:38
  • [Frames are obsolete in HTML5](http://en.wikipedia.org/wiki/HTML_element#Frames) sorry they are not deprecated. but they will be. I do suggest if this is a production site and not just some hobby that you stop using frames in lieu of iframes. – rlemon May 12 '12 at 14:41
  • nope nt a hobby, only a serious solution :) do u know the answer for abv one – Suneth Kalhara May 12 '12 at 14:42
  • 1
    Dont use FRAMES... use iframes and then it's an element sitting in your document that you can play with normally. **Frames should not be used anymore!** – rlemon May 12 '12 at 14:47

1 Answers1

0

you can use delay on jquery - but if you want to allow users to cancel loading frame two you should use this code:

$('#contentfrm').click(function(){
   $('.animationgif').show();
   time = setTimeout(function() {
        $('.animationgif').hide();
        $('#musicfrm').show();
    },500);
});
$('.cancel').click(function(){
   $('.animationgif').hide();
   clearTimeout(time);
});
M Rostami
  • 4,035
  • 1
  • 35
  • 39
  • not working, i mean overlay div full of the page when user clicks on first frameset link ) – Suneth Kalhara May 12 '12 at 14:37
  • if i understand your mean - so you can set z-index in css to farameset low than animation div z-index and set position:absolute to animation element – M Rostami May 12 '12 at 15:00