/    Sign up×
Community /Pin to ProfileBookmark

load method help please

Hi all

I have a dilemma with a small site I am building.

I have a navigation panel inside a DIV and whenI click a link, a page is called inside of an IFRAME on my page. Once this page is displayed in the iframe I update my database to enable the next link in my navigation tree however I need to be able to refresh my navigation panel in order for the navigation function to execute again and update the tree elements (without refreshing the parent window – hence the use of my iframe earlier).

Anyway I think that the layer.load() method sounds like it will do what I need – i.e. reload my PHP script inside my navigation DIV however I have tried the following 2 options and keep getting syntax errors – can someone help me out with the code please?

functions attempts are:

[CODE]
function enableNavItem {
navlayer.load(‘/sections/nav.php’);
}
[/CODE]

also

[CODE]
function enableNavItem {
window.parent.document.getElementById(‘navlayer’).load(‘/sections/nav.php’);
}
[/CODE]

Im stuck and in need of some guru help!

Many Thanks for reading.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorJul 17.2008 — use the [B]prototype[/B] method

http://www.javascriptkit.com/javatutors/proto.shtml
×

Success!

Help @kbc1 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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