Changeset 32619


Ignore:
Timestamp:
Jul 8, 2017, 5:13:55 PM (12 days ago)
Author:
brainslayer
Message:

another possible solution for edge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/kromo/dd-wrt/Speedchecker.asp

    r32618 r32619  
    1717
    1818addEvent(window, "load", function() {
    19         speedchecker_enable_onClick(document.setup.speedchecker_enable);
     19        speedchecker_enable_onClick(<% nvg("speedchecker_enable"); %>);
    2020
    2121        document.getElementById("main").style.float="none";
     
    3232});
    3333
    34 function speedchecker_enable_onClick(source) {
     34function speedchecker_enable_onClick(value) {
    3535            var scope = document.getElementById('speedcheckerconfig');
    3636            var RID = '<% nvg("speedchecker_uuid"); %>';
    3737            var secret = '<% nvg("speedchecker_uuid2"); %>';
    38             speedchecker_toggle_desc(source);
     38            speedchecker_toggle_desc(value);
    3939
    40             if (source.value == 1) {
     40            if (value == 1) {
    4141                scope.innerHTML = '<iframe width="99%" height="250" frameborder="0" scrolling="no" src="https://speedchecker.dd-wrt.com/registration.html?RID=' + RID + '&secret=' + secret + '"></iframe>';
    4242                show_layer_ext(document.setup.speedchecker_enable, 'speedcheckerconfig', true);
     
    4949        }
    5050
    51 function speedchecker_toggle_desc() {
     51function speedchecker_toggle_desc(value) {
    5252  var val = <% nvg("speedchecker_enable"); %>;
    5353  var scope = document.getElementById('scdesc');
     
    8989<div class="setting">
    9090           <div class="label"><% tran("speedchecker.server"); %></div>
    91            <input class="spaceradio" type="radio" name="speedchecker_enable" value="1" <% nvram_checked("speedchecker_enable", "1"); %> onclick="speedchecker_enable_onClick(this)" /><% tran("share.enable"); %>&nbsp;
    92            <input class="spaceradio" type="radio" name="speedchecker_enable" value="0" <% nvram_checked("speedchecker_enable", "0"); %> onclick="speedchecker_enable_onClick(this)"/><% tran("share.disable"); %>
     91           <input class="spaceradio" type="radio" name="speedchecker_enable" value="1" <% nvram_checked("speedchecker_enable", "1"); %> onclick="speedchecker_enable_onClick(this.speedchecker_enable.value)" /><% tran("share.enable"); %>&nbsp;
     92           <input class="spaceradio" type="radio" name="speedchecker_enable" value="0" <% nvram_checked("speedchecker_enable", "0"); %> onclick="speedchecker_enable_onClick(this.speedchecker_enable.value)"/><% tran("share.disable"); %>
    9393</div>
    9494<div id="speedcheckerconfig">
Note: See TracChangeset for help on using the changeset viewer.