Popup window help |
1/14/2009 5:15:56 PM |
PHPRunner General questions | |
W
wildwally author
I'm stuck..... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=10641&image=1&table=forumtopics' class='bbc_emoticon' alt=':blink:' /> |
|
J
|
Jane 1/15/2009 |
Hi, |
W
|
wildwally author 1/15/2009 |
Jane I was successful in my first attempt of doing what you suggested, making things show up as items were checked and not checked. The problem I had with that was linking things to the forms built within PHPrunner. I could create a checkbox through the use of Java Script and link things accordingly, but could not get it to link up with PHPRunners naming convention. |
J
|
Jane 1/16/2009 |
Hi, |
W
|
wildwally author 1/16/2009 |
Hi, I'm not sure that I understand your question. Please give me more detailed description of what you're doing and what you want to achive.
|
J
|
Jane 1/20/2009 |
Hi, <script> document.forms.editform.value_QP_REQUEST.onchange=function() { //your code here ... } </script> |
W
|
wildwally author 1/20/2009 |
Hi, you don't need to create your own checkbox. To add JavaScript function for your checkbox control (QP_REQUEST field) use following code:
|
J
|
Jane 1/20/2009 |
Hi, |
W
|
wildwally author 1/20/2009 |
Could you just offer a hypathetical example of how this would work with a DIV, and provide a sample code that works. I'm pretty decent at disecting things that work and making them work after I am able to see it work. |
J
|
Jane 1/21/2009 |
Hi, {BEGIN FieldName_fieldblock} <TR style="PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px"> <TD class=editshade_b style="PADDING-LEFT: 15px" width=150>{$label TableName FieldNamel}</TD> <TD class=editshade_lb style="PADDING-LEFT: 10px" width=250>{$FieldName_editcontrol} </TD></TR> {END FieldName_fieldblock}
{BEGIN FieldName_fieldblock} <TRid=hidedivstyle="PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; PADDING-TOP: 3px"> <TD class=editshade_b style="PADDING-LEFT: 15px" width=150>{$label TableName FieldNamel}</TD> <TD class=editshade_lb style="PADDING-LEFT: 10px" width=250>{$FieldName_editcontrol} </TD></TR> {END FieldName_fieldblock}
<script> document.forms.editform.value_QP_REQUEST.onchange=function() { if (document.forms.editform.value_QP_REQUEST.checked) document.getElementById("hidediv").style.display="none"; else document.getElementById("hidediv").style.display="inline"; } </script> |
W
|
wildwally author 1/21/2009 |
Great example and it works just as wanted. One question though. If I want to hide more than one field what do I need to do? The simple first thought would be to add the " id=HideDiv" to the <TR>'s I want the rules to apply to. I tried it and it didn't work as planned. It only hid the first one. I did some research thinking maybe a <DIV id=HideDiv> prior to the area I want to hide and </DIV> after would work in its place, but checking the box did nothing. Am I on the right track? I know the <TR> applies to the row, so doing something along that line is not going to work. |
J
|
Jane 1/22/2009 |
Hi, <script> document.forms.editform.value_QP_REQUEST.onchange=function() { if (document.forms.editform.value_QP_REQUEST.checked) { document.getElementById("hidediv").style.display="none"; document.getElementById("hidediv2").style.display="none"; document.getElementById("hidediv3").style.display="none"; } else { document.getElementById("hidediv").style.display="inline"; document.getElementById("hidediv2").style.display="none"; document.getElementById("hidediv3").style.display="none"; } } </script>
|
W
|
wildwally author 1/22/2009 |
Hi, here is a sample: Then add id=hidediv2 and id=hidediv2 to the second and third rows.
|
J
|
Jane 1/23/2009 |
Hi, id=Hidediv style="display:none;" |
W
|
wildwally author 1/23/2009 |
Thanks Jane, I was on the right path, just had the coding in the wrong place. Appreciate your help. |
W
|
wildwally author 1/28/2009 |
Jane whats the proper way to include multiple sections? <script>
<script>
|
J
|
Jane 1/28/2009 |
I'm not sure that I understand your question. |