Guest ashughes Posted December 28, 2006 Share Posted December 28, 2006 I have a static web page that has a menu on the side so that when I click on the selected links different information will appear in an IFrame in the page. This is the code for the link:<a href="" onclick="displayFrame('butterfly')">Butterfly Research</a>Here is the JS (contained in the head of the page):<script type="text/javascript"> function displayFrame(folder) { str = "blank.html" if (folder=="butterfly") { str = "index.html" } document.getElementById("frame").src = str }</script>Problem is, when I click the link, the IFrame only displays "index.html" for a split second before it goes back to "blank.html" automatically.There is no other java or anything else, and I am not reloading the page.Maybe someone can offer a suggestion on why this would be doing this, or possibly suggest a better way to do this.Essentially, I want the page to have kind of an Explorer type feel with a folder/file browser down the side so when a user clicks on a file, it brings up a description on the page of what the file does and a link to demo or download a copy of the file.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now