javascript-events

how to alert the script name that opened the window

I am using multiple scripts to get to a sub window. I want to know how to alert the parent window name. is there anything like alert(window.opener)? ...

alert the object

I am setting an object like this n.name = n.name.join(String.fromCharCode(255)); n.description = n.description.join(String.fromCharCode(255)); I want to be able to alert(n); but it tells me [Object] is there a way to alert complete object? thanks ...

How do I add and remove an event listener using a function with parameters?

Sorry if this is a common question, but I couldn't find any answers that seemed pertinent through searching. If I attach an event listener like this: window.addEventListener('scroll', function() { check_pos(box); }, false); it doesn't seem to work to try to remove it later, like this: window.removeEventListener('scroll', function() ...

How do I do a webkit transformation "onload" instead of pre-load?

I'd like to do a webkit transformation (rotate an image, specifically) after the page loads rather than getting it pre-rotated at load. I'm guessing I need to use some sort of "onload" event to apply it or something, but I'm not a javascript guy. ...

how to show image popup

http://www.kampyle.com/software-feedback-analytics On this url clicking on image it's become popup ,clicking on popup image show the next one .how to do it?*when popup show feedbace image on right corner does not hide.*how to do it? *I also want to know this process name?* ...

jquery question

I am using the Jquery library to copy the text enter in one textfield to another textfield using a check box when clicked.. which is as follows <html> <head> <script src="js/jquery.js" ></script> </head> <body> <form> <input type="text" name="startdate" id="startdate" value=""/> <input type="text" name="enddate" ...

How to expand on mouse click

http://findaccountingsoftware.com/directory/gba-systems/fams-fixed-assets-management-system/ this site contain a tab container .On Applications tab clicking on + sign it goes to expand ,i want to know this process name.How to do it?.There is a strange thing occur clicking on + sign expand automatically scroll move and focus on text .wha...

Where is the action listener registered?

Hi there: I come across this problem when referring a piece of javascript code: <a href="javascript:void(0);"><!-- other html elements --></a> It wants to register a mouse click event listener on this anchor, but I cannot find which function is registered. What's more, what does the code href="javascript:void(0);" mean? Thanks in ad...

jquery question for events

I have to copy the text from one text box to another using checkbox through jquery I have applied jquery event in my code, it works partially correct.. code is as follows: <html> <head> <script src="js/jquery.js" ></script> </head> <body> <form> <input type="text" name="startdate" id="startdate" value=""/> <input...

GWT: What is the way to handle Click on GWT FlowPanel

May be a dumb question, but GWT FlowPanel (raw div element) does not provides something to handle a mouseclick/mousemovement on it. Overriding onBrowserEvent do not works either. If setting onclick event using native JavaScript (need to specify positive height before, 'div' have a height of 0 if not specified), then catching these even...

JavaScript: input validation in the keydown event

Hi, I'm attempting to do info validation against user text input in the process of keydown event. The reason that I am trying to validate in the keydown event is because I do not want to display the characters those that are considered to be illegal in the input box at the beginning. The validation I am writing is like this, function ...

Observing events on injected elements using prototype

I asked a question previously, it was answered correctly in the form i asked it but realised now why it wasnt working for me. i have this code to observe multiple select menus: $('product_options').select('select').invoke("observe","change",optchange); This does work - as pointed out - with static layout like this: <html> <head>...

How to get caller element using Javascript?

I have a table with id "tbl" and it has 2 rows and 3 cols. Each cell(td) has an explicitly defined id. Also, the table has an onclick event that calls a function foo(). The onclick() would be generated whenever any cell is clicked. The table tag is < table id="tbl" width="80%" height="20%" onclick="javascript: foo()" > I also tri...

call the id in javascript

I have a span like this <span id="selectedTests" class="emrFG"> <span id="lblSelectedTests" class="emrHDR" style="top:3;left:6;font-size:8pt;">Selections</span> <span class="emrHDR" style="top:3;left:190;font-size:8pt;">Tests</span> <div id="recordSet" style="top:19;height:112;width:444;"></div> </span> The span shows so...

IE firing anything else but click

I just wonder is there's any way to fire any event via IE's event-triggering implementation - fireEvent. I've tried to use it but failed with all event except click. The only reason i've get interested with this issue it curiousity, thus, any answers like "just do not trigger events, it is a bad idea" - all such answers would be consider...

view-port resize vs document resize in IE

window.resize event in IE doesnt do what i thought it does. I thought it only triggered when the physical window/view-port changed size (ie user hits maximize on the browser window for example), but it is also triggered if i change the document size, introducing scroll bars. is there any way to tell those two things apart: view port r...

Possible to bind an event listener to a (hypothetical) onChangeInnerHTML event?

In my app, I have an OL tag whose contents are changed by various other dynamic events. Is there some way to put a listener on that OL so that I can execute a function whenever its contents are altered in any way? In this example I need to update a count of items in the list which appears in another spot in the interface. I am using jQu...

onMouseMove get mouse position

In javascript, within the javascript event hander for onMouseMove how do I get the mouse position in x, y corrdinates relative to the top of the page? ...

about onmouseout event.

as follow codes: <div id="outerBox" style="border:1px solid red;width:300;height:300" onmouseout="alert('out')"> <div id="innerBox" style="border:1px solid blue;width:50;height:50">inner</div> </div> why when i move mouse on the "innerBox", it was trigger alert('out') ? i want mouse out "outerBox" trigger alert('out') only, mouse on ...

How to prepend a JS event handler in Prototype?

I would like to add an event listener/handler to be prepended before an existing event handler in Prototype. Here is the example: <form ... onsubmit="alert('foo')" id="f1"> $('f1').observe("submit", function() { alert('do this before foo'); }); </form> ...