Click to See Complete Forum and Search --> : frames and javascript
pfchin
02-20-2003, 11:33 PM
Dear all,
i encountered a problem while i m working on a website, i want the javascript is working also in a .htm page that contains 2 frames...
i tried to include the .js file inside the .htm page but if do so the javascript is working but the related frames page couldn't be displayed, it just shows a blank page.
However, if i took off the .js file from the .htm page and included it in the frames page the javascript is not working...
:(
i wonder there is a way or a solutions for this problem??? pls help.... thanks a billion.... and i need it very urgently.... TQ
regards,
pf
Nicodemas
02-21-2003, 02:48 AM
A bit of code, if you please ;)
pfchin
02-21-2003, 03:27 AM
hi, thanks for ur reply... here is the index.htm main page codes...
<html>
<head>
<title>Test Frametitle>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/style.css" rel=STYLESHEET type=text/css>
<!-- here is the .js files where the menu needs -->
<!--<script language=JavaScript src="frames_body_array.js" type=text/javascript></script>
<script language=JavaScript src="mmenu.js" type=text/javascript></script> -->
</head>
<frameset cols="180,99%" border='0'>
<frame name="side" src="frames_side.htm" noresize="yes">
<frame name="main" src="center.htm"></frameset>
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</html>
like wat u see, the main page contains 2 frames... left frame and right frame, left frame is a menu frame and right frame is wat page open by menu.. and the menu is a cross browser menu... tat means it can b viewed when mouseover there and even the sub menu oso can b viewed in the right frames....
however, there is a submenu which need to open a frame page like index.htm in the right frame then it encounters the problem...
the page tat the sub menu open is here:
<html>
<head>
<title>Sub Frame</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows=40,1*" frameborder="NO" border="0" framespacing="0">
<frame name="topFrame" scrolling="NO" src="iqmstop.php" marginwidth="0" marginheight="0" frameborder="NO" >
<frame name="mainFrame" src="login.php" marginheight="0"
marginwidth="0" scrolling="AUTO" frameborder="NO">
</frameset>
<noframes>
<body bgcolor="#CCCCCC" leftmargin="0" topmargin="0" marginwidth="0">
</body>
</noframes>
</html>
the page contains 2 frames... and when i put the 2 files inside the page it can't display out the the 2 frames pages.
coz the menu script files is too large, i get it from a website http://www.milonic.co.uk/menu/frames/frames.zip
pls hav a look.... and thanks for ur patient.
here i enclosed the modified scripts. TQ.
best regards,
pf
eduac
01-13-2004, 07:45 AM
hi dude, this is a good script, but do u have another similar?
Pittimann
01-13-2004, 08:04 AM
Hi!
I don't have time to read 40kb js; anyway from the HTML you posted, I deduct the following:
Neither your external css, nor the external js belongs to one of your frameset documents. You have to place them in the src-file of the frame, where the menu has to appear.
And you also have to make sure, that the links in your menu(s) have the correct target attributes...
Another thing: your second frameset doc specifies a frameset with the attribute rows=40,1*" - I assume, you mean: rows="40,*" because there are only 2 frames inside the set.
Cheers - Pit
eduac
01-13-2004, 08:31 AM
yeap....but my question is, do u have another cross frame menu script?
pfchin
01-13-2004, 08:55 AM
Hi guys,
Thanks for ur helps, really!!! I had solved the problem ;), thanks for ur kindness :).
Regards,
pf.chin
eduac
01-13-2004, 12:01 PM
anybody have another cross frames menu????, because i cant work on with http://www.milonic.co.uk/menu/frames/frames.zip in my code.
Pittimann
01-13-2004, 12:09 PM
Hi!
Whatever menu you use, eduac, and from whereever you take it, it will have to be customized for your purposes.
Maybe you just have a problem with that?
Cheers - Pit
Btw: without seeing any code, nobody can give you an appropriate help; maybe you start your own thread on your topic...
eduac
01-13-2004, 12:52 PM
thanks ....i will try the another way....