|
Hi,
See the modified example below. I would suggest to use temporary functions to avoid javascript memory leaks. I hope this makes sense.
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head><br />
<title></title><br />
<br />
<script language="javascript" type="text/javascript"><br />
var isDirty = false;<br />
<br />
var default_message = "You have made changes to the data since last saving. If you continue, you will lose these changes."; <br />
<br />
var checkForChange = function(msg) {<br />
if (isDirty) return confirm( !msg ? default_message : msg ); <br />
}<br />
<br />
window.onbeforeunload = function() { <br />
return default_message; <br />
}<br />
</script><br />
<br />
</head><br />
<body><br />
<input type="text" onchange="isDirty = true;" /><br />
<input type="submit" name="btnCancel" value="Cancel" id="btnCancel" onclick="return checkForChange();" /><br />
</body><br />
</html><br />
|
|
|
|
|
Hi all
Whats the difference between the following script includes ?
<script type="text/javascript" src="script.js">
P.S Hardly got anything usefull from google.
Thanks a million !
<div class="ForumSig">Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.</div>
|
|
|
|
|
In theory, you should provide both attributes. So long as it works, there is no real difference.
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 )
|
|
|
|
|
Can u show me an example please ?
Thank You
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
|
|
|
|
|
Ive even found out that if one uses the following code block debugging does not always work !
// Dont always work !
function doSomthing()
{
// break point here
}
// Debugging works here
function doSomthing()
{
// break point here
}
Wisdom is often meant as the ability and desire to make choices that can gain approval in a long-term examination by many people.
|
|
|
|
|
In HTML 3.2 the language attribute was used. Now the type attribute should be used instead.
The language attribute was deprecated in HTML 4:
HTML 4.01 : The script element[^]
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
i want to apply filter so that only txt,doc,rtf files are seen . Others are not seen . Please let me know .
|
|
|
|
|
Here[^]
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 dude...
try it...
=========================================================
function checkFileExtension(elem) {
var filePath = elem.value;
if(filePath.indexOf('.') == -1)
return false;
var validExtensions = new Array();
var ext = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase();
validExtensions[0] = 'txt';
validExtensions[1] = 'doc';
validExtensions[2] = 'rtf';
for(var i = 0; i < validExtensions.length; i++) {
if(ext == validExtensions[i])
return true;
}
alert ('You Cant upload a '+ext.toUpperCase()+' file!');
return false;
}
============================================================
* and now use this line in your code behind (this line used in VB.Net!!!)
===========================================================
myfile.Attributes.Add("onchange", "return checkFileExtension(this);")
============================================================
be cool...
|
|
|
|
|
thanks . i dont want validation. I want that only specified say excel file is seen no other file is seen. when i click browse of the control.
|
|
|
|
|
You can't do this, other than using javascript to check the filename extension as someone else mentioned.
|
|
|
|
|
hi,
I m facing a problem from last week.
I've my own created Flash Movie which is use to play FLV files from FMS2.0. problem is that this Movie is placed on asp.net web Form. movie is accessing some parameters form javascript function which is written on web form.Its working fine on Mozill but on IE6 or IE7 it is not supported under form Tag. I m using ExternalInterface for Communication of JavaScript and Flash8.0. if some one can help me plz let me know.
rup
|
|
|
|
|
I recently installed IIS on my home machine running XP Pro so I could start learning to develop web sites. I'm trying to use the Club Site Kit. When I ran it from files d:\ClubSite it ran fine but after installing IIS and using http://localhost/ClubWebSite to host it, when I run it I get the following error;
Server Error in '/ClubWebSite' Application.
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
I've spent all day googling and dinking around to try and configure IIS to work but I don't have much hair left to pull out!
Any help or links would be much appreciated.
Mike
|
|
|
|
|
|
Thanks it worked like a charm.
I used the -i option and it got me past that point.
I got it working on my machine but I have another computer running server 2003 and having other problems there. But I want to do some research so I can ask intelligent questions. As I said I'm just starting to do Web development and at the moment its a bit overwhelming.
Thanks for your help I really appreciate it.
Mike
|
|
|
|
|
Hi all, quite new to asp.net c# programming, i have a mifare reader PCR310U , i need to develop a website which can retrieve information(like card ID) through website using remote mifare reader in remote computer when surfing the website.
for example, i already published my website, when i'm not at the server computer and at my own house, i have a mifare card reader which is connected to my house's PC and a mifare Card, i wish to register the card ID together with my IC number and save into my system website database. can anyone enlighten me on how to go about doing it?i really have no idea how i can retrieve information through mifare reader through the internet website.
if you can help me pls email me.this system quite urgent for me.
thanks alot
tyrone
tyrone_93@Hotmail.com
|
|
|
|
|
Hi,
Is it possible to add a multi level context menu item to Internet Explorer ... I would be grateful if someone can show me how to do it ...
To elaborate ..
Suppose this is standard IE menu:
Back
Forward
---------
Select All
---------
Cut
Copy
Paste
---------
View Source
---------
Properties
I need to make it look something like:
Back
Forward
---------
Select All
---------
Cut
Copy
Paste
---------
View Source
---------
My Item > My Sub Item 1
--------- My Sub Item 2 > My 2nd level Item 1
Properties My Sub Item 3 My 2nd level Item 2
I can add a top level context menu item, I can make javascript context menu ... but I really need to add multi level menu item in IE toolbar ... plz guide me ..
Best Regards
Khurram
modified on Wednesday, February 13, 2008 11:57 AM
|
|
|
|
|
in aspx page in asp.net2.0 on textbox i want tooltip text in javascripting. Please can anyone tell me how.
|
|
|
|
|
There various ways in resolving this issue.
--- go to www.dynamicdrive.com and look for tool tips javascript sample.
--- textboxes in visual studios has tooltip properties. use it and it will wrk.
|
|
|
|
|
I think so this will help you to resolve your issue
an Exp. is here
Write down some text in TextBox and Click On link It'll change tool tip for Text box what Text you entered in Text Box
JavaScript Function:
function HelloToolTip(v){
document.getElementById(v).title = document.getElementById(v).value;
}
Html Code Here:
<table>
<tr><td>
<a href='#' onclick="javascript:HelloToolTip('<%=txt.ClientID%>')>Change ToolTip</a>
</td>
<td>
<asp:TextBox id="txt" runat="server"/>
</td>
</tr>
</table>
rup
|
|
|
|
|
Hi,
I my ASP .NET web application there have a problem in Mozilla browser.
My controle is a ASP .NET button control which is a html table and this table contain three . Left and right contain image and middle contain button control which is inharit from asp .net button control.
This composite control is working well in every browser but in Mozilla browser when I am opening the new session of the Mozilla browser then the left and right part of this button is not loading. But when I click the browser refresh button then the both part of the control is showing in right way. I tried to resolve it in different way but I faild.
So if you guys know any solution please send it to me.
|
|
|
|
|
how to get file from internet by using the webclient
Dim Client As New WebClient()
Client.DownloadFile("http://www.yahoo.com", "D:\abc\yahoo.html")
when i run this code i am getting out put yahoo.html page when i run this code local host
if i host in remote server i want to download the same page in D:\ or any other directory what i need to give the path.
i getting exception when i run the same code in server.
i am getting out put successfully , when i run local host , pleasee any one can give me solution for this, i want to download file in my local phisical directoy, when i host my dotnet application in remote system.ing the webclient
This is haneef.............................................................
|
|
|
|
|
Double post = no help.
Read the forum guidelines. You claim to be a university graduate but you can't follow simple instructions? How do you expect to be able to hold down a career in the technology industry if you can't do that?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Do NOT post the same question in multiple forums. Doing so is considered very rude around here and on other sites as well. And, as you've found out, it doesn't get your question answered any faster.
|
|
|
|
|
Hi All,
I'm trying to get feedback from others who have experience with online stores (shopping cart applications).
I'm soliciting bids for a web site design. I desire one database. The one database should handle customer information/orders. In addition, I want support and other information to exist in the database. My experience has been less than desireable when splitting databases.
The sales teams I am speaking with keep telling me it is not possible - customer information/sales is different than support. I don't understand why. Perhaps because of a 'canned solution'?
What I don't want to do is have a second database, duplicating information from the first. What has others experience been? I don't feel I am asking for too much here.
Jeff
Jeffrey Walton
|
|
|
|