javascript-events

Javascript .onchange limitations

As I begin to develop more and more compliacted Javascript solutions, I wonder what sort of options javascript gives me to monitor changes in my environment. I've seen so many solutions that constantly ping whatever element they are wanting to monitor, but for any sort of resource heavy application (or for any case depending on the stand...

Two events on one onclick

i am facing this issue: <p class="pushButton"> <a href="javascript:return;" onclick="SetOkCodeButton('=SC_ORDER', 'BBPForm', '', '',''); return false;" name="Order" class="pushButton" title="Orders your shopping cart. This completes the operation " onmouseover="status=' ';return true;" onmouseout="status=' '...

YUI stopEvent not working

I am trying to prevent JavaScript events from continuing to propagate, using YUI. The following is some minimal HTML and some minimal JavaScript which demonstrates the problem: HTML: <a href="#foo" onClick="fooClickTest()" id="foo">foo</a>&nbsp; <a href="#bar" id="bar">bar</a>&nbsp; JavaScript: function fooClickTest(e) { alert(...

Need to force open IE from safari browser while opening a new popup

Is it possible to open a pop up from a Java page which is on Safari browser to open a popup in IE browser. I think it is not possible. ...

do you have Flash or flex or jquery header animation like this url site http://www.zhoyosoft.com?

Please very urgent ------- do you have Flash or flex or jquery header animation like this url site http://www.zhoyosoft.com? is it possiable can do in jquery and also flex ? anybody help me ...

On - window.location.hash - change?

I am using Ajax and hash for navigation. Is there a way to check if the window.location.hash changed like this? http://example.com/blah#123 to http://example.com/blah#456 It works if i check it when the document loads. But If I have #hash based navigation it doesnt work when I press the back Button on the browser (so I jump from blah#4...

calling javascript from a html form

I am basing my question and example on Jason's answer in this question I am trying to avoid using an eventListner, and just to call handleClick onsubmit, when the submit button is clicked. Absolutely nothing happens with the code I have. Why is handleClick not being called? <html> <head> <script type="text/javascript"> fu...

Keyboard Events for Modifier Keys in Safari 2.0

Hello, I'm using keyboard events ('keydown' and 'keyup') to detect exactly when the user presses or releases the shift key. In Safari 3+, this works fine. However, Safari 2.0 doesn't seem to fire keyboard events for the shift key—in fact, it doesn't seem to fire events for any of the modifier keys... Does anyone know how I might deal ...

How can I detect if the window really resized in IE8 standards mode?

My site has many style sheets customized for varying screen widths. As the browser is resized, the window.onresize event checks that a resize actually took place by looking at document.documentElement.clientWidth. If it did, it turns on successively larger style sheets until scrollbars appear. Then, it turns them off in reverse order unt...

Class method can't access properties

I have created a class like so: function MyClass() { var myInt = 1; } MyClass.prototype.EventHandler = function(e) { alert(this.myInt); } Unfortunately, the this is the triggered event (in my casss an tag), and i can't access the class properties. Any suggestions? ...

Onleftclick & onrightClick javascript functions????

In my server side code I am dynamically building a table and and right now I am adding the following code to handle the row click. tr.Attributes.Add("onclick", "window.open('" + root + document.IPT_Name + "/" + document.IPT_Sub_Name + "/" + document.File_Name + "', 'mywindow', 'toolbar=no,location=no,directories=no,status=no,menubar=yes...

Event fired when a link open a new window?

Hello, I am writing an application in which the user can browse the web with tabs (like a browser). Using XULRunner/XPCOM/Javascript, I am able to know when a new document is loaded and so display the title of the page in the tab. My problem is when the user clicks a link that loads a page IN A NEW WINDOW. I don't know how to catch th...

Can Response.Redirect and OnBeforeUnload play nice together?

Does anyone know how to detect in a OnBeforeUnload event that the server side code sent a Response.Redirect? I want to prompt a user to keep them from moving away from a page before it's time, but when the server redirects I it shouldn't prompt the user. I'm working with legacy code that extensively uses Response.Redirect and I'm not i...

Capture and 'Escape' Kepress in WebKit Browsers

I have a dialogue box which appears, and I would like it to be hidden again when you hit the escape key. That all works fine in IE, Fx, Opera - the code registers a document.onkeypress event handler when the box is shown, then tests the event keyCode to see if it's the escape key or not (keyCode 27), but this doesn't seen to work in Web...

How do I disable a Jquery function after some other event?

I want to disable the hover event on a particular list when another event occurs. ...

How to verify if a webpage is completely loaded using javascript

Hi, I need to disable an image which I am using in <a "href"> until the page completely loads. I cannot use document.ready() because I need to disable the the BEFORE the document is ready. Can someone please help me with this? Regards, Gnanesh ...

Javascript - load events for embed elements

If I do an online onload event for embed objects, that seems to work but I can't seem to get the load event working through addEventListener. Is this expected? ...

JavaScript OnBlur event prevents HTML form from being submitted

Consider the following form: <form action="/a" method="post"> <input name="x" type="text" onblur="myonblur(e)" /> <input name="y" type="text" /> <input name="submit" type="submit" value="Submit" /> </form> When focus is on element with name "x" and user presses submit button, onblur event fires but form is NOT submitted. ...

HTML form with single text field + preventing postback in Internet Explorer

I have noticed a rather strange behaviour in IE. I have a HTML form with a single input text field and a submit button On Submit click I need to execute a client side JavaScript function that does the necessary. Now when I want to prevent the postback in the text field (on enter key press) I have added a key press JavaScript functio...

How to pass text in a textbox to javascript function?

Suppose I have the following HTML code, how can I pass the user's input to execute(str) javascript function as an argument? <body> <input name="textbox1" type="text" /> <input name="buttonExecute" onclick="execute(//send the user's input in textbox1 to this function//)" type="button" value="Execute" /> </body> ...