[TYPO3-templavoila] replace register:tx_templavoila_pi1.parentRec.uid inside JavaScript

strategie und vision | Norbert Huber huber at strategie-und-vision.de
Wed Feb 6 16:51:35 CET 2008


Hi all,

got a problem with replacing the register variable  
{register:tx_templavoila_pi1.parentRec.uid} inside a TEXT object with  
stdWrap.insertData. Because of the curly braces from the JS function  
and the {register:tx_templavoila_pi1.parentRec.uid}  the stdWrap  
Funktion gets confused.

Is there a way to escape the curly braces from the JS. I allready  
tried backslash.

here is the code

<![CDATA[

10 = TEXT
10.value = (
<script type="text/javascript">

window.addEvent('domready', function(){
	//-vertical
	var mySlide = new Fx.Slide('togglecontent_ 
{register:tx_templavoila_pi1.parentRec.uid}').hide();
	// needed for display none
	$('togglecontent_ 
{register:tx_templavoila_pi1.parentRec.uid}').setStyle 
('display','block');
	$('toggle_{register:tx_templavoila_pi1.parentRec.uid}').addEvent 
('click', function(e){
		e = new Event(e);
		mySlide.toggle();
		e.stop();
	});
   });
</script>
)

10.stdWrap.insertData = 1
]]>


thank you for every hint.
Norbert














More information about the TYPO3-project-templavoila mailing list