Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to have javascript and frames together in a website

Status
Not open for further replies.

user2

Technical User
Aug 10, 2001
70
US
I need to have javascript and frames together at an intermidiate level in my website. MY earliar site with frames has no problem . It works fine but it only has (preload function and form to submit}javascript. Now I need something bigger, better.What should I watch out for with problems with frames? Is it easier to do it in dreamweaver? I have not used dreamweaver yet.
 
The frames are just 2 or 3 pages put together. You can have your java script in each or some of them and they should all wwork as normal.
Yes, dreamweaver is good.
 
Dreamweaver is great - IMHO best.
Answer for user2:
Yep. Things work fine, and JavaScript from one frame can access objects in other frames.
The main thing you should watch out for IMHO is to ensure cross-browser compatibility. For example, IFRAMES only work in IE, and the DOM for netscape and IE differs in places. When accessing frames, tads or divs, Try to use document.getElementById[id]..... instead of other, browser specific references.

Question for sirjon.
Can a page within a frame call a function in the parent frame without any tweaking? or to put it another way:
When functions are declared, is their scope document wide?

user2: I've just finished the first phase of a Iframe'd website - you may find some code of use at (if you use any code, pls credit it to me/author) Mixed Linux/Win2000 Network Administrator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top