User Profile
Collapse
-
change image map onclick
I have an imagemap on my page. The image remains the same but I would like to change from map 1 to map 2 when the image is clicked on. This seems like it should be fairly simple but I can't get it right. Can someone help?
Thanks in advance. -
-
How to put that link into a function?
Logic Ali answered my previous question about how to send a link from one iframe to another:
Now I would like to put it into a function. This is what I've come up with:Code:<a href="music/playlist.m3u" onclick="parent.document.getElementById('iframe1' ).contentWindow.PlayM3u(this.href);return false">test</a>
...Code:function Play(){ var file = location.href.substring(location.href.lastIndexOf('/')+1); -
-
sending a link from one iframe to another
This link is in the same iframe as my media player:
It works fine there but I would like to move it to another iframe. Could someone tell me how to write it so that it would activate my media player from the other iframe.Code:<a href="music/playlist.m3u" onclick="PlayM3u(this.href);return false">
Thanks -
Well, it was actually pretty simple. It just took me a while to figure it out.
...Code:function change2(){ var file = location.href.substring(location.href.lastIndexOf('/')+1); var fileName =file.split('.',1); var gotoplaylist = [fileName] + "/" + 'playlist.html'; top.parent.center.location="test4.html"; top.parent.leftside.iframe1.location.href = [gotoplaylist];Leave a comment:
-
I came up with an answer to part of my question. I can get the file name with this code:
Now, if I can figure out how to use that information I'll be set.Code:var file = location.href.substring(location.href.lastIndexOf('/')+1); var fileName =file.split('.');Leave a comment:
-
directing external.js to subdirectory
Is there a way in javascript to get the name of the file currently using an external.js?
If I have files named test.html, test2.html, test3.html, etc. and I want to get to a file in a subdirectory with the same name as the html file from an external js. Is there a way to do this?
This is the function in my external js that I want to be able to direct to the subdirectory with the same name as the html file currently... -
In this case my hidden div has windows media player controls in it and it continues to play even when hidden. with display:none, would it close and stop playing?
thanksLeave a comment:
-
I'm only just learning. I didn't understand what you meant by return false before. I added it to the end of my functions. And now I know the proper way to do it.
Thank you.Leave a comment:
-
The page is of a set size in an iframe. So that won't be an issue but for the sake of learning something, I changed it to #nav. The action is taking place in an iframe. There are two divs. One is a page and the other is a transparent image so that you can see a background image that is clickable. So the only page is the hidden div. But if everything was taking place on my main page and there was no iframe, in that case, without adding content...Leave a comment:
-
Thanks for the reply. If what you mean by "jump to the top" is making the div visible, that is what I wanted. Regardless, it works now and all I did was add the #.
thanksLeave a comment:
-
Well after spending a ridiculous amount of time trying to figure out the problem, I figured it out. All I had to do was add an # to the href=Leave a comment:
-
show/hide div problem
I'm using this code to show and hide a div.
The link to hide the div is in another frame and it works fine.Code:function showDiv(){ document.getElementById("test").style.visibility="visible" } function hideDiv(){ document.getElementById("test").style.visibility="hidden" }
When it is hidden a background...
No activity results to display
Show More
Leave a comment: