| | |
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
![]() |
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
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>
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
![]() |
Similar Threads
- javascript in mozilla firefox (JavaScript / DHTML / AJAX)
- 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 95 / 98 / Me)
- 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)
Views: 2915 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate array automatically autoplay beta boarder box bug button calendar captcha card cart codes column cookies createrange() css cursor date debugger decimal design developer dom download dropdown element enter error events firefox firehose flash focus form frameworks getselection google gwt html htmlform iframe image() index java javascript javascripts jawascriptruntimeerror jquery jsp listbox maps marquee masterpage menu microsoft mimic mp3 mp4 offline onmouseover parameters php player post problem programming progressbar prototype rating redirect regex safari scale scriptlets search select size sources sql starrating text textarea toggle twitter validation variables w3c web website window windowofwords windowsxp xml xspf






