User Profile

Collapse

Profile Sidebar

Collapse
darkfact
darkfact
Last Activity: Nov 18 '10, 12:53 AM
Joined: Sep 4 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • darkfact
    replied to change image map onclick
    I sorted it out.
    See more | Go to post

    Leave a comment:


  • darkfact
    started a topic change image map onclick

    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.
    See more | Go to post

  • darkfact
    replied to How to put that link into a function?
    I figured it out.
    See more | Go to post

    Leave a comment:


  • darkfact
    started a topic How to put that link into a function?

    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:
    Code:
    <a href="music/playlist.m3u" onclick="parent.document.getElementById('iframe1' 
    ).contentWindow.PlayM3u(this.href);return false">test</a>
    Now I would like to put it into a function. This is what I've come up with:
    Code:
    function Play(){
    var file = location.href.substring(location.href.lastIndexOf('/')+1);
    ...
    See more | Go to post

  • Thank you very much. The second one works perfectly.
    See more | Go to post

    Leave a comment:


  • darkfact
    started a topic sending a link from one iframe to another

    sending a link from one iframe to another

    This link is in the same iframe as my media player:

    Code:
    <a href="music/playlist.m3u" onclick="PlayM3u(this.href);return false">
    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.

    Thanks
    See more | Go to post

  • 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];
    ...
    See more | Go to post

    Leave a comment:


  • I came up with an answer to part of my question. I can get the file name with this code:

    Code:
    var file = location.href.substring(location.href.lastIndexOf('/')+1);
    	
    	var fileName =file.split('.');
    Now, if I can figure out how to use that information I'll be set.
    See more | Go to post

    Leave a comment:


  • darkfact
    started a topic directing external.js to subdirectory

    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...
    See more | Go to post

  • darkfact
    replied to show/hide div problem
    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?

    thanks
    See more | Go to post

    Leave a comment:


  • darkfact
    replied to show/hide div problem
    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.
    See more | Go to post

    Leave a comment:


  • darkfact
    replied to show/hide div problem
    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...
    See more | Go to post

    Leave a comment:


  • darkfact
    replied to show/hide div problem
    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 #.

    thanks
    See more | Go to post

    Leave a comment:


  • darkfact
    replied to show/hide div problem
    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=
    See more | Go to post

    Leave a comment:


  • darkfact
    started a topic show/hide div problem

    show/hide div problem

    I'm using this code to show and hide a div.


    Code:
    function showDiv(){
    document.getElementById("test").style.visibility="visible"
    }
    
    function hideDiv(){
    document.getElementById("test").style.visibility="hidden"
    }
    The link to hide the div is in another frame and it works fine.

    When it is hidden a background...
    See more | Go to post
No activity results to display
Show More
Working...