triumphost 120 Posting Whiz

Can someone explain why my function is not working? Description: ToggleFrame(TagID, FrameID).. Given those two, get the two elements.. If the iframe is showing, hide the tagID element.. if the tagID element is showing, hide the iframe..

My attempt & failure:

function ToggleFrame(ID, FrameID){			//Given the tag, show/hide it..
	var IDTag = document.getElementById(ID);
	var FTag = document.getElementById(FrameID);
	if( == 'block')
	{ = 'none';
	else if( == 'block') = 'none';
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.