Jump to content

User defined templates


technotool

Recommended Posts

Hi,

I am trying to modify a html/php/js form that essentially takes text and populates a textbox once the user onclicks on the text.  (for example, items under the textbox might say 1. apple pie 2. cherry pie  3. pumpkin pie ==> user clicks #2.cherry pie  ==>  the textbox now displays cherries, custard, dough, sugar, 2eggs) no problem that part works great.  I am looking for some direction because we now want the user to be able to define the text under the textbox and the text which populates the textbox once the choice is selected.  (for example, user clicks edit button and changes the 2nd selection to 2. pecan pie and the population text to "pecans, sugar, maple syrup, dough")  Right now the selections are all hardcoded into the form and not in a database.  thanks for your advice and if you can work with our code I would be happy to reward you financially. thanks again technotool.

 

<html>
<head>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="../javascript/jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="../javascript/animatedcollapse.js">

/***********************************************
* Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript">

animatedcollapse.addDiv('subjective', 'fade=0,height=150px')
animatedcollapse.addDiv('objective', 'fade=1,height=300px')
animatedcollapse.addDiv('impression', 'fade=1,height=150px')
animatedcollapse.addDiv('plan', 'fade=1,height=150px') 
/*
animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
animatedcollapse.addDiv('dog', 'fade=0,speed=400,group=pets,persist=1,hide=1')
animatedcollapse.addDiv('rabbit', 'fade=0,speed=400,group=pets,hide=1')
*/
animatedcollapse.init()

</script>

<script>
function spanListener_s()
{
   var spans = document.getElementById("span_list_s").getElementsByTagName("span")
   var target = document.getElementById("targetTextArea_s")
   for(var i = 0; i < spans.length; i++)
   {
        spans[i].onclick = function()
        {
             if(target.value != "")
{
                 target.value = target.value + ","
             }
             target.value = target.value + this.firstChild.data
         }
    }
}
function spanListener_o()
{
   var spans = document.getElementById("span_list_o").getElementsByTagName("span")
   var target = document.getElementById("targetTextArea_o")
   for(var i = 0; i < spans.length; i++)
   {
        spans[i].onclick = function()
        {
             if(target.value != "")
             {
                 target.value = target.value + ","
             }
             target.value = target.value + this.firstChild.data
         }
    }
}
function spanListener_i()
{
   var spans = document.getElementById("span_list_i").getElementsByTagName("span")
   var target = document.getElementById("targetTextArea_i")
   for(var i = 0; i < spans.length; i++)
   {
        spans[i].onclick = function()
        {
             if(target.value != "")
             {
                 target.value = target.value + ","
             }
             target.value = target.value + this.firstChild.data
         }
    }
}

function spanListener_p()
{
   var spans = document.getElementById("span_list_p").getElementsByTagName("span")
   var target = document.getElementById("targetTextArea_p")
   for(var i = 0; i < spans.length; i++)
   {
        spans[i].onclick = function()
        {
             if(target.value != "")
             {
                 target.value = target.value + ","
             }
             target.value = target.value + this.firstChild.data
         }
    }
}
window.onload = function()
{
    spanListener_s()
    spanListener_o()
    spanListener_i()
    spanListener_p()  
}
</script> 
<?php 
$test="test 1, 2,3,4,,5"; 
?>
<script>
var muscular_backpain="Pateint with complaints of low backpain that started four weeks ago.  The pain is severe and he cannot lift anything over 5 lbs.  The patient went to the ER.  The ER gave the patient muscle relaxers, pain relievers and anti-inflammatory medications.";

var normalExam="normal exam items";

var abnormalExam="abnormal exam items"; 
  
var empty= $test;
</script>




</head>
<body>




<br>
SUBJECTIVE:<br>
<form name="form_fu"  action="../process/fu_lbp_p.php" method="post"> 
<textarea id="targetTextArea_s" cols="65"  rows="3" name="subjective"></textarea> 

<a href="javascript:animatedcollapse.toggle('subjective')">os</a>  

<div id="subjective" style="width: 550px; background: #FFFFCC; display:none"> 

<a href="#" onmouseover="window.document.form_fu.subjective.value=empty;"><font color="red">empty</font></a>
<a href="#" onMouseOver="window.document.form_fu.subjective.value=abnormalExam;">Abnormal Exam</a>

<div id="span_list_s"> 
<span id="item1">The patient returns for follow-up after lumbar ESI.</span> <br>
<span id="item2"></span> 
<span id="item3">The patient reports subsatantial relief in leg pain.</span>  <br>
<span id="item4">The patient reports little relief in leg pain. </span>    
<span id="item5">100% relief.</span> 
<span id="item6"></span> 
<span id="item7">75% relief.</span> 
<span id="item8"></span>
<span id="item9">50% relief.</span> 
<span id="item10"></span> 
<span id="item11">25% relief.</span>  <br>
<span id="item12"></span> 
<span id="item13">The patient's axial pain was not improved following the epidural steroid injection.</span> 
<span id="item14"></span> 
<span id="item15">injection</span> 
<span id="item16"></span>
<span id="item17"></span> 



</div>
</div>
<br>

OBJECTIVE:   <br>
<textarea id="targetTextArea_o" cols="65"  rows="3" name="objective">Alert and Oriented x3, NAD, Normal Respiration, Normal Mood</textarea> 

<a href="javascript:animatedcollapse.toggle('objective')">os</a>   

<div id="objective" style="width: 550px; background: #FFFFCC; display:none"> 
<a href="#" onmouseover="window.document.form_fu.objective.value=empty;"><font color="red">empty</font></a>
<a href="#" onmouseover="window.document.form_fu.objective.value=normalExam;">Normal Exam</a>
<a href="#" onMouseOver="window.document.form_fu.objective.value=abnormalExam;">Abnormal Exam</a>

<br> 
<div id="span_list_o">     
<span id="item1">No</span>                                                             
<span id="item2">Normal</span> 
<span id="item3">Not Detected</span> 
<span id="item4">Abnormal</span> 
<span id="item5">Labored</span> 
<span id="item6">Detected</span> 
<span id="item7">Increased</span> 
<span id="item8">Decreased</span>
<span id="item9">Right</span> 
<span id="item10">Left</span> 
<span id="item11">Midline</span> 
<span id="item12">Intact</span> 
<span id="item13">Absent</span> 
<span id="item14">None</span> 
<span id="item15">Generalized</span> 
<span id="item16">Focal</span>
<span id="item17">kyphotic deformity</span> 
<span id="item18">paravertebral spasm</span> 
<span id="item19"></span> 
<span id="item20"></span> 
<span id="item21"></span> 
<span id="item22"></span> 

</div>
</div>

<br>

IMPRESSION: <br>
<textarea id="targetTextArea_i" cols="65"  rows="3" name="impression"  ></textarea>   

<a href="javascript:animatedcollapse.toggle('impression')">os</a>





<div id="impression" style="width: 550px; background: #FFFFCC; display:none"> 

<a href="#" onmouseover="window.document.form_fu.impression.value=empty;"><font color="red">empty</font></a>
<a href="#" onmouseover="window.document.form_fu.impression.value=normalExam;">Normal Exam</a>
<a href="#" onMouseOver="window.document.form_fu.impression.value=abnormalExam;">Abnormal Exam</a>
<div id="span_list_i">  

<span id="item1">Lumbosacral Radiculopathy</span>
<span id="item2">Lumbar Spondylosis</span>
<span id="item3">Facet Syndrome (L or T) </span>
<span id="item4">Lumbar Disc Protrusion</span>
<span id="item5">Lumbar DDD</span>
<span id="item6">Failed Back Syndrome</span>
<span id="item7">Lumbar Internal Dics Disruption</span>
<span id="item8">Lumbar Spinal Stenosis</span>
<span id="item9">Spondylosisthesis/Spondylosis</span>
<span id="item10">LBP</span>
<span id="item11">SI Joint Disorder</span>
<span id="item12">Epidural Adhesions</span>
<span id="item13">CRPS (RSD) LE</span>
<span id="item14">CRPS (RSD) UE</span>
<span id="item15">Cervical Radiculopathy</span>
<span id="item16">Cervical Spondylosis</span>
<span id="item17">Cervical Facet Syndrome</span>
<span id="item18">Cervical Disc Protrusion</span>
<span id="item19">Cervical DDD</span>
<span id="item20">Failed Neck Syndrome</span>
<span id="item21">Cervical IDD</span>
<span id="item22">Cervical Spinal Stenosis</span>
<span id="item23">Headache</span>
<span id="item24">Thoracic DDD</span>
<span id="item25">Failed Thoracic Back Syndrome</span>
<span id="item26">Thoracic IDD</span><span id="item27"></span>
<span id="item27"></span> 
<span id="item28"></span> 
<span id="item29"></span> 
<span id="item30"></span> 

</div>
</div>

<br>
PLAN:  <br>
<textarea id="targetTextArea_p" cols="65"  rows="3" name="plan" ></textarea>  

<a href="javascript:animatedcollapse.toggle('plan')">os</a>


<div id="plan" style="width: 550px; background: #FFFFCC; display:none"> 

<a href="#" onmouseover="window.document.form_fu.plan.value=empty;"><font color="red">empty</font></a>
<a href="#" onmouseover="window.document.form_fu.plan.value=normalExam;">Normal Exam</a>
<a href="#" onMouseOver="window.document.form_fu.plan.value=abnormalExam;">Abnormal Exam</a>
<div id="span_list_p">  
<span id="item1"></span> 
<span id="item2"></span> 
<span id="item3"></span> 
<span id="item4"></span> 
<span id="item5"></span> 

</div>
</div>

<br>
<br>
<input type="submit" name="submit" value="submit" />
   
</form>


</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.