Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why does it show up double?
Message
 
 
À
26/02/2014 16:23:18
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01595392
Message ID:
01595454
Vues:
44
I see Viv has answered your question. More as a general observation, you want to get all the formatting stuff (fonts, widths, colors, margins, etc.) out of the HTML and into CSS files. The book "CSS: The Missing Manual" from O'Reilly is an excellent resource. And as always, there are plenty of free resources on the web.

>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform