Solved

JavaScript path syntax for iframe "location="

Posted on 2004-10-28
334 Views
Last Modified: 2008-02-07
This works:

function go_products()
{
parent.frames.i_body.location="products.htm"
}

This doesn't:

function go_products()
{
parent.frames.i_body.location="../folder/subfolder/products.htm"
}

Help with the path syntax, please?  TIA

0
Question by:johntmciii
    4 Comments
     
    LVL 15

    Expert Comment

    by:justinbillig
    parent.frames.i_body.location="www.domain.com/folder/subfolder/products.htm"
    0
     

    Author Comment

    by:johntmciii
    I was hoping there was a more dynamic way of assigning the path?  I would have to publish my test stuff to make the above work.
    0
     
    LVL 31

    Expert Comment

    by:GwynforWeb
    I believe it is

    "file:///../folder/subfolder/products.htm"
    0
     
    LVL 31

    Accepted Solution

    by:
    the above does not work, this does

    <a href="../graphics/GR02.htm" target="frame1">Graphics</a>
    <a href="../SimplePackage.htm" target="frame1">Package</a>
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    A common challenge, or question, when working with two calendar dates is: What is the difference between the specified days? As is frequently the case, the answer is: It depends... What kind of difference do you want? Given two date obje…
    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now