Hi,
I'm trying to get at a text file from an external website, for use with scripts running from my own domain. Example:
// run from www.mysite.com:
<html>
<head>
<script>
function blah() {
var data = document.getElementById("thedata");
alert(data.innerHtml);
}
</script>
</body>
<body>
<emb...
Hello, I'm trying to make a game of lights out. I can get the lights to toggle on and off when i click them, but i am having trouble thinking up logic to make the adjacent one come one as well. For example if i click an edge of the table, I should see the three lights adjacent to the light i clicked, become lit. I'm thinking maybe it has...
I am using this chunk of jQuery/Javascript code on my site to open a popup window:
$('#change_photo_link').click(function(){
$id = $('#id').attr('value');
window.open("photo.upload.php?id=" + $id,"Upload Photo",
"menubar=no,width=430,height=100,toolbar=no");
});
This code works on Firefox and Chrome. It does not work on ...
This is sort of a meta-question. Many snippets of JavaScript I've seen here on SO are named with a dollar sign prefix (for example, $id on the second line of the snippet shown in this question). I'm not referring to jQuery or other libraries. I am well aware that this is valid, but it seems awkward to do when not necessary. Why do pe...
I've seen similar questions before,which ends up with no solution,because of security reasons.
But today I see hostmonster has successfully implemented this,when I open a ticket and attach a file in their backend.
It works both with firefox and IE(version 8 to be exact).
I've verified it's exactly client side scripting,no request is s...
is it possible to restrict javascript libraries from being able to manipulate the dom?
im trying to create a system that has a main system with the api which will be able to manipulate the dom and then i want to give the ability to create third party scripts but have them limited to only the api functions.
...
I'm using the latest CKeditor with jQuery adapter.
I have successfully got it to work, and display.
However, as I am completely new to CKeditor, how do I pass in config variables using the jQuery method?
This is what I've got
$( '#input-content' ).ckeditor('', {
toolbar: 'basic'
});
I think from what I've rea...
G'day,
I'm creating an FAQ system, and the user needs to be able to see if a similar question has been asked. Just wondering if anyone knows of an scripts (php or javascript preferably, or possibly actionscript) that has some kind of AI that will do this? I've noticed on stackoverflow as a question is typed, related questions are given ...
Hi,
I am trying to access a javascript function in a programatically created iFrame from a javacript function outside. I tried several ways, but was not successful. like window.frames['frameid']. etc.
Could you please provide me a syntax,
...
i have created a form with zend framework and this form have some elements that all elements have a description , i set description with setDescription in design time, i want to know can
i change this Description in client side with jquery or javascripts?
...
To resolve a conflict between jQuery and prototype
is there any way other than asking jQuery to resolve via
jQuery.noConflict
and using jQuery instead of $('code').code;
Cant we ask prototype $ to step down and resolve.
...
The jquery autocomplete provided by http://docs.jquery.com/Plugins/Autocomplete can work on a INPUT field or a TEXTAREA field. I have a use-case to make a DIV element act as a TEXTAREA by setting its attribute to contenteditable="true". Can I use the DIV's DOM handle for the autocompleter to behave as a textarea for the autocompleter. Cu...
In the Format select box, you can choose Heading 1, Heading 2 etc
How can I disable some of those options? Is it also possible to rename them? I want to only allow Heading 2 and Heading 3, and if possible, rename them to Heading and Sub-Heading.
I figured out how to rename them - in the language file. I edited the 'en-au.js' and then s...
Suppose I dynamically create a DIV using document.createElement, add some inner text, and want to determine its height and width. I can see that before adding the DIV to the DOM tree, properties such as offsetWidth and offsetHeight are 0, which is expected. Once it is programmatically added to the tree, can I expect those properties to...
I often find myself using inline initialization (see example below), especially in a switch statement when I don't know which case loop will hit. I find it easier to read than if statements.
But is this good practice or will it incur side-effects or a performance hit?
for (var i in array) {
var o = o ? o : {}; // init object if it...
All,
In the following code
<body>
<div id="slidemenubar">
<a href="">1</a>
</div><br>
<div id="slidemenubar2">
<a href="">2</a>
</div>
</body>
On mouse over hyperlinks 3<br>,4 <br>,5 should be show on the right side(like sliding menu)
On mouse over 2 6<br>,7 should be shown in the sliding menu and the new menu shoud be towards righ...
I have a server control that needs to programmatically inject a JavaScript reference into the page. It is to reference Microsoft's Bing map control which requires &s=1 to be appended to the script URL for use over SSL. The problem is that the .NET Framework encodes the attributes and changes the & to an & (verified with Reflector). A...
In my page there are two 'Conatct Selected' anchor button, one at the top having id as "selectAllLink" and other at the bottom having id as "selectAllLinkB" of the page. The top one working perfectly using the following script:
<script type="text/javascript">
$(function() {
$('#selectAllLink').each(function() {
var a = [];
...
I have a javascript application and when I run it on firefox I am getting the following erro on the console:
"The stylesheet was not loaded because
its MIME type, "text/html" is not
"text/css".
DumbStuck!!
EDIT:
Note that it tells that "The stylesheet ABCD..."
But ABCD is actually an HTML file.
Edit (ANSWER) : Actually I had ...
Hi,
I'm having problems with .live() and confirm. It's multiplying the confirm dialogs for every click. I know about .die() but i can't get it to work.
$("button.del").live("click", function(){
if(!confirm("Are you sure?")) {
//close
}
});
I've tried $("button.del").die("click"); right after the abov...