/    Sign up×
Community /Pin to ProfileBookmark

Using the DOM between frames (i think)

Hello everybody.

I’ve tried searching a decent amount for anything on this topic. Here’s the basic concept: I would like to create a page containing two frames(name=”left”, “right”. One (the left) has links in it and the other (the right) only has a div (id=”one”) with some text in it. so I’d like to create a link in the left that onClick or onMouseOver changes the text in the div that is in the right frame. So the question is, is that div reference-able, and if so, can I change the text within it (.value maybe)?

thanks for any feedback

  • Brian
  • [EDIT]

    here’s the code i’ve been trying to use to do this:

    [code=php]
    function changetext(text)
    {
    window.top.right.one.value=text;
    //or parent.right.one.value=text;
    }
    [/code]

    [/EDIT]

    to post a comment
    JavaScript

    4 Comments(s)

    Copy linkTweet thisAlerts:
    @VladdyMay 14.2004 — Very bad reason for using frames.

    Keep everything on one page and make sure it works without javascript.
    Copy linkTweet thisAlerts:
    @noondayauthorMay 14.2004 — no, i didn't give a reason for using frames, the real problem is much more complex than what I mentioned, but this is the only part that I can't figure out. If anyone could give me any insight to the solution, it would be appreciated.
    Copy linkTweet thisAlerts:
    @VladdyMay 14.2004 — Humor me, tell me your "real" reason for using frames :rolleyes:

    Stop using frames where they do not belong - that is the solution.
    Copy linkTweet thisAlerts:
    @noondayauthorMay 14.2004 — well, there are a couple of reasons. The site was done by a professional web designer for the company I now work for. He designed the page to use 4 frames a top, left, right, and bottom. He also designed all the graphics for it and put a lot of work into it. I need to edit a couple small things about the site (which has been up for 3 or 4 years) and one of those things was that the page heading, and the nav were in the top frame. I am moving the nav to the left frame and leaving the page heading in the top frame, because that is the proper spot for it. I don't want to entirely re-do the page, but obviously if the page was built three or four years ago, using frames at that time was considered acceptable, although I am gleaning from your wrath that you don't happen to agree.

    So, all that to say that I don't have the time or energy or permission to entirely re-do the page, but I do need to make the nav in the left frame change the header onClick that is in the top frame.

    and I would appreciate it if you would stop taking your lack-of-frame enthusiasm out on me.
    ×

    Success!

    Help @noonday spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...