a problem with frames

Discussion in 'Javascript' started by lookon, May 22, 2009.

  1. lookon

    lookon Guest

    I want to enable keyboard shot-cut in my site. And my site uses
    frames. But when the frame reload, the javascript in the father page
    will make no use. Anyone can give me some help?
    lookon, May 22, 2009
    #1
    1. Advertising

  2. lookon wrote:
    > I want to enable keyboard shot-cut in my site. And my site uses
    > frames. But when the frame reload, the javascript in the father page
    > will make no use. Anyone can give me some help?


    ,-<http://jibbering.com/faq/#posting>
    |
    | 1.3 What should I do before posting to comp.lang.javascript?


    PointedEars
    Thomas 'PointedEars' Lahn, May 22, 2009
    #2
    1. Advertising

  3. lookon

    lookon Guest

    mycode is:

    <html>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
    <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="/js/jquery.hotkeys-0.7.9.min.js"></
    script>
    <script type="text/javascript">
    function test(){
    jQuery(document).bind('keydown', {combi:'h',disableInInput:
    true},function (evt){
    f3.document.location = "/index.html";
    });
    }

    jQuery(document).ready(test);
    </script>
    <head>
    <title>SJTUBBS2</title>
    </head>
    <frameset name="topframe" border="0" frameborder="0" framespacing="2"
    framemargin="0" cols="150,*">
    <frame name="f2" framespcing="2" src="bbsleftnew">
    <frameset onload="rightframe_onload()" id="rframe"
    name="rightframe" rows="0, *, 20" >
    <frame scrolling="no" marginwidth="4" marginheight="0"
    framespacing="0" name="fmsg" id="fmsg" src='getmsg.html'>
    <frame framespacing="2" name="f3" >
    <frame scrolling="no" marginwidth="4" marginheight="1"
    framespacing="1" name="f4" id="f4" src='/php/redir2.php?u=foot '>
    </frameset>
    </frameset>
    </html>


    When I enter the key "h", the "f3" frame will load "/index.html".
    However, when enter "h" next time, the javascript does not work. I
    thinks the problem is that jQuery(document).ready does not work the
    the frame reload. How to solve it?

    On May 23, 5:19 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > lookon wrote:
    > > I want to enable keyboard shot-cut in my site. And my site uses
    > > frames. But when the frame reload, the javascript in the father page
    > > will make no use. Anyone can give me some help?

    >
    > ,-<http://jibbering.com/faq/#posting>
    > |
    > | 1.3 What should I do before posting to comp.lang.javascript?
    >
    > PointedEars
    lookon, May 23, 2009
    #3
  4. lookon

    Evertjan. Guest

    lookon wrote on 23 mei 2009 in comp.lang.javascript:

    > mycode is:


    [Please do not toppost on usenet]

    >
    > <html>
    > <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />


    Why specify a character set in a frames page?

    > <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>


    Why ask for jquery knowledge in a NG that thinks [rightly so, methinks]
    that jquery is crap?

    > <script type="text/javascript" src="/js/jquery.hotkeys-0.7.9.min.js"></
    > script>


    [...]

    > Subject Re: a problem with frames


    You have no problem with frames, but with jquery.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., May 23, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Powerslave2112

    From Frames to no frames?

    Powerslave2112, Jan 20, 2004, in forum: HTML
    Replies:
    2
    Views:
    580
    brucie
    Jan 20, 2004
  2. Philip
    Replies:
    3
    Views:
    958
    Karl Groves
    Jun 28, 2004
  3. Ale

    Frames or not Frames...

    Ale, Aug 3, 2005, in forum: HTML
    Replies:
    17
    Views:
    952
    Adrienne
    Aug 5, 2005
  4. Replies:
    1
    Views:
    993
    dorayme
    Feb 10, 2006
  5. Replies:
    0
    Views:
    1,198
Loading...

Share This Page