Hi,
I am using javascript for customValidator to validate textboxes in ASP.Net.
The code works perfectly when I am using a normal page, but as soon as I put that inside a MasterPage, the code doesn't work.
Below is the code for my aspx page. If I put this code inside a MasterPage it doesn't work.
Could you guys advise me how to make th...
In Javascript, suppose I want to perform some cleanup when an exception happens, but let the exception continue to propagate up the stack, eg:
try {
enterAwesomeMode();
doRiskyStuff(); // might throw an exception
} catch (e) {
leaveAwesomeMode();
throw e;
}
doMoreStuff();
leaveAwesomeMode();
The problem with this code is that ...
My idea : when click a filename will get the path of file ,
then create a form and submit this form,
but i don't know how to submit ,
when submit , undefined form cause elements was created at same time
help me, thank !
<p onclcick='startUpload(this.value)'>PATHTOFILE<p>
function startUpload(file)
{
var form = '<...
I need to fetch some chunks of data in a Javascript loop. The pieces will probably be small between 2 and 20 Kb but being in a loop I need speed. I can get these pieces of code from local storage:
var code = localStorage.getItem(myVar);
or even from jQuery .data()
var code = $('#myDiv').data(myVar);
I was unable to find info on loc...
I'm working on some javascript files in a Maven project web application in RAD 7.5.
My files use libraries, and refer to each other. I'm having trouble working out how to set RAD up so that I get error-checking and code completion. Right now, all my scripts show errors wherever I use an external library.
I've set up my folders and scri...
Got a password field, and ideally we want people to type their password rather than copy and paste it in. Is there an easy way using Javascript?
...
I'm looking for javascipt toolkit for Blackberry OS 4.6 and above (but must be 4.6 comptible!) for business applications. XUI looks interesting but can'y find examples or more than 1 page of documentation. Anyone have experience/examples with XUI?
...
Is it possible to store objects in globalStorage or is it only capable of strings?
One option would be to "jsonify" an object and then store it but I wondered if theres a better way?
var host = location.hostname;
globalStorage[host].test = {
name1: 'Ben',
name2: 'John'
};
globalStorage[host].test2 = 'hello';
alert(globalStorage[ho...
I have some javascript in which I need to step through all the elements of some XML. An example of the XML is shown below:
<rules><and><eq propName="Unit1"/><gt propName="Unit2"/><or><startsWith propName="Test"/></or></and></rules>
I need check each part as I need to create objects based on the contents. Can someone supply a basic co...
So i have a simple set up.
index.php which embeds myswf.swf into the page using swfobject 2.
myswf wants to open a new window to interface with an external website - in this instance paypal. (for what its worth, this problem exists even when using documents on my own server - so its not the whole paypal thing)
When the process has fin...
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function insertParamIntoField(anchor, param, field) {
var query = anchor.search.substring(1, anchor.search.length).split('&');
for(var i = 0, kv; i < ...
I am trying to get javascript framework XUI working, but having trouble getting it to work on any desktop browser. More on XUI here... http://xuijs.com/documentation
<script type='text/javascript' src='xui-more-1.0.0.min.js'></script>
<!-- <script type='text/javascript' src='xui-bb-1.0.0.min.js'></script> -->
<script>
x$('button'...
I have this piece of javascript code that I am trying to understand
return ( n >>> 0 ) * 2.34e10;
So what does >>> mean?
And thanks in advance ... this is my first question on SO
...
(function($){
$.fn.slideshow = function(){
function init(obj){
setInterval("startShow()", 3000);
}
function startShow(){
alert('h');
}
return this.each(function(){
init(this);
});
}
})(jQuery);
i...
Hi,
I need to find out height of a page including the content that goes beyond the vertical scrolls which is hidden. I have searched google and stackoverflow QA's but those solution don't apply to my situation.
One condition is I cannot change HTML or BODY css.
Basically I am trying this out for a firefox extension
All the methods lik...
So what I trying to do is to change the cursor to wait when some page is loading.
I thought this was possible with css, I trying to achieve this when someone click on some link, so what I have is this:
#something a:hover { cursor: hand; }
#something a:active { cursor: wait; }
But this doesn't work, it's a hand when hover links, and w...
+-----------------------------------------------------+
|.....................................................|
|..header height: 128px...............................|
|.....................................................|
+-----------------------------------------------------+
|.............|.......................................|
|....
What i am trying to achieve is adding the javascript loops and the named variables into an sql database, some of them are already added to an external script so work fine however some which i have named in the SQL script at the bottom still need adding, however as the database won't accept a colon ":" they won't enter it and is returning...
I have written a nice little Firefox Add-On for the company I work for as an IT Ticket System. What it does is notifies managers of new tickets or notifies users of changes to their tickets.
I started out using the built in notifer for Firefox on Windows with:
var alertsService = Components.classes["@mozilla.org/alerts-service;1"].getS...
Simple way to make a preview of a textarea? the code i have below wont format <em>i'm italic!</em> into italics. I'm not very good at js/jquery, and i don't know if the .replace() part is what i need to focus on or what. I've googled it and searched here and couldn't find a simple answer.
$('.comment-block textarea').bind('blur keyup',f...