473,651 Members | 2,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is this not converting to lowerCase

40 New Member
Hi!

[HTML]<html>
<head>
<script type="text/javascript">
function upperCase()
{
var x=document.getE lementById("fna me").value;
document.getEle mentById("fname ").value=x.toUp perCase();
}
function lowerCase()
{
var x=document.getE lementByName("l name").value;
document.getEle mentByName("lna me").value=x.to LowerCase();
}
</script>
</head>

<body>

Enter your fname:
<input type="text" id="fname" onblur="upperCa se()">
<br>
lname <input type="text" name="lname" onblur="lowerCa se()">

</body>
</html>[/HTML]

why it is not being conveting to lowercase in second text field



What is the actual difference between getElementById and getElementByNam e
Dec 12 '07 #1
1 1815
gits
5,390 Recognized Expert Moderator Expert
hi ...

there is simply no function called getElementByNam e() but you may use getElementsByNa me() (note: its Elements) what gives you a list and you have to select the first of the returned nodes ...

kind regards
Dec 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2123
by: ToddT | last post by:
i'm trying to convert names to their proper case (e.g. "todd" -> "Todd") using the following rountine: Private Function ConvertToProperCase(ByVal stringValue As String) As String Dim ci As New System.Globalization.CultureInfo("en-US", False) Dim properCaseValue As String properCaseValue = stringValue.Replace("'", "' ")
13
2483
by: Gil | last post by:
I have a string : string A = "2"; I need to get it's integer value : // ?? int val = A ; // ??
29
3892
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant would you recommend? The w3c HTML validator mentions XHTML 1.0 Transitional, Basic, Strict, and XHTML 1.1. Would I be able to make my existing CSS work in the XHTML page without modification to the .css file?
10
2858
by: jose.jeria | last post by:
I use the following to convert uppercase to lowercase: translate($queryString, 'ABCDE...', 'abcde...') But how can i convert the case for umlauts? öåä etc
4
7610
by: Marlon R | last post by:
What is the fastest way to tell in string contains lower case letters?
2
1344
by: Paul | last post by:
Hi, As most people who use the FileSystemWatcher know, it returns lowercase text for some strange reason. I know there's a workaround for the lowercase the FileSystemWatcher returns by by passing the 'FullPath' property into the constructor of a DirectoryInfo Class and reading the 'Name' property but I'm not sure how or where I'd fit that into my code. Could someone point me in the right direction? Cheers, Paul
1
1253
by: larpup | last post by:
I've converted my frontend and backend from A2003 to A2000. Data is linked, however, I receive "recordset not updateable". Additionally my code stops on a simple function which turns data in a field from lowercase to uppercase (not updateable). I checked my references only difference is using M.A. 9.0 Object library instead of 11. Both frontend and backend state A2000. Lastly, the frontend and backend will function in A2003, but not in...
2
10296
by: evantri | last post by:
Hi everyone, I am required to write a standard C function to import the single character variable and return the lowercase version of the character int upper_to_lower ( char singlecharacter ) { if ( ( singlecharacter >= 'A' ) && ( singlecharacter <= 'Z' ) ) { // returning the uppercase version here } else
24
1806
by: Fumeur | last post by:
Is the following program standard conform? (reduced as much as possible so it still shows the problem) /* begin */ #include <stdio.h> void xfprintf(FILE *); void xfprintf(FILE *f) { fprintf(f, "x\n");
0
8277
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.