|
 |
|
Get Value Query String ยังไงครับ get มาเป็น string เพื่อแทนค่าที่จะแสดงในที่ ๆ ต้องการน่ะครับ |
|
 |
|
|
 |
 |
|
ตัวอย่าง คือต้องการ ค่าจาก dashboard.aspx?UserGroup=Administrator
ไปแสดงที่นี่น่ะครับ (ตรงที่เป็น สีแดงน่ะครับ)
Code
<script type="text/javascript">
$(document).ready(function () {
//JQUERY POP-UP NOTIFICATIONS
function create(template, vars, opts)
{
return $notifications.notify("create", template, vars, opts);
}
$notifications = $("#notifications").notify();
create("note_icon",
{
icon: '<span class="icon ws">R</span>',
title: 'xxxxxxxxxxxx',
text: 'xxxxxxxxxxxxxxx'
},
{
expires: false
});
// PIE CHART
var pie_first = [[1, 6]];
var pie_second = [[1, 4]];
var pie_third = [[1, 9]];
var pie_fourth = [[1, 3]];
var pie_fifth = [[1, 3]];
$.plot($("#pie"), [
{
label: "Midnight",
data: pie_first
},
{
label: "Tropical",
data: pie_second
},
{
label: "Sea",
data: pie_third
},
{
label: "Apple",
data: pie_fourth
},
{
label: "June",
data: pie_fifth
}
],
{
colors: ["#05476d", "#388686", "#77bd98", "#a7dca5", "#c2e58a"],
tooltip: false, tooltipOpts: { content: "%s: _25p.0_25" },
grid: { clickable: false, hoverable: true },
series: { pie: { show: true, radius: 1,
label:
{ show: true, radius: 2.22 / 4,
formatter: function (label, series)
{
return '<div style="color:#ffffff;font: bold 13px/16px Helvetica, Arial, sans-serif;text-align:center;">' + label + '<br/>' + Math.round(series.percent) + '%</div>';
}
}
}
},
legend: { show: true, backgroundOpacity: 0 }
});
});
</script>
ทำยังไงอะครับ ทำไม่เป็น ช่วยสอนหน่อยครับ
Tag : JavaScript, jQuery

|
|
 |
 |
 |
 |
Date :
2012-07-03 00:28:37 |
By :
eazycorner |
View :
1661 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณนะครับ แต่ผมทำอย่างนี้ครับ งมเอาน่ะ กว่าจะได้
<script type="text/javascript">
$(document).ready(function () {
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
function create(template, vars, opts) {
return $notifications.notify("create", template, vars, opts);
}
$notifications = $("#notifications").notify();
create("note_icon", {
icon: '<span class="icon ws">U</span>',
title: getUrlVars()["FirstName"],
text: getUrlVars()["UserGroup"]
}, {
expires: false
});
create("note_success_icon", {
icon: '<span class="icon ws">e</span>',
title: 'Success Message!',
text: 'Just An Example Of Success Message Notification'
}, {
expires: false
});
|
 |
 |
 |
 |
Date :
2012-07-04 03:51:34 |
By :
Eazycorner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|