This topic is locked

what am i doing wrong

11/15/2008 1:23:23 PM
PHPRunner General questions
W
wildwally author

I insert this bit of code that I found on the web and it works like it should.

<script language=JavaScript>

<!--//

function toggle(what,targetId) {

target = document.getElementById(targetId);

target.style.display = (what.checked)?'':'none';

}//-->

</SCRIPT>

<INPUT onclick="toggle(this,'divtochange');"

type=checkbox value=N name=vehicle>

<DIV id=divtochange style="DISPLAY: none"><INPUT value=test name=color>

<INPUT value=test name=shape> </DIV>


But when i try adding PHPRunner generated forms into the code nothing works.

<script language=JavaScript>

<!--//

function toggle(what,targetId) {

target = document.getElementById(targetId);

target.style.display = (what.checked)?'':'none';

}//-->

</SCRIPT>

<INPUT onclick="toggle(this,'divtochange');"

type=checkbox value=N name=vehicle>

<DIV id=divtochange style="DISPLAY: none"><INPUT value=test name=color>

<INPUT value=test name=shape> {$STORENAME_editcontrol} </DIV>


Well Darn that time it worked.
Ok next question How do I change the color of the textbox. I have some that are yellow and some that are white, I know the yellow is for validation fields but I can't stand the different colors (pet peeve).

W
wildwally author 11/15/2008

Ok it's doing it again, and it has something to do with the particular table its in. I took the same code and dropped it into the table that has the rest of the fields and it no longer works.

J
Jane 11/17/2008

Hi,
you need to add javascript code separately, for example at the end of page on the Visual Editor tab in HTML mode.

W
wildwally author 11/19/2008

Hi,

you need to add javascript code separately, for example at the end of page on the Visual Editor tab in HTML mode.


Thanks I got it to work.