<html>
<head>
<script>
function checkForEsc(e)
{
if(!e)
e = window.event;
var key = e.keyCode;
if(key==27)
doCancel();
}
function doCancel()
{
window.parent.close();
}
</script>
</head>
<BODY onkeypress=checkForEsc(event);>
</body>
</html>
23/03/2011
Close Tab Using ESC
Read more...
22/02/2011
07/02/2011
Remove the page title if you use ScriptManager
If you use an ajax, there is problem will appear with sharepoint, the page title will be removed.!!
how??
for example, If you use the ajax with button, and you put the scriptmanager into masterpage, and the user clicked it, the page title will be removed.
To solve this issue:
- Open the masterpage of your site using sharepoint designer.
- add the scriptmanager direct under form tag.
- remove any extra code from title place holder, the title place holder will be appear with the follwoing format:
<title id="onetidTitle"><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server" /></title>
save, and check in.
Test now...
Read more...
التسميات:
ASP.NET,
Sharepoint,
Sharepoint Designer
27/01/2011
Modify the direction of basic HTML tag using global resource
Add new record into global resource with the name Language, and asign the value 1033 to english variable, and another value for another variable. After that, add the follwoing code to html tag, such us, TD:
Read more...
26/01/2011
Set default value into text box, such us search text box
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
$("#search")
.val("Search...")
.css("color", "#ccc")
.focus(function(){
$(this).css("color", "black");
if ($(this).val() == "Search...")
{
$(this).val("");
}
})
.blur(function(){
$(this).css("color", "#ccc");
if ($(this).val() == "")
{
$(this).val("Search...");
}
});
});
</script>
<input type="text" id="search">
</body>
Read more...
10/01/2011
Div with scroll, Like multi line text box
To create div with scroll like multi line text box, only using CSS to apply this idea.
Into HEAD tag, Add the following code
<style>
div.Terms {
background:#ffffff none repeat scroll 0 0;
border:1px solid #a0a0a0;
margin:5px;
padding:5px;
position:relative;
width:1000px;
height:300px;
overflow:auto;
}
div.Content {
margin:10px;
padding:5px;
border:0px solid #666;
width:950px;
zheight:500px;
}
</style>
Into BODY tag, add the following code
<table> <tr> <td> The Terms: <br /> </td> </tr> <tr> <td> <div class="Terms" id="Terms"> <div class="Content"> The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content </div> </div> </td> </tr> </table>
Read more...
Subscribe to:
Posts (Atom)