|
Sonia Gupta wrote: so what's the suitable way to display the message box while closing the browser
I don't know... why don't you use your initiative and search for some answers.
Oh thats right... you can't be bothered and just like it handed to you on a plate.
|
|
|
|
|
call function on child page aur kahan karogi
Piyush Vardhan Singh
|
|
|
|
|
You are not calling the unload event in body unload.
1 - call your javascript in body tag which is in master page
2 - Add an event handler using addEventListener("beforeunload", unloadpage, false);
|
|
|
|
|
Piyush Vardhan Singh wrote: call function on child page aur kahan karogi
WTF is this?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
can u elaborate it.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Malcolm Smart wrote: WTF is this?
Malcolm, mind your language...
|
|
|
|
|
At least it was in a language you could all understand.
|
|
|
|
|
Navaneeth please provide some code......
Thanks
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: Navaneeth please provide some code......
He already has.
Sonia - people have been trying to tell you that just declaring a function and calling it unload doesn't actually mean that it will be fired when the page unloads. To do this, you need to attach the function to the body, e.g. <body onunload = "myUnloadFunction">.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i am not being able to understand how i should add an event handler to the souce file , as navaneeth told
Add an event handler using addEventListener("beforeunload", unloadpage, false);
the next thing is how it will associate with the java script code , which is in the content tag and how it will link with the master page.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
your core problems are:
1 - you refuse to use google
2 - you refuse to read your book
3 - instead of doing research, you seem to invent code and pray for it to work, then come here when it does not.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sonia Gupta wrote: the next thing is how it will associate with the java script code
I imagine 'The next thing is' you will be you getting short of breath as you asked on a health forum somewhere 'I breath out - what should I do next', and somebody took too long to reply.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
I assume she has a CD playing in a loop with instructions on it. "Breathe in. Breathe out."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
As far as I know, script tag does not have events, so onunload is meaningless here. You have a book, why aren't you reading it ?
http://msdn2.microsoft.com/en-us/library/ms536973.aspx[^]
If you knew how to use google, you'd find that ( apparently ) you can use 'for' and 'event' to write a script tag that is called when the unload event occurs. I didn't know that, but now I do. Because I know how to use google.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I am creating a password recovery control. I successfully got the output in my mail. But their is a problem that output of recoverd data of my password is in hash data format.
But i realy want the output in clear and understandable format. Can anyone help me to get the clear data format of my password.
I also tried in fetching the date by means of username and roles. But roles also in encrypted format...
Can u help me to find the decrypted date??????????.........
|
|
|
|
|
Senthil S wrote: Can u help me to find the decrypted date??????????.........
Are you out of your mind, you can't decrypt one way hash algoritem. You can only reset password.
|
|
|
|
|
After user have logged in if he/she press the back button of internet browser, then he/she will back to login page. But if he/she then again press forward button of internet explorer then he/she should not get back to the page which he/she traversed before.
How is it possible?
It will be in asp.net 2.0.
Regards
Tutul Biswas
|
|
|
|
|
Tutul Biswas wrote: How is it possible?
This is how browsers works. You are seeing a cached preview of the page by browser. You need to check the session existence in the page_load. So when user clicks anywhere in the page after logging out, he/she will be thrown to login page.
|
|
|
|
|
Hello frnds
i want to set the background image for form thru coding(Run time i wnt to assign new image for form.
srinivasan
|
|
|
|
|
hi
u can help with this
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Change Background</title>
<script type="text/javascript">
function ChangeBackground(background)
{
switch (background)
{
case 1:
document.getElementById('myTableCell').style.backgroundImage =
'URL(/Images/Demos/ChangeBackground/Background1.gif)';
break;
case 2:
document.getElementById('myTableCell').style.backgroundImage =
'URL(/Images/Demos/ChangeBackground/Background2.gif)';
break;
}
}
</script>
</head>
<body>
<table width="250" border="0">
<tr>
<td id="myTableCell" style="background-image:URL
(/Images/Demos/ChangeBackground/Background1.gif);">
I am a cell with a background image<br /><br />
If you click one of the buttons, my background will change.
</td>
</tr>
</table>
<form id="frmTest" name="frmTest" action="" method="get">
<input type="button" id="btnDo1"
name="btnDo1" onclick="ChangeBackground(1)"
value="Click to change to Background 1" />
<input type="button" id="btnDo2"
name="btnDo2" onclick="ChangeBackground(2)"
value="Click to change to Background 2" />
</form>
</body>
</html>
no knowledge in .net
|
|
|
|
|
thnx for ur reply
frnd i want to set the image at the time of form loading.not at the time of button click.
srinivasan.s
|
|
|
|
|
Hi friend,
i used this code to display the menuitem by horizontally. But it displays only vertically. Could you help me to display horizontally please.
Example Here "Open" and "New" display only by vertically. But i need to display by HORIZONTALLY.
Please my guys help me.
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem Text="File" Value="File">
<asp:MenuItem Text="Open" Value="Open"></asp:MenuItem>
<asp:MenuItem Text="New" Value="New"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="edit" Value="edit">
<asp:MenuItem Text="Copy" Value="Copy"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
|
|
|
|
|
Hi Friends
I am using Ajax in C#.NET.
I have recently noticed that. I cannot fire Messagebox(Javascript-JS) if inside Update Panel.
I am using Update Panel on my GridView.
Only click of Delete Button i am firing one JS asking "Are You Sure"
My Code
LinkButton l = (LinkButton)e.Row.FindControl("lbtnDelete");
l.Attributes.Add("onclick", "javascript:return " +
"confirm('Are You Sure You want to Delete ? ')");
The Above Code works perfectly. But then i make a DataBase Check if that Record is used anywhere else.
So its like
if(CheckRecord)
Response.Write("<script>alert('Are you sure youw want to Continue?')</script>");
It doesnt work.
i tired another dll for msgbox, which also doesnt work.
I suspected for the Update panel. And i was right. If i remove the Update Panel both the options fire MessageBox for me.
But i am using Edit,Delete,AddNew methods in GridView henceforth i need Update Panel.
Now i have no Idea what should i do?
Any solutions would be appreciated.
Thanks
-- modified at 8:22 Friday 2nd November, 2007
Cheers
Menon
|
|
|
|
|
Menon,
You cannot use Response.Write while using Microsoft AJAX, since the page will not postbacks fo your request. You can use Client Script of the Microsoft AJAX.
Add handler for endRequest like below,
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(CheckRecordCallBack);
CheckRecordCallBack(sender, arg){
if (args){
if (args.get_error()){
args.set_errorHandled(true);
alert(args.get_error().message);
}
}
}
You must throw the Message which you want to show after CheckRecord process from the CodeBehind.
For more reference, read http://www.asp.net/ajax/documentation/live/ClientReference/default.aspx[^]
|
|
|
|
|
Hi Venkatesh
Thanks for the reply i will try it.
I even found another solution for my question.
ScriptManager.RegisterStartupScript
This also works.
Thanks
Cheers
Menon
|
|
|
|