function initialize(){
// Creating a map
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 10,
center: new google.maps.LatLng(53.0123601276819, -2.44519164333635),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var m = [];
function addMarker(title, lat, lng) {
m[m.length] = new google.maps.Marker({
position: new...
Line 207, Column 50: Required attributes missing on element script.
<script type="text/javascript" charset="utf-8">
Element-specific attributes for element script:
Global attributes
src
async
defer
type
charset
What is it that I am missing?
Thankyou
Edit: This is for all of my handwritten code, I don't wa...
Currently I have:
$("#your_email").val(this.defaultValue;)
I want to be cycling through all form elements and resetting them to their default value
...
I have this on a javascript var: (it's a http returned data, and I don't know if it's an array or string - (how can we see that?) - Update: using typeof returned "string", so it's a string.
[{"nomeDominio":"gggg.fa"},{"nomeDominio":"rarar.fa"}]
How can we pass/transform that, into something like this:
["gggg.fa","rarar.fa"]
?
Than...
i have created the following function to show and address in JS:
function showMapForm(idDiv, divWidth, divHeight, idLat, idLng) {
document.getElementById(idDiv).style.width = divWidth+'px';
document.getElementById(idDiv).style.height = divHeight+'px';
if (document.getElementById(idLat).value=='' && document.getElementById(id...
Dear experts,
I am currently working on a WYSIWYG web editor.
The problem i ran into is a little complicated.
When I select a section of text and click on something on my tools, the command works but immediately the text becomes unselected.
Just like when we select text in any webpage, when we click on something else, the text become...
I have two Javascript "objects" similar to so....
var Object2 = new (function() {
this.FetchData = function(callback) {
// do some stuff
callback(data);
};
});
var Object1 = new (function() {
this.DisplayStuff = function() {
};
this.LoadData = function() {
Object2.FetchData(this.OnData);
...
I'm trying all day to set up a peristant style attribute to the body tag of the ckeditor instance. I could not find something like bodyStyle in ckeditor.config api (only bodyId and bodyClass).
So I was trying it myself, with the following solution (jQuery is used):
$(this).find('textarea.editor').ckeditor().ckeditorGet().on( 'instanceRe...
var focus = true;
function z() {
this.t = 0;
this.p = function (t) {
if (focus == true) {
this.t = t;
alert(this.t);
}
}
}
var zp = new z();
setTimeout('zp.p(0)', 100);
window.setInterval('zp.p(1)', 2000);
var ftimer = setTimeout('focus=false', 2000);
document.addEventListener('mous...
Some stupid question about DOM, please don't hate me
For some reasons I need to pass an anonymous function to addEventListener (mainly to "pass" context variables) but the listener once called can be removed so I want to understand if the code shown below is the correctly way to detach the listener.
var item = document.createElemen...
The way it is, I learn the methods by jQuery.getJSON ,
I tried to made a small album with dribbble's api.
I would like to click on pictures to enlarge, (slides).
I according jquerytools and fancybox the demo format output.
But the strange thing is that
The things we do not have a slide effect.
However, the output of the html copy ...
After an hour or two of heavy use on the site I'm developing, Firebug develops the following problems:
Breakpoints get glitchy -- it becomes difficult to add/remove breakpoints. Sometimes I click on a line multiple times, see nothing, move to the console tab and back, and then see my breakpoints again.
Console stops logging xhr's, or s...
Hello, i need to implement mouse resistance in javascript.
As an example of what i mean, think of how the Enligthenment window manager handles screen edge resistance to switch between different desktops, or if you are not familiar with that:
imagine a large rectangle with a square within it.
when click-moving the mouse [onmousedown] wi...
I think I am having trouble visualizing what code goes where and what requests and responses go where.
Let's say I want to alter all <img> tags in the body of a document. I am sure I would adjust there styling in the inject.js file,...but would I still need to send a request to background.html? If so,...I am not sure what the respons...
I use a mootools-based pagination which works fine. However, I would like after a user clicks to a new page (from the bottom where the pagination links are clicked) to return the new set of comments and scroll back up to the top of the container div.
Is there a function to do something like that with mootools?
Here is the code that ne...
I am trying to apply some javascript to a pdf to make it print silently. I found this chunk of code and pasted it in, but get the error below.
SyntaxError: missing ; before
statement 1: at line 2
This highlights the first 2 lines of the code below:
Document document = new Document();
FileOutputStream fos = new FileOutputStream("...
I have a JavaScript that generates HTML on my web page (AJAX control). Now I need to create a ASP.NET Control that is visible at design time. It should look exactly like the original AJAX control. Any ideas about how to execute JavaScript at design time? Unfortunately I cannot create all the required HTML in .Net as it is too large and c...
I am trying to post a request to the google authSub for youtube. I use jQuery for AJAX posts etc. When I make the POST I get a 405 error: "405 Method Not Allowed".
Here is my js:
$.ajax({
type: 'POST',
url: "https://www.google.com/accounts/AuthSubRequest",
beforeSend: function(xhr){
xhr.setRequestHeader('X...
how to disable the scroll bars of the page.
and disable this button.
...
Hi,
we have a license key system which requires the MAC address of the network card of the PC. To make it easier for the user, I am looking into getting the MAC address (or some other similar system identification info) with a web page.
Do Flash (or Flex), JavaScript or Java Applets provide any APIs to query system information ?
Than...