javascript error in Mozilla Firefox 1.5.0.1

You are here:  SillyDog701 > Message Centre > Web Design and Page Coding > [sdt=10995]
SillyDog701 Forums
Author Message
senthilmca
junior member

senthilkumar
Joined: 15 Feb 2006
Posts: 6
07 Mar, 2006 8:11 am javascript error in Mozilla Firefox 1.5.0.1 [sdp=71206]  

hai! I got an error while running this code. Please provide solutionit. Thanks


CODE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Mozilla Test </TITLE>

<script language="javascript">

function call(){
alert("Inside Call");
var idVal=document.getElementById("f1").t1.value;
alert(idVal);
}
</script>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<form name="f1">
<input type="text" name="t1" size=20>
<input type="text" name="t2" onClick="call()">
</BODY>
</HTML>


Error Thrown in Javascript Console



Error: [Exception... "'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/javascript/mozillatest.html :: call :: line 9" data: no]
Source File: file:///C:/javascript/mozillatest.html Line: 9


Error: document.getElementById("f1") has no properties
Source File: file:///C:/javascript/mozillatest.html Line: 10

UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Back to top profile
akbash
silver member


Joined: 09 Feb 2004
Posts: 363
07 Mar, 2006 10:37 pm [sdp=71243]  

The first error you mention, permission denied in nsIAutoCompletePopup::selectedIndex, is a problem internal to the browser. It happens when you call for that first debugging alert(), and it seems to have something to do with calling alert() within an event handler on a text field. These things come and go in Firefox. In short, it's not your fault, it doesn't seem to have any real effect, and you need not worry about it.

The second error you mention, element has no properties, is happening because document.getElementById() finds elements by their |id| property, not by their |name| property. Your HTML sample contains no element with an id of "f1".

UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060305 Firefox/1.5
Back to top profile
onoi
new member

Cahyono
Joined: 14 Jan 2007
Posts: 1
15 Jan, 2007 1:31 am I found the solution here [sdp=81329]  

Please visit this link for your solution:

http://www.webmasterworld.com/javascript/3100508.htm

UserAgent: Opera/9.10 (Windows NT 5.1; U; en)
Back to top profile
Display posts from previous:   
Reply to topic    Forum Index > Web Design and Page Coding All times are CST (GMT -6)
page 1 of 1
To add your questions, comments, and for more features and more, please join SillyDog701 Message Centre. It's free! This is SillyDog 701 Message Centre (SD701 Forums).

App Store iTunes

*Search | FAQ | Rules and Policies | MozInfo701 - Mozilla Information Centre | SD701 Open Directory | Message Board Map | download Netscape