User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,569 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,385 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1647 | Replies: 2
Reply
Join Date: Mar 2007
Posts: 1
Reputation: mp54214 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mp54214 mp54214 is offline Offline
Newbie Poster

Help Why the following does not work in Firefox

  #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>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
Staff Writer
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Why the following does not work in Firefox

  #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  
Join Date: Jun 2007
Posts: 52
Reputation: GiorgosK is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
GiorgosK's Avatar
GiorgosK GiorgosK is offline Offline
Junior Poster in Training

Re: Why the following does not work in Firefox

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

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

All times are GMT -4. The time now is 3:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC