I need to make a url shortener for work, so I'm trying to figure out what is going to be the best schema to provide the largest possible number of links in the smallest possible id string.
I had thought of converting unicode characters to bit values to use as ids for a simple database--is such a thing possible? Is there any particular u...
I tried to plot data useage per day using jqplot along with its dateaxis renderer, the data was static to test the graph, but i found that the points on graph is not corresponding to the exact date on the grid.
Is there a better tool out there to do this more accurately ? I need to render light and interactive graphs on browser using j...
Hi, I am trying to set a custom error handler for 3rd party plugins/modules in my core library, but somehow, myHandler does not alert the e.message.
Can somebody help me please? thank you
Function.prototype.setErrorHandler = function(f) {
if (!f) {
throw new Error('No function provided.');
}
var that = this;
var g = function() {
...
I am trying to find a good vertical text scroller. Basically what I want is a scroller that goes vertically but is continuous (meaning the area is never empty while waiting for the text). I can use either javascript or jquery. I have searched around the net but I have not found a good one. I want it to constantly scroll without doing it ...
Ok, what I'm doing right now is just echoing an script tag. For example:
echo '<script>alert("Hello world")</script>';
Is this the right way to do this? or is there a better way?
...
...I should just list them:
First 4 letters/numbers, with...
All lowercase.
Whitespace stripped.
Symbols removed.
Should be simple. What's the best way to do this?
...
HI guys, my application uses a lot of different javascript files. SO I tried to be quick about it and accomodate all the files in one single file. This I did by creating a single php with the following code:
<?php
header('Content-type: text/javascript');
$js = array( .... ); // all files to include
$js = array_unique($js);
foreach...
how to open a webpage in Internet Explorer so that when i double click on that it opens up full screen with only the title-bar.
...
Hi,
At work, we place braces on the next line, but at home, I do the opposite. Which one do you prefer? (K&R vs OTBS)
function something() {
// ...
}
function something()
{
// ...
}
A lot of JavaScript libraries seem to use the OTBS (one true brace style). I'd like to follow them for consistence among other JavaScript projec...
How can I detect when a user has chosen which file to upload using a html file input. That way I can submit the form automatically.
...
i have a long ajax call so i am using blockui like this . .
$("#roadmapContainer").block({ message: '<h2>Loading Ajax Request</h2><br/><img src="/Content/images/ajax-loader.gif" />' });
$.post(timelineUrl, function(data) {
onLoad(data);
$("#roadmapContainer").unblock();
inside teh "onLoad()" method it takes a ...
I have this code in a js file:
function buildRolePicker() {
var pnl = $("[id$='staffRoles']");
$.each(roles["ContactGroupRoles"], function(iteration, item) {
pnl.append(
$(document.createElement("input")).attr({
id: 'cgr' + item['RoleId'],
name: 'cgroles',
...
I've found this link- http://blogs.msdn.com/b/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx to update the tags for HTML5, which isn't a whole lot of use when I'm using just one or two new tags. Is there any way to get Visual Studio 2008 to recognise the new J...
How can I create a function that can't be called from outside?
var obj = {
function1: function(){
alert("function1");
},
function2: function(){
alert("function2...");
obj.function1();
}
};
// so how to make this function unaccessible
obj.function1();
// and you could only call this function
obj.f...
I was thinking that Ajax spinners are really great but the image spinning is actually shown with some delay OR is loaded too early, I thought maybe I could use these old school characters to provide more accurate ajax activity feedback.
|, /, —, \
lets say the target paragraph is called <p id="target"></p>
How can I interchange thes...
Hi!!! =)
I am creating a website using jsp, ajax, servlets.
My framework is prototype.
The connection is bad, so I would like my web application to respond correctly in situations like this.
For example to give a message indicating you are working offline, and to report when plugged in again and can continue.
The solution should wo...
I want to be able to have two levels of tabs control the browser history, to allow for back/forward button functions. I would like the first row of tabs open up a set of links, that would open one more step, and then allow the back button to trace back each step one by one.
Example is:
My Friends (The First Tab) --Click to--> Joe Brown...
I'm evaluating different cross plattform mobile frameworks. I like Phonegap and think I understood how it works, but am now looking at QuickConnect and have a much harder time to figure it out, especially how it compares to Phonegap.
Can anybody help me to define the advantages or differences of QuickConnect in comparison to Phonegap?
...
Hi all,
is there any javascript function or even in the jQuery Library (i suppose yes, because jQuery has JSON Library and is able to serialize) that does the same as PHP print_r() function?
I've googled about this but I've found only functions to print mono-dimensional or bi-dimensional arrays.
thanks in advance...
José Moreira
EDIT...
I have fixed area 2d space filled with rectangles. I'd like to move the rectangles around, add new ones, remove some, but not allow them to overlap. If all of the rects are the same height and width (50x50px), what data structure should I use to store their position and what space they are using and what lookup method should I use agains...