function open_modal_Window()
{
if (window.showModalDialog)
{
window.showModalDialog("webpage.htm","name","dialogWidth:300;dialogHeight:200px");
}
Thursday, May 27, 2010
Tuesday, January 6, 2009
div with rounded curve ( Create div with rounded edges)
<div id="cat_div" class="bl" >
<div class="br"><div class="tl"><div class="tr">
<asp:TextBox ID="cat_name2" runat="server" ></asp:TextBox>
<asp:button ID="sav_cat" OnClientClick=" return save_cat2_ajax()" CssClass="button" Text="Save Category" runat="server" />
<asp:ImageButton runat="server" ImageUrl="../images/close.jpg" OnClientClick="return close_div()" />
</div></div></div>
</div>
<div class="clear"> </div>
css
.bl {background: url('../images/bl.gif') 0 100% no-repeat #e68200; width: 20em}
.br {background: url('../images/br.gif') 100% 100% no-repeat}
.tl {background: url('../images/tl.gif') 0 0 no-repeat}
.tr {background: url('../images/tr.gif') 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}
output
<div class="br"><div class="tl"><div class="tr">
<asp:TextBox ID="cat_name2" runat="server" ></asp:TextBox>
<asp:button ID="sav_cat" OnClientClick=" return save_cat2_ajax()" CssClass="button" Text="Save Category" runat="server" />
<asp:ImageButton runat="server" ImageUrl="../images/close.jpg" OnClientClick="return close_div()" />
</div></div></div>
</div>
<div class="clear"> </div>
css
.bl {background: url('../images/bl.gif') 0 100% no-repeat #e68200; width: 20em}
.br {background: url('../images/br.gif') 100% 100% no-repeat}
.tl {background: url('../images/tl.gif') 0 0 no-repeat}
.tr {background: url('../images/tr.gif') 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}
output
Wednesday, December 17, 2008
How to open modal Window with javascript (showModalDialog)
function open_modal_Window()
{
if (window.showModalDialog)
{
window.showModalDialog("webpage.htm","name","dialogWidth:300;dialogHeight:200px");
}
{
if (window.showModalDialog)
{
window.showModalDialog("webpage.htm","name","dialogWidth:300;dialogHeight:200px");
}
Labels:
javascript,
modal Window,
open Window,
showModalDialog
Monday, December 17, 2007
pop up window via javascript ( window.open method)
//function to open a new window
function open_window()
{
var win = window.open('new_win.html','win',
'left=4,top=4,width=4,height=6,toolbar=1,resizable=0,scrollbars=1,
menubar=1,status=1,directories=1,location=1');
}
properties
function open_window()
{
var win = window.open('new_win.html','win',
'left=4,top=4,width=4,height=6,toolbar=1,resizable=0,scrollbars=1,
menubar=1,status=1,directories=1,location=1');
}
properties
toolbar=1 or 0 | Want to display the toolbar in the new window or not. | |||||
location=1 or 0 | Want to display the address line in the new window or not. | |||||
directories=1 or 0 | Want to display the Netscape directory buttons or not. | |||||
status=1 or 0 | Want to display the browser status bar or not. | |||||
menubar=1 or 0 | Want to display the browser menu bar or not. | |||||
scrollbars=1 or 0 | Want the new window should have scrollbars or not. | |||||
resizable=1 or 0 | Want the new window is resizable or not. | |||||
width=pixels | Specify the width of the new window. | |||||
height=pixels | Specify the height of the new window. | |||||
top=pixels | Specify the Y coordinate of the top left corner of the new window.) | |||||
left=pixels | Specify the X coordinate of the top left corner of the new window |
Friday, October 12, 2007
Calling a server side function from javascript.
Javascript code
function bind()
{
var btn = document.getElementById("Button1");
btn.click();
}
Html code
<table>
<tr style="display:none" ><td><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /></td></tr>
</table>
Code behind code
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(" Button1 clicked");
}
function bind()
{
var btn = document.getElementById("Button1");
btn.click();
}
Html code
<table>
<tr style="display:none" ><td><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /></td></tr>
</table>
Code behind code
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("
}
Subscribe to:
Posts (Atom)