[split] Window.event.srcElement Not Working In FF?

Jun 24, 2010

//This is my html code

<INPUT TYPE="Button" CLASS="Button" onClick="delRow()" VALUE="Delete Row">

//this is javascript function for deleting a row
function delRow()[code].....

View 8 Replies


ADVERTISEMENT

Window.event.srcElement

Jul 23, 2005

I have this IE specific bit of code for finding the originating node:

var obj=window.event.srcElement;

How do I do that cross browser (Opera, NS, Safari...)? Is there a standard
DOM method?

I seem to recall NS worked something like this:

onmousedown=handleThat;

function handleThat(e){
e.target;
// but then I'd have to take the parent to get the same node as IE
}

Event handling makes my head spin!

View 5 Replies View Related

Event.srcelement Not Working For My Object

Nov 13, 2005

This is my object elobj.

elobj=el.document.frames[fIDx].document.body
elobj.onresizeend=doElResizeEnd

When some one resize image element the doElResizeEnd function
start's .But I get "Require object" error from "var el= event.srcElement;"

function doElResizeEnd()
{
var el= event.srcElement;

if( el.type=='image')
{
alert(el.name)
alert(""+el.width)
alert(""+el.height)
}

alert("doElResizeEnd");
}

View 6 Replies View Related

Event.srcElement

Jan 27, 2006

Can anyone explain why this just alerts [object]. I'm trying to change the background of a tr when it's clicked on, I only added in the alerts to see why it wasn't working.

<tr class="a"

function sel() {
var x = event.srcElement;
alert(x);
}

Is there a better method?

View 1 Replies View Related

Cross-browser Alternative To Event.srcElement?

Mar 23, 2010

When you click on the "details" link, a modal window pops up with the job info.This works in IE, but nowhere else. My js skills are shaky, at best, but I did figure out that event.srcElement is IE only and that there are better, modern methods of achieving this.Problem is, I don't know how to implement them in this instance.How can I rewrite this so the modal window functions correctly in IE, FF, etc?Here's the code:

Code:

function displayDetails(num,ctrl)
{
for(var i=0; i<details.length; i++)[code]...

View 5 Replies View Related

Window - Event Is Not Working In Firefox

Oct 20, 2009

My code below is working in IE but not Firefox:

[Code]...

View 5 Replies View Related

String Split Is Ot Working Simple Ex

Oct 5, 2010

this is not working. it's a list of client names, (lawyers.....blehh!) separated by an * (asterisk), the second line is the problem(?),[code]

View 5 Replies View Related

Child Window Close Event - Opening Another Link In A Separate Window Using Window.open()

Jan 29, 2010

I have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.

View 4 Replies View Related

Mozilla Equivalent Of SrcElement?

Apr 6, 2011

Mozilla-equivalent of the following line of code:

document.getElementById('editorContent').contentWindow.event.srcElement.href

The purpose of this line is to get the "href" value of a link when clicked on inside a content-editable iframe.I have the function working perfectly in IE, but not having much luck with Mozilla browsers.

View 9 Replies View Related

E.srcElement And E.target Return The Wrong Element

Aug 16, 2010

In this case the e.srcElement/e.target should return 'home' or 'about', but instead one of the two layers inside 'home' or 'about' will be returned. And these dont even have a onmouseover attribute! The following page is specially made to make it easy to fix the bug if you know how :-)[URL]

View 8 Replies View Related

Window.resizeTo() Inside A Window.onResize Event Handler Function?

Apr 23, 2011

I want to preserve a 16/9 aspect ratio to the window after any resize, making the width a function of the height.

As I have a window.resizeTo() inside the window.onresize event function, the infinite loop is served. How may I quit it?

<html><head><title>Title</title><script languaje="javascript">
const c_ra=16/9;
window.onresize = function WindowReSize() {
var myWidth = 0, myHeight = 0;

[Code].....

View 2 Replies View Related

Capture Child Window Close Event In Parent Window?

Feb 1, 2010

I have an HTML page where I am opening a child window using window.open. the child window is something like yahoo.com. I want to refresh the parent window when the child window is closed.

View 1 Replies View Related

Open Window Not Working Properly In Firefox But Is Working In IE

Feb 6, 2009

The Open Window in Javascript is not working properly in Firefox but is working in IE. What could the reason be?

[Code]...

View 1 Replies View Related

Returning "Label" Value With SrcElement

Feb 5, 2007

If I am using srcElement (or "target" for non-IE models) to return
various properties of an object I have clicked on, can I access for
"label for" value in any way? I'm thinking, for example, of an input
text box like this:

<label for="fred">Username:</label>
<input type="text" name="hello" id="hello1" size="10">

Now, once a function has:

var obj=event.srcElement || event.target;

.... at the top, I should be able to access obj.name and get "hello"
etc, but how can I access the label value of "fred"? I did try
obj.label but it didn't work...

View 4 Replies View Related

OnChange Event Is Not Working

Jul 23, 2005

In JavaScripts checks for an onChange event against the value of the
textbox at the time of the last onChange event. Since an onChange
Event never fired after you changed the text first time , suppose we
put the same value in the text box then no event is fired.

If we put some other value then it became fired...
It wouldn't fire if we put the same value...

I don't want to use onBlur etc... Isthere any solution with onChange
Event...?

View 2 Replies View Related

Event.which Not Working In Firefox?

Jan 28, 2010

After spending hours trying out many different examples that supposedly work with IE and FF, I've decided to post here :)

This is the code I'm using to catch the down arrow:

function is_int(event)
{
var Key = event.keyCode ? event.keyCode : event.which ? event.which :

[Code].....

And called using the following on the text input of a form field:

onKeyDown="is_int(event);"

This works in IE but still not in Firefox (3.5.7). Surprised as it has the .which in there - I thought this is what FF needed?

View 1 Replies View Related

Onkeyup Event Not Working?

Jun 12, 2011

<script type="text/javascript">
function sum1()
{
noofrow = document.getElementById("NoOfRow").value-0;

[code].....

above code to get the sum of day1 day2 day3 onkeyup to get the total im really confusing above this plzz help me for to get the ttl value when key in values

View 6 Replies View Related

OnClick Event Not Working

Feb 14, 2007

I have tried every variant of javascript, cannot get this to work:

<form name="form" action="resultsmaps.asp" method="submit">
<table width="400" border="1">
<tr>
<td width="71">Author:</td>
<td width="22">


<input name="authorTick" type="checkbox" id="authorTick" onclick"document.form.authorField.disabled=false;" value="checkbox" /></td>

<td width="293"><input name="authorField" type="text" id="authorField" disabled="disabled"/></td>

when I click the textbox the field does not enable.

View 2 Replies View Related

Click Event In IE7 Not Working?

Jan 31, 2011

I have a button that is a facebook button that is coded as:

<div class="fbshare1"><a class="login-button"><span>Like</span></a></div>

In a js file, I reference it by

$('.fbshare1 .login-button span').live('click', function(e) {

It works fine in Firefox and IE8 but IE7 doesn't recognize the click. Is there a reason for that or is some other kind of problem?

View 3 Replies View Related

Add Event Listener - Not Working In IE6

Mar 22, 2007

I'm writing a custom script to collect attributes from links and concatenate them to pass as a string to another function. I'm using a readily-available 'addListener' function so the click event doesn't overwrite others on the page. All this seems to be working in all browsers except IE6, and I suspect it may have something to do with event bubbling. Can anyone see my errors and any other ways I could improve the script? Code:

View 4 Replies View Related

Event Onclick Not Working?

Apr 12, 2010

First time poster here. I have to do a project for school that involves HTML, CSS and Javascript language.The following code is running well and working in Internet Explorer and Google Chrome but not working at all in Firefox !

<script type="text/javascript">
//<![CDATA[
function aboutUs(){
window.location.href="about_us.html";

[Code]..

View 2 Replies View Related

When Event Run Function Not Working

Nov 1, 2011

In the file script.js I got 2 functions:
Code:
function tooltip(){
var m=document.getElementsByTagName("A");
var k=[];
var mover = document.createAttribute("onMouseOver");
mover.nodeValue = "showtooltip()";
for (var i = 0; i<m.length; i++) {
var mover = document.createAttribute("onMouseOver");
mover.nodeValue = "showtooltip()";
m[i].setAttributeNode(mover)
}}
This one is working. It's putting into <a href="#" title="some title" /> an attribute: onMouseOver with value: showtooltip()

And that's my 2nd function.
Code:
function showtooltip() {
document.write(this.getAttribute("title"));
}

When event is run the function isn't working. But when my html looks like this:
Code:
<a href="#" title="some title" onMouseOver="document.write(this.getAttribute("title"))">link</a>
Everything is fine. And javascript console doesn't show any errors.

My 2nd problem is, that onMouseOver doesn't work in chrome (I got dev version). Even function like this:
Code:
showtooltip() {
document.write("......");
}

View 2 Replies View Related

Window Close Event

Jul 23, 2005

<script for="window" event="onbeforeunload">
alert('Im closing');
</script>

View 3 Replies View Related

OnDrop Event Not Working Correctly

Sep 28, 2005

Been trying to work through a simple drag and drop interface using either IMG,
SPAN or DIV tags. That way I can define blocks of text and/or graphics as
draggable and be able to drop them on a similar (img, div, span, etc.) target,
preferably an image.

I can highlight text from an "<input type=text>" field and reach a target to
trigger an event (e.g. alert();), but can't get the same response when the
dragged item is a block of text or an graphic and drop it on either of the same
targets. Code:

View 4 Replies View Related

JQuery :: AJAX Event Not Working?

Apr 9, 2010

I am new to jQuery and I am trying to do an AJAX call. The only call I could get to work was getJSON (which is fine because my responses are always JSON). Firebug lets me know that the request goes out and the response that is returned is what expected, but the success function is never called. Based on the code below, I should get an alert with the response, but I don't. If the problem is a JSON parsing error, how do I find that out? If something else is the problem, what could it be?

[Code]...

View 6 Replies View Related

JQuery :: Click Event Is Not Working?

Jan 7, 2010

i'm appending a child div in a parent div. parent div has alreadychild div's which have classes ws_c1 and plus.

$
'<div></div>'
.addClass

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved