View Single Post
Old 03-11-2012, 01:11 PM   PM User | #2
helloJS
New to the CF scene

 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
helloJS is an unknown quantity at this point
Lightbulb I got it !!!

I got it ... (create an object so it's passed with the address) how asking is already solving a bit! Here we are (code tested and ok) :

Code:
<html>
<head>
</head>
<body>


<script src="../flovinax.js" type="text/javascript"></script>

<script type="text/javascript">
function toggleEditor(edtX, edtN) {
	if(edtX.edt===null) {
		edtX.edt = new flovinaxa({fullPanel : true}).panelInstance(edtN);
	} else {
		edtX.edt.removeInstance(edtN);
		edtX.edt= null;
	}
}
</script>	


<h4>Textarea Example</h4>
<div>
	<textarea style="width: 800px; height: 200px;" id="boxA"></textarea>
	<br />
	
	<script type="text/javascript">
		edtA={edt:null};	// THE OBJECT edtA
	</script>	
	
	<button onClick="toggleEditor(edtA,'boxA');">+</button>
</div>
<div style="clear: both;"></div>



<h4>Textarea Example</h4>
<div>
	<textarea style="width: 800px; height: 200px;" id="boxB"></textarea>
	<br />
	
	<script type="text/javascript">
		edtB={edt:null};	// THE OBJECT edtB
	</script>		
	
	<button onClick="toggleEditor(edtB,'boxB');">+</button>
</div>
<div style="clear: both;"></div>



</div>

</body>
</html>
helloJS is offline   Reply With Quote