JavaScript number-to-string conversion
a = a+'' // This converts a to string
b += '' // This converts b to string
簡單又有用的作法....= =
2008/04/22
2008/04/16
javascript : How to call opener function & set opener element ?
Opener window : openerwindow.html
New window : newwindow.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>Opener window</title>
</head>
<script type="text/javascript" language="javascript">
function OpenNewWindow()
{
window.open("newwindow.html");
}
function CallMe()
{
alert("hello!");
}
</script>
<body>
<form action="#" method="post" name="form1">
<a id="clickme" href="#" onclick="OpenNewWindow();">Click me !</a>
<br />
<input name="textbox1" type="text" value="" />
</form>
</body>
</html>
New window : newwindow.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>New window</title>
</head>
<script type="text/javascript" language="javascript">
function CallOpenerFunction()
{
if (!window.opener.closed)
{
// call opener function
window.opener.CallMe();
}
}
function SetOpenerElement()
{
if (!window.opener.closed)
{
// set opener element
var tf = opener.document.forms[0];
tf.textbox1.value = "hi!";
}
}
</script>
<body>
<a href="#" onclick="CallOpenerFunction();">call opener function</a>
<br />
<a href="#" onclick="SetOpenerElement();">set opener element</a>
</body>
</html>
2008/03/19
ASP與ASP.NET在Cookie互通上遇到的問題
現在工作的平台上有asp與asp.net程式並存,
因此也會有cookie互通上的問題,這幾天在傳Cookies值時,由asp.net產生的cookie在asp上可以正確的讀取,
但在asp產生的cookie卻一直抓取不到...
直到看了這篇文章才了解,原來有urldecode的問題..= =
ASP与ASP.NET互通COOKIES的一点经验-ASP.net技术
不只是中文亂碼,像是一些特殊符號也會出錯...
例如在asp上Response.Cookies("jesse_wang"),
在aspx上寫Request.Cookies["jesse_wang"]是行不通的,因為cookie的名稱會變成jesse_%5Fwang,
用for迴圈跑一之所有的cookie就可以看出來了,我是因為平台上太多cookie一時不查才沒有想到...浪費了不少時間。
所以,不管如何,如果在aspx上要接收asp的cookie,只好這樣作了
應該會有更好的作法吧,沒時間研究了,將就點用....= =
因此也會有cookie互通上的問題,這幾天在傳Cookies值時,由asp.net產生的cookie在asp上可以正確的讀取,
但在asp產生的cookie卻一直抓取不到...
直到看了這篇文章才了解,原來有urldecode的問題..= =
ASP与ASP.NET互通COOKIES的一点经验-ASP.net技术
不只是中文亂碼,像是一些特殊符號也會出錯...
例如在asp上Response.Cookies("jesse_wang"),
在aspx上寫Request.Cookies["jesse_wang"]是行不通的,因為cookie的名稱會變成jesse_%5Fwang,
用for迴圈跑一之所有的cookie就可以看出來了,我是因為平台上太多cookie一時不查才沒有想到...浪費了不少時間。
所以,不管如何,如果在aspx上要接收asp的cookie,只好這樣作了
for (int z = 0; z < Request.Cookies.Count; z++)
{
HttpCookie cookie =
System.Web.HttpContext.Current.Request.Cookies[z];
if (HttpContext.Current.Server.UrlDecode(cookie.Name).Equals("pay_chkimghash"))
{
Response.Write(cookie.Value);
break;
}
}
應該會有更好的作法吧,沒時間研究了,將就點用....= =
2008/02/26
2008/02/21
2008/02/20
2008/02/19
HOW TO:指定網站的 Web 伺服器
HOW TO:指定網站的 Web 伺服器
P.S. 當你開發Web專案時,IIS指定特定的測試IP時,可使用此方法來偵錯。
P.S. 當你開發Web專案時,IIS指定特定的測試IP時,可使用此方法來偵錯。
- 在 [方案總管] 中,以滑鼠右鍵按一下您要為其指定 Web 伺服器的網站名稱,然後按一下 [屬性頁]。
- 在 [屬性頁] 對話方塊中,按一下 [起始選項] 索引標籤。
- 在 [伺服器] 下,按一下 [使用自訂伺服器]。
- 在 [基礎 URL] 方塊中,輸入執行目前的網站時,Visual Web Developer 應該起始的 URL。
訂閱:
文章 (Atom)
-
首先你要先安裝好informix的ODBC Driver並且設定可以連結到informix db。開啟Enterprise Manager後,找到連結伺服器(SQL Server群組-->安全性),按右鍵「新增連結伺服器」: 提供者名稱:Microsoft OLE DB P...
-
簡單整理一下今天看到的這篇文章, 未來可以用指標來改善團隊狀況。 ----- 軟體工程的重要的指標 DORA 指標 (DevOps Research Assessment) 1. 部署頻率: 產品多快發佈出去 2. 投入到交貨的時間 (Lead-Time For Ch...
-
內容取自 Producthunt =============================== "What's a tool that changed your life?" - us to freelancers on Twitt...