<input name="myusername" type="text" id="u" class="blackle u" value="Username..." />
<input name="mypassword" type="text" id="p" class="blackle p" value="Password..." />
Using jQuery...
Onfocus - if #u has val "Username..." then change it to "" (blank)
OnBlur - if #u has val "" (blank) then change it back to "Username..."
Onfocus - ...
I am able to successfully post Flash content using FB.ui({method: 'stream_publish',....}).
However, since my app must also be able to post to Fan Pages, I cannot use FB.ui, and must use the Graph API via FB.api instead. No biggie, I'd rather have a custom form for posting anyway.
But it seems posting to a feed using FB.api('/FEED_ID/fe...
After converting a File to a BinaryString in HTML5 via the FileReader readAsBinaryString() method, is there a way to convert the data back to binary in JavaScript?
...
Where in the flow of execution does the initialize() function need to appear in the code to allow a Google Map v3 API map to be loaded through a JQuery .load call.
The code I have at the moment looks like this
$('#maplink').click(function(){
$('.fades').fadeOut('slow');
$('#googleMap').show();
$('#googleMap').load("map.html");
initiali...
<script language="javascript">
function switchScreen(v)
{
if(v=='d')
{
mf.rows="0,*";
window.frames.topFrame.location='blank.htm';
}
else
{
mf.rows="*,0";
window.frames.topFrame.location='http://sample.htm';
}
}
</script>
<frameset name="mf" id="mainFrame" rows="*,0" frameborder=no framespacing=0>
<frame name...
I know this isn't programming-related, but I'm curious what this community thinks about the subject. My understanding is that JavaScript is what the language is named. Lately, it seems to have become trendy to write it Javascript. Who are we to rename the language? I'm interested to hear if there is a cogent argument for changing the cap...
My apologies if this is just another question that gets asked over and over. I've found some similar questions, the examples just haven't gotten me exactly where I need to be. This is similar to http://stackoverflow.com/questions/359467.
$('a.highslide').each(function() {
hsGroup = $(this).attr("rel");
if(hsGroup.length > 1){
...
I'm working in a java/eclipse shop writing javascript, coming from a php/netbeans background. So far, I hate eclipse, but I don't want to shift away from the general tool set. (Because of issues with our build system, we're currently on the galileo release.)
The syntax coloring is just fine, and I'm learning to live with the cockpit-li...
We're trying to alter msdropdown ( http://www.marghoobsuleman.com/jquery-image-dropdown) to "drop up" if the menu will go off the frame. In order to figure if that's going to happen we need to check the location of the drop down box relative to the frame that it's in. From there it's easy make the thing open upwards, but the location is ...
Why do most of the websites doesn't have a preloader? I am thinking to put a preloader for my website, but I wonder why many website which needs a preloader for their heavy content but they don't have one ?
And I am looking for a good preloader tutorial.
...
Hello,
I want to make an app that can display on any webpage, just like how Disqus or IntenseDebate render on articles & web pages.
It will display a mini-ecommerce store front.
I'm not sure how to get started.
Is there any sample code, framework, or design pattern for these "widgets"?
For example, I'd like to display products.
Should...
I've built a simple panorama photo viewer in jquery, see live example here:
http://alafiariver.org/alafia/view/aldermans-ford
How can I prevent this from being dragged too far? These photos vary in width, so the solution needs to be dynamic.
...
Hi,
I'm working on a little project in JavaScript/jQuery.
In order to display results from a calculation done in javascript, I'd like to open a new window with some predefined content and modify this content in order to display the results: Im using code like this:
var resultwindow = window.open('result.html')
var doc = $('body', res...
Is there any framework/engine that provide ability to draw 3d images on Canvas?
I am planning to draw some primitives (different shapes) located in one plane:
var dist = 2;
var hexHalfW = 35;
var lengthX = 20;
var hexR = Math.sqrt(lengthX*lengthX+hexHalfW*hexHalfW);//40.31128874
var hexDiag = 2*hexR;
var hexHeig...
this is my code:
comenzar = function(){
document.getElementById('gene').onclick = xmlhttpPost("generador.php");
}
xmlhttpPost = function(strURL){
xmlHttpReq = false;
self = this;
self.xmlHttpReq = new XMLHttpRequest();
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'applicati...
I'm trying to empty wherever value/text in the textarea, when a file is uploaded from input. It works fine with FF and Chrome, but IE doesn't do the thing. Is there anyway to fix this?
Many thanks in advance.
$('input[type=file]').change(function(){
$("textarea#txt_id").val('');
});
<textarea name="txt" id="txt_id" rows="8" cols="64...
I wanted a script to fade in and out of images within a div using jQuery.
I'm using the following code (from http://jonraasch.com/blog/a-simple-jquery-slideshow):
function slideSwitch() {
var $active = $('div.box1 img.active');
if ( $active.length == 0 ) $active = $('div.box1 img:last');
var $sibs = $active.siblings('img');
...
I have an Accordion in ExtJS and I want to add new Panels to it dynamically.
The Panels need to be collapsed when they appear.
The code that I have now will create the Panels, but the HTML in each panel won't show.
var loadoutput = new Ext.Panel({
title: 'Log',
renderTo: 'logout',
layout: 'accordion',
defaults: {
bodyStyle: 'padd...
I am using the services module in drupal a long with the JSON Server, and I am accessing it using jQuery this works great, but I have one small problem.
Drupal/JSON Server always seem to return objects with the # symbol, which I don't really know how to handle, this prevents me from doing
object.property
Because in reality it's object...
If I do this,
var element = {};
alert(element);
element[name] = "stephen";
alert(element.name);
Why doesn't element.name work?
...