SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    0 Post(s)
    0 Thread(s)

    Trying to change JS target from a frame in a Frameset to an Inline Frame in an html

    Hi Everyone:

    I have very limited Javascript knowledge. We are trying to switch a page from a frameset (x2 frames) to a regular .html page with an inline frame. The javascript is in the main content area. It writes links to the side column frameset. My boss wants to do away with the frames and have the javascript write to the inline frame. Here is the code that I think applies (in yellow):

    // Simple error check to make sure that there are markers in the file.
        if (iNumMarkers != -1) {
    	// "For" loop which creates all of the inline JavaScript anchor tags
    	for (var i = 1; i <= iNumMarkers; i++) {
    		sTempString = sTempString + "<A HREF=\"javascript:parent.frames[1].seekToMarker(";
    		sTempString = sTempString + i + ")\">";
    		sTempString = sTempString + document.MediaPlayer1.GetMarkerName(i);
    		sTempString = sTempString + "</A><BR>"
    	// Actual code which writes the information to the other frame.
    	parent.frames[0].document.writeln("<HTML><BODY BGCOLOR=\"#ffffff\">");
        } else {
    	alert("There are no Markers in this file");
    I don't know how to change the "parent.frames[0].document.writeIn to write in the inline frame. The inline frame's actual page name is: menu.html and the id of the inline frame is: menumarker. The inline frame is located in a page called: player.html

    Thanks for any help... I need it!

    Edit: More information and attachment.
    The Javascript in the main frame is extracting the data from a separate file. The data is converted to links and placed in the second frame in the frameset automatically. (The links are so that viewers can click and be taken to specific topics/parts of the media player file. If it helps, I have now attached the file with the javascript as a txt file. Thanks again.
    Attached Files Attached Files
    Last edited by mechman2; Jul 31, 2007 at 22:18.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts