javascript-events

Google map API v3 event click raise when clickingMarkerClusterer?

I have a Google Map API v3 map object on a page that uses MarkerClusterer. I have a function that need to run when we click on the map to it is registered as: google.maps.event.addListener(map, 'click', function (event) { CallMe(event.latLng); }); So my problem is as follows: When I click on a cluster of MarkerClusterer instead of...

mootools modalbox help

Hello, I am have implemented a modalbox into my website, the works on a <a> like below, <a href="http://www.example.com" rel="moodalbox">External Site</a> Click this link will launch example.com in a modal window. I am wanting to recreate this effect however instead of using a link I would like to use a checkbox, is this possible?...

How to capture a click on a link on a temporary layer that is hidden when the focus changes

We have a layer that appears when a certain text input has the focus and that should dissappear when the input loses the focus. I tried to do it like this: <input type="text" onblur="document.getElementById('hideme').style.display='none'" /> <div id="hideme">Textextext <a href="http://disney.com/"&gt;disney&lt;/a&gt; text</div> My pro...

How can I remove RequiredField validation from a asp.NET button by using JavaScript?

Hi, What is the simplest way to remove -unbind- required field validation from a button which is added in asp.Net Page by using RequiredFieldValidator control on the client-side by using Javascript or jQuery functions? Thanks! ...

whats this javascript function doing

pg.testSearch.searchString.onkeyup = function(){ pg.testSearch.btnSearch.setState(); } ...

javascript addEventListener onStateChange not working in IE

Hi, I have two colorbox popup boxes which show a youtube video in each. When they're finished playing, I'm trying to have them automatically close the colorbox window. This code below works perfect in firefox, but in IE I can't get addEventListener to work. I've tried attachEvent with no success. Can anybody offer any suggestions as to h...

jQuery: how to know when an external JS has finished?

Hi, i need to execute specific javascript instructions AFTER an external javascript finishes its own process. (function(){ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://xxxxxxxx.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getE...

about event handle-function in JavaScript

hi! In my program,i write like this: function handleFuc( event ){ var a = event.pageX; var b = event.pageY; var tempdiv = document.createElement("div"); tempdiv.onmouseout = function(){ var x = event.pageX; // 1 var y = event.pageY; // } } var div = document.getElementById( "id" ); div.onmouseover = function(){ ...

Event not triggering

I have no idea where to start on this one. I have a <div> that does not appear until a button is clicked. This function call works: onclick="highlight('mod_sup_div', true);" function highlight(aDiv,show) { if (show) { Effect.Appear('Overlay',{duration: 0.5, to: .80}); Effect.Appear(aDiv,{duration: 0.5}) } ...

how can i check ID of a clicked element js

how can i check if an ID of a clicked element is lets say 'target'. what i am trying to do is actually show and hide comment form on clicking in the text field and hide it when the user clicks out of the form. the problem is that if the user clicks Submit button the form hides and nothing is sent over. so i'll have to check if the submi...

How do you get an ID of a clicked div element in JavaScript?

So my question is how to get an ID of an element that has just been clicked? (JavaScript) Thank you for your answers! ...

Preventing mouse emulation events (ie click) from touch events in Mobile Safari / iPhone using Javascript

In doing a single page Javascript app with interactive DOM elements I've found that the "mouseover-mousemove-mousedown-mouseup-click" sequence happens all in a bunch after the "touchstart-touchmove-touchend" sequence of events. I've also found that it is possible to prevent the "mouse*-click" events from happening by doing an "event.pr...

Get array of elements from event

I have few nested DIV elements. For example: <div id='id1'><div id='id2'>content</div></div> I attach event to DIVs event handler using jQuery: $('div').click(function () { //some code }); There will be two events when user click on content. So there will be two simultaneous events. Is it possible to get inside event handler...

How can I return a link to an active state after mouseout?

var menuEnter = { 'color': hoverColor}; var menuLeave = { 'color': 'C0C0C0'}; new ('div#menu a.level1 span.bg', menuEnter, menuLeave, { transition: Fx.Transitions.linear, duration: 200 }, { transition: Fx.Transitions.sineIn, duration: 500 }); I would like the active menu color to not be affected by the mouseleave var. Thank you. ...

what is this.parentElement?

pg.myfunc = function(){ var i = 1, j = 2; this.selected = 1; xx.newObject = this.parentElement; ..... .... what is xx.newObject = this.parentElement; doing? thanks ...

JavaScript function pass-through?

I'm not sure if this is doable, but I would like to be able to set a jQuery UI event as a function (directly), as opposed to continuing to wrap in additional function(event, ui) { ... } wrappers. Hopefully you can see what I'm going for from the example below. Here is what I would like: $("#auto").autocomplete({ source: "somepage....

Any difference between lazy loading Javascript files vs. placing just before </body>

Looked around, couldn't find this specific question discussed. Pretty sure the difference is negligible, just curious as to your thoughts. Scenario: All Javascript that doesn't need to be loaded before page render has been placed just before the closing </body> tag. Are there any benefits or detriments to lazy loading these instead th...

How to fire/invoke event when checked status is altered with javascript ?

I need to fire the change event when other javascript function changes the checked status. Simplified code below. I can not call MyFunc() from MyOtherFunc(). jQuery: $(document).ready(function(){ $('input:radio[name=rdName]').change(function(){ MyFunc(); }); }); function MyFunc(){ //do stuff } function MyOtherFunc(){ $('inp...

Best way to ask confirmation from user before leaving the page

Hey Everyone, I am currently building a registration page where if the user leaves, I want to pop up a CSS box asking him if he is sure or not. I can accomplish this feat using confirm boxes, but the client says that they are too ugly. I've tried using unload and beforeunload, but both cannot stop the page from being redirected. Using t...

return multiple values?

I am trying to return two values in javascript is that possible? var newCodes = function(){ var dCodes = fg.codecsCodes.rs; // Linked ICDs var dCodes2 = fg.codecsCodes2.rs; //Linked CPTs return dCodes, dCodes2; }; Thanks ...