Why the following does not work in Firefox

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Mar 2007
Posts: 1
Reputation: mp54214 is an unknown quantity at this point 
Solved Threads: 0
mp54214 mp54214 is offline Offline
Newbie Poster

Why the following does not work in Firefox

 
0
  #1
Jul 13th, 2007
Hi,

Can anyone say, why the following TEXTAREA-enlargening javaScript does not work in Firefox even though it works ok in IE7?
============================================

<html>
<head></head>

<body>
<form name="form1" method="post" action="" id="form1">
<br />
<br />
<textarea name="TextBox1" rows="4" cols="15" id="TextBox1" onClick="enLargeTbox(this.name)" onMouseOut="ReduceTbox(this.name)"></textarea><br />

<textarea name="TextBox2" rows="4" cols="15" id="TextBox2" onClick="enLargeTbox(this.name)" onMouseOut="ReduceTbox(this.name)"></textarea><br />

<textarea name="TextBox3" rows="4" cols="15" id="TextBox3" onClick="enLargeTbox(this.name)" onMouseOut="ReduceTbox(this.name)"></textarea>


<script language=javascript>
function enLargeTbox(a){
var cbobject= document.form1.elements(a)
cbobject.rows = 40
cbobject.cols = 30
}

function ReduceTbox(a){
var cbobject= document.form1.elements(a)
cbobject.rows = 4
cbobject.cols = 15
}
</script>
</form>
</body>

</html>
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Why the following does not work in Firefox

 
0
  #2
Jul 14th, 2007
Check the firefox javascript error console. It will tell you what error it sees.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 52
Reputation: GiorgosK is an unknown quantity at this point 
Solved Threads: 1
GiorgosK's Avatar
GiorgosK GiorgosK is offline Offline
Junior Poster in Training

Re: Why the following does not work in Firefox

 
0
  #3
Jul 14th, 2007
You are using very archaic javascript techniques

Either go with a cross browser javascript library (dojo, jquery, scriptaculous, mochikit, mootools )

or find a code that works "cross-browser"

I would go with the former, it takes a little bit of learning but you want have to think about browser incompatibilities anymore ....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 2915 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC