DeCheBX = $('MyDiv').insert(new Element('input', { 'type': 'checkbox', 'id': "Img" + obj[i].Nam, 'value': obj[i].IM, 'onClick': 'SayHi(this)' }));
document.body.appendChild(DeCheBX);
DeImg = $('MyDiv').insert(new Element('img', { 'id': "Imgx" + obj[i].Nam, 'src': obj[i].IM }));
...
So I have this problem with strings and switch-case, and I'll try to keep it as simple as possible.
Here event.keyCode has the value "65", and is the result of a keydown event of 'a' (using JQuery).
if (event.keyCode == "65") {
alert("hmmmm");
}
That works, but:
switch (event.keyCode) {
case '65':
alert("Yay!");
b...
Hey
I have some problems sending an id though jquery.
I have a form select with some values, i want to "grap" the id when change option selection.
Output error: [object Object] !! :/
<select name="case_name" id="case_id">
<option value="10009" >Case 1</option>
<option value="10010" >Case 2</option>
...
I am trying to do some dynamic visual effects using the HTML 5 canvas' pixel manipulation, but I am running into a problem where setting pixels in the CanvasPixelArray is ridiculously slow.
For example if I have code like:
imageData = ctx.getImageData(0, 0, 500, 500);
for (var i = 0; i < imageData.length; i += 4){
imageData.data[i...
I'm trying to bypass going through a bunch of menus, to get to the data I want directly.
Here are the links I want to go to:
http://factfinder.census.gov/servlet/MapItDrawServlet?geo_id=14000US53053072904&tree_id=4001&context=dt&_lang=en&_ts=288363511701
factfinder.census.gov/servlet/MapItDrawServlet?geo_id=14000US530...
I have this:
$(document).ready(function() {
$("button.yt-uix-expander-arrow").attr("id", "yt-uix-expander-arrow");
$("#yt-uix-expander-arrow").mouseover(function() {
alert("Hello");
});
});
injected into Youtube. Using right click > inspect element, the <button class="yt-uix-expander-arrow"> has a id="yt-uix-expand...
Setup
I have multiple links on a page with the class location_link
Each Links rel attribute is equal to a city state combo (i.e.,Omaha, NE)
Once the page is loaded, a JavaScript function loops through all of the location_link items and binds a click event to them using jQuery.
This click event fires a call to the Fancybox construct...
I'm making something of a java applet gallery for my website (processing applets, if you're interested) and I'd like to keep the applets from running when the site first loads. Then, when the appropriate button is clicked, a piece of javascript would tell the applet to continue execution until another button is pressed to stop it. I know...
Hi,
I have a page with 10 different div contents in it. Based on my button click i want the 11th div to load content or just take a copy of div 1 to 10. I mean like on button1 it should load div 1 and on button 2 i will load div 2 etc. All my div 1 to 10 will be hidden and the 11th div alone will be visible.
I need this because of my b...
I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code.
I have a form that when submitted generates code and displays it (without refreshing) in <div id="output></div>, but prettify doesn't work on this code, is there any workaround?
Many thanks!
...
I have a date object from which I'd like to render an HTML snippet like <abbr title="2010-04-02T14:12:07">A couple days ago</abbr>. I have the "relative time in words" portion from another library. How do I render the title portion?
I've tried the following:
isoDate: function(msSinceEpoch) {
var d = new Date(msSinceEpoch);
return d...
Say I've got a Javascript string like the following
var fnStr = "function(){blah1;blah2;blah3; }" ;
(This may be from an expression the user has typed in, duly sanitized, or it may be the result of some symbolic computation. It really doesn't matter).
I want to define fn as if the following line was in my code:
var fn = function(){...
while coding javascript and ajax, there is no proper documentation for this function?
i searched this term using api src="http://www.google.com/jsapi " and searchControl.execute("abhilashm86");
how does this google.setOnLoadCallback(initalize) called internally? is this function just for a new search term when user clears previous sea...
Hi,
I am using jquery to loop through table rows and save the data. If the table has 200 rows it is performing slow. I am getting the javascript message "Stop Running this script" in IE when I call this method. Following is the code I am using to loop through table rows. Can you please let me know if there is a better way to do this.
...
Hi all,
Yesterday I managed to solve this, then lost a day's work due to the death of a HD. Now I cannot remember what I did to fix it, but I know it can be done.
Input: string date in the format 'm/d/yy', eg '12/25/10', or '4/1/10' (1st April)
Output - Date object
I'm working with date.js and date.format.js so have Date.fromString() ...
Extract the number after #/ from my string: abcdefg#/123.
...
Hi all:
I have recently started creating an iPhone application using Appcelerator's Titanium. Since the application is essentially all JS, I needed some advice on how I should organize this project.
It's becoming very easy to just create long procedural files for each view in the application. Is there a way I can incorporate MVC, or so...
By default, when you print a web page, the page title and and URL are printed at the top of the page, and likewise the date and time are printed at the bottom.
It is possible to remove this additional as you are printing through the PAGE SETUP menu (under FILE in Internet Exp)
Does anyone know of a way of doing this via CSS or javascr...
I got this code in my submit form
<form id="myform" action='hello.php' method='GET'>
<input type="button" name="newWin" onclick="frmSubmitSameWindows();">
<input type="button" name="SameWin" onclick="frmSubmitNewWindows();">
<form>
Then use some js functions in the head;
function frmSubmitSameWindows() {
form.target = '';
f...
Hello, everybody
I use asp.net mvc & going to build javascript files at application startup depending on site configuration.
I am going to have some javascript file templates that will be populated with appropriate constants and put into /scripts folder.
Please, suggest me the best way to do that. I want to have something like:
appl...