/    Sign up×
Community /Pin to ProfileBookmark

Action to update a frame

Hi guys,
I’ve got an iframe sitting in a page named [B]commentframe[/B]. When a specific function gets called in the javascript section, i’d like the javascript to push a certain url to that frame.

For instance:

[CODE]
function getCurrentTitle_Result(title){
//if you enter this function, this means you’ve got all the data
document.getElementById(“videoName”).innerHTML = title.displayName;

document.getElementById(“videoDate”).innerHTML = title.startDate;
document.getElementById(“videoID”).innerHTML = title.id;

//tell the iframe to go to this url (title.url)

}[/CODE]

i have no idea how to do this, but heres my guess
document.getElementById(“commentframe”).url = title.url;

Thanks for your help!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@shred444authorJan 12.2007 — NEVERMIND!

i stumbled across my answer right after i posted.

For those of you still curious:

[CODE]frames['commentframe'].location.href='www.url.com'[/CODE]

thanks again
Copy linkTweet thisAlerts:
@OverstatementJan 12.2007 — You should really have a site to [url=http://www.w3schools.com/htmldom/prop_frame_src.asp]look these small things up[/url] or you're going to have a lot of waiting for someone to answer your forum posts.

Edit: Mines better just because it's on W3Schools.com!
×

Success!

Help @shred444 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...