Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does it show up double?
Message
From
26/02/2014 16:23:18
 
 
To
All
General information
Forum:
Javascript
Category:
Coding, syntax & commands
Title:
Why does it show up double?
Miscellaneous
Thread ID:
01595392
Message ID:
01595392
Views:
51
I'm generating the following HTML and JavaScript from VFP (I've removed all the opening brokets to keep UT from horking)
TABLE WIDTH=800 BORDER=0 BGCOLOR="#58517b">
TR>
TD WIDTH=800>span class="boldnormal">FONT COLOR="White">/FONT>/span> /TD>
/TR>
/TABLE>
p>
a href="go.hcn?hcnmgt~MainPage" class="boldnormal">Management Home/a>br />
br />a href="go.hcn?hcnmgt~OLRManualTrans~DORRISB" class="boldnormal">reset the form/a>br />
/p>
        SCRIPT language="JAVASCRIPT" type="text/javascript">
        function SvrDropdown(list) {
            alert(list.options[list.selectedIndex].value);
                lcUsername=document.getElementById("username").value;
                location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+list.options[list.selectedIndex].value;
                 }

        function AcctDropdown(list) {
            alert(list.options[list.selectedIndex].value);
                lcUsername=document.getElementById("username").value;
                location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+lcServer+'~&acctid='+list.options[list.selectedIndex].value;
                 }

       function ChkChange(){
            alert("in Javascript");
            lcUsername=document.getElementById("username").value;
            lcacctid=document.getElementById("acctid").value;
            if ForceIncent.is('checked') {
              location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+lcServer+'~&acctid='+lcacctid+'~&ForceIncent='+ForceIncent.is('checked');
              alert(location.href);
              }
           }

        /SCRIPT>
fieldset>legend>OLR Manual Transactions/legend>
form name='olrmantrans' action="go.hcn?hcnmgt~SaveForceIncent~DORRISB~" method='post' id='olrmantrans'>
table id='pTable' border="0" cellpadding="3" cellspacing="1" align="left" width="100%" >
tr id='tr0'>td colspan=2>
label>Server: /label>
select id="ServerDrop" name="ServerDrop" onchange="SvrDropdown(this)"  SIZE=1 MAXLENGTH=10>
option value=DB1  >DB1/option>
option value=DB2  >DB2/option>
option value=DB3  >DB3/option>
option value=DB4  >DB4/option>
option value=DB5  >DB5/option>
option value=DB6  >DB6/option>
option value=DB7  >DB7/option>
option value=DB8  >DB8/option>
/select>/td>/tr>
tr>/tr>
        SCRIPT language="JAVASCRIPT" type="text/javascript">
        function SvrDropdown(list) {
            alert(list.options[list.selectedIndex].value);
                lcUsername=document.getElementById("username").value;
                location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+list.options[list.selectedIndex].value;
                 }

        function AcctDropdown(list) {
            alert(list.options[list.selectedIndex].value);
                lcUsername=document.getElementById("username").value;
                location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+lcServer+'~&acctid='+list.options[list.selectedIndex].value;
                 }

       function ChkChange(){
            alert("in Javascript");
            lcUsername=document.getElementById("username").value;
            lcacctid=document.getElementById("acctid").value;
            if ForceIncent.is('checked') {
              location.href='/go.hcn?hcnmgt~OLRManualTrans~&username='+lcUsername+'~&Server='+lcServer+'~&acctid='+lcacctid+'~&ForceIncent='+ForceIncent.is('checked');
              alert(location.href);
              }
           }

        /SCRIPT>
/table>
input type="hidden" name="AccountID" value="">
input type="hidden" name="Server" value="">
input type="hidden" name="Action" value="0">
input type="hidden" name="username" id='username' value='DORRISB'>
/form>
/fieldset>
Things worked, before I added the ChkChange function, after- none of the javascript worked and the Javascript section started showing up twice. Why is it doing that?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Next
Reply
Map
View

Click here to load this message in the networking platform