Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling from one frame into another and window changes 1

Status
Not open for further replies.

jubalbarca

Programmer
Oct 25, 2008
12
GB
Basically I have the following problem. I am writing a small frames-based Javascript game...

I have two frames in my frameset, one for menu functions and alerts which changes, and one 'bar' which stores all the game data and functions. What I need to be able to do is call a function from the menu that is in the bar, and the have that function change the (href) location of the menu.

This;
Code:
function cw () {
parent.menu.location.href="tb.html";
}

Called as follows;
Code:
<form> <input type="Submit" onclick="parent.bar.cw()" value="test"> </form>

Doesn't work, I get a small flicker on the screen and nohting happens.

Many thanks,

Jubal
 
><form> <input type="Submit" onclick="parent.bar.cw()" value="test"> </form>
[tt]<form> <input type="[red]button[/red]" onclick="parent.bar.cw()" value="test"> </form>[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top