2011年3月30日 星期三

[筆記]20110330

BUTTON 開網頁動作
當發生非預期的動作(EX:非開新網頁 卻開了一個新網頁 )時檢查 HTML
<Base Target="W-Name"> 可能是框架錯誤

2011年3月29日 星期二

[筆記]20110329

1.callback的問題

ASPX 前端的 funcion(s,e){} 如果有用到 CALLBACK時會有不同步的問題
EX:

 funcion(s,e)
{
    CallbackPanel1.PerformCallback();
    alert('HI');
}

此時會先執行callback 但是不會等他執行完畢
所以可能會發生alert先做但是callback還沒做完的情況

等CALLBACK做完才下一部的解決的方式
1.把東西通通都到callback去做
2.在CallbackPanel1 的 ClientSideEvents-EndCallback 來執行ALERT或是其他動作

2011年3月27日 星期日

[轉]Asp.Net C# 加上 JavaScrip 開新視窗,列印

開新視窗,關閉工具列
ScriptManager.RegisterStartupScript(this, this.GetType(), "ALERT", "window.open('ABC.aspx','1234','top=100,left=100,width=720,height=740,toolbar=no');", true);

列印按鈕
ScriptManager.RegisterStartupScript(this, this.GetType(), "print", "javascript: window.print();", true);

彈出式訊息視窗
ScriptManager.RegisterStartupScript(this, this.GetType(), "ALERT", "alert('訊息');", true);

彈出式訊息視窗 + 確認後更換頁面
ScriptManager.RegisterStartupScript(this, this.GetType(), "ALERT", "alert('訊息!');window.location='ABC.aspx?A_Sno=1';", true);

[轉]http://king971119.blogspot.com/2009/06/aspnet-c-javascrip.html

[轉]JavaScript 網頁技巧總彙整


1.表單運用跨視窗傳遞資料
藉由另一個視窗將資料傳回表單並自動關閉視窗

最想學的語言 查詢 
<form name="form1" action=""> 
<input type="text" name="fruit"> 
<a href="#" >option</a> 
</form>