Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 10491794

@User 10491794
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Need to get the parameter from URl to build href.
    U User 10491794

    I need to get the userId from URL and then build the href dynamically. For example in the URL the userId is Tom then I want to build the href as

    ../settings/userIdSetting.htm?userId=Tom
    and assign it to User Account
    Is this possible.
    Thanks in Advance,
    Kim

    <!DOCTYPE html>
    <meta charset="utf-8">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Sortable Table</title>
    <script language="javascript" type="text/javascript" src="../js/common.js"></script>
    <script language="javascript" type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
    <script language="javascript" type="text/javascript" src="../javascript/d3.v3.min.js"></script>
    <script language="javascript" type="text/javascript" src="../js/shCore.js"></script>
    <script language="javascript" type="text/javascript" src="../js/shBrushJScript.js"></script>
    <link type="text/css" href="../css/shCoreDefault.css" rel="stylesheet" />

    </head>
    <script>
    <pre lang="xml">// get the userId from URL
    var userId = getUrlVar('userId');

    function putUserId() {
    
        document.getElementById(&quot;userSettingId&quot;).innerHTML = &quot;../settings/userIdSetting.htm?userId=&quot; + userId ;
    }
    

    </script>
    <body onLoad = putTenantId()>
    <h2>Server Settings</h2>
    <!-- Need to get the userId from URL -->
    <a id= "userSettingId" href="../settings/userIdSetting.htm?userId=Tom">User Account </a>
    <br/>

    <br>
    <hr>
    </body>
    </html></pre>

    Web Development javascript html css sysadmin tools
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups