Need to get the parameter from URl to build href.
-
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("userSettingId").innerHTML = "../settings/userIdSetting.htm?userId=" + 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> -
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("userSettingId").innerHTML = "../settings/userIdSetting.htm?userId=" + 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>