How to select a div using it's ID but with a widcard?
If the DIV's ID is statusMessage_1098, I would like to select it in some way like document.getElementById('statusMessage_*').
This is because until the page is generated, I don't know the suffix of the ID and only one such ID will be present in a page. Is this possible?
Thanks for ...
I am trying to write an extension for Google Chrome. I want to capture any keyboard input on a given page, and do something magic to it. I am able to do most of what I need with these lines:
document.addEventListener("keydown", function(event) { OnKeyDown(event); }, false);
document.addEventListener("keyup", function(event) { OnKeyDow...
I am trying to create chrome extention, however my browser action click does not work! I've tried pretty much everything. Here is my setup:
manifest.json:
{
"name": "blah",
"version": "1.0",
"description": "blah",
"browser_action": {
"default_icon": "icon1.png",
"popup": "popup.html"
},
"permissions": [
"bookmarks",
"tabs",
...
I have an asp:dropdownlist, and when a user selects an item, I am supposed to update an area next to with some information based on the selected value of the dropdownlist.
Since I am using user control, I apparently can not use page method. So I decided to use web-service, but I do not know how to properly invoke it. I do not have body ...
I've inherited a pile of code that's doing unexpected things when I click on some <button> elements.
The page has a lot of Javascript, and it's unclear what, if any, events have been setup on the button or its parent elements. I'm trying to find where execution starts so I can debug what's going on.
Is there a way to have Firebug (o...
i've got a website that shows search results with ajax. but of course when i click on a thread in the results and then go back with the web browser back button the results are gone.
is there a way to go back to same result page displayed by ajax?
cause i really want to use ajax for certain tasks, but it wouldnt be nice if the user has ...
Gibberish library provides a nice CBC algo...
// In Jascascript
GibberishAES.enc("Made with Gibberish\n", "password");
// Outputs: "U2FsdGVkX1+21O5RB08bavFTq7Yq/gChmXrO3f00tvJaT55A5pPvqw0zFVnHSW1o"
# On the command line
echo "U2FsdGVkX1+21O5RB08bavFTq7Yq/gChmXrO3f00tvJaT55A5pPvqw0zFVnHSW1o" |
openssl enc -d -aes-256-cbc -a -k passw...
Requirement : I have a piece of code similar to the code below. I want to show a progress bar in an overlay after the save button is clicked. Once I get the response from the ajax call, I show an alert displaying that the operation was successful.Issue : The overlay ( progress bar) is visible only after we have got the response from the ...
How can I use the external JavaScript in Facebook application development?
Actually I want to use the Ajax tab feature in my application.
...
I have small problem.
What I want to achieve is adding sum of values from above elements to each one.
For example every position have got it own time value hidden in attribute. I can get it by using jQuery
var time = $(ui.draggable).attr("time");
now we got 4 positions with time as follows:
432 sec
123 sec
5634 sec
654 sec
Now I ...
I have a two columns of checkboxes with predictable names. How can I disable a checkbox in column B when the ones in column a is unchecked and only enable it when the first the checkbox a is enabled?
<dmf:checkbox
name="someNameAColumnNumber"
value="true"
onclick = "enableColumnBCheckBox" runatclient="true"
/>
Is there somethi...
The company I work at bought us (or rather me) the jQuery Cookbook by O'Reilly which I am reading from front to back. Now I am at 5.13 which talks about Name Lookups. It claims that given the right circumstances, code which is optimized regarding Name Lookups can have an up to 70% performance boost. In one very situational example, it cl...
Hi,
I'm trying to build a bookmarklet that does the following:
1.)loads an external js, located on my server (done)
javascript:function%20loadScript(scriptURL)%20{%20var%20scriptElem%20=%20document.createElement('SCRIPT');%20scriptElem.setAttribute('language',%20'JavaScript');%20scriptElem.setAttribute('src',%20scriptURL);%20document....
Sorry my Gods, but....
I have php, file, and in this php i set the language, and include the necessary lang file:
...
if ($lan=='ge') {$_SESSION['lang']='german';...}
if ($lan=='en') {$_SESSION['lang']='english'; ....}
}
if ($_SESSION['lang']=='english'){
include ..english
}else{
include ...german
}
I u...
Yeah sorry I actually asked this question already except I dont think anyone understood what I was asking.
I am asking how to produce an html list which is styled as in this picture below:
http://iforce.co.nz/i/dafjj52d.png
where by there is a custom background/button for the actual list dropdown action.
I've seen this done using a jQ...
var projectWindow;
function btnNew_Click() {
var form = document.createElement("form");
form.setAttribute("target", "projectWindow");
form.setAttribute("method", "post");
form.setAttribute("action", "MySite.aspx");
document.body.appendChild(form);
var hiddenField = document.create...
Hi,
I am facing on strange problem in ie6.
When i am using window.location to redirect page through javascript it works fine in all browser except ie6.
It works in ie 6 if i place just like below:
<a href="javascript:void(0);" onclick="javascript:window.location('http://www.demo.com');">demo</a>
but its not working for bel...
I'd like to invoke default keydown event handler from javascript. Is it possible?
...
I want to use object's field's value while creating another object using literal notation:
var T = {
fieldName : 'testField'
};
/*
// Doesn't work.
var test = {
T.fieldName : 'value'
};
*/
// Does work.
var test = [];
test[T.fieldName] = 'value';
alert(test.testField); // test
But it doesn't work.
Is there a way to solve th...
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">
Does the count start from full page load or as soon as the page is loading.
Having tested it, it looks to me it starts counting after full page load?
I appreciate a confirm before I continue with this solution. I didn't like Javascripts timeout.
Wil...