a problem with frames

L

lookon

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?
 
T

Thomas 'PointedEars' Lahn

lookon said:
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
 
L

lookon

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?
 
E

Evertjan.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top