•
•
•
•
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 391,559 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 2,743 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: 1602 | Replies: 2
![]() |
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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>
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>
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
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!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
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 ....
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 ....
GiorgosK
Web developer/marketer
------------------
Free online games Chios studios Chios Apartments Chania studios Chios Greece travel guide
Web developer/marketer
------------------
Free online games Chios studios Chios Apartments Chania studios Chios Greece travel guide
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
addiction ajax asp beta blackberry bon browser browsers browsing developer development echo email encryption europe firefox gecko home html internet internet explorer javascript leak linux memory microsoft mozilla msdn networking news office open source open-source patch phishing scams security site social software sql super survey teleworking testing users vista web webmail work
- Internet Explorer is not working - Firefox is (Viruses, Spyware and other Nasties)
- Why javascript does not work on firefox? (JavaScript / DHTML / AJAX)
- "add this site to your bookmarks" in firefox (JavaScript / DHTML / AJAX)
- Can't Get Flash To Work (Windows 9x / Me)
- javascript in mozilla firefox (JavaScript / DHTML / AJAX)
- FireFox Image Source URL (PHP)
- site does not work on mozilla (PHP)
- "Set as Startpage" for Firefox. (HTML and CSS)
- IE over Firefox? (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Help with hyperlinks!
- Next Thread: Add a tag(Java)



Linear Mode