Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 6th, 2007, 03:40 PM
Registered User
 
Join Date: Apr 2007
Location: Milano, , Italy.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default value properties in INPUT field

Hi, I have another cross-browser problem.
In my page I have this fileld
<input type="password" name="photoPassword">
outside forms.
In a javascript function I wrote this code

inputPasswordField = document.getElementById("photoPassword");
oXmlHttp.open("get", "./checkPass.php?IDFoto=" + idArray[curImage] + "&Pass=" + inputPasswordField.value, true);

There's no problem with Opera and Internet Explorer, but when I try to use Firefox I receive this message: "Error: inputPasswordField has no properties".

In the Ajax book I'm reading there is a sample code which use the value properties on an INPUT field and it works, but it access in this way:
[i]oForm.elements.value
There's so many differents between two methods?

Thanks again for help

Reply With Quote
  #2 (permalink)  
Old May 6th, 2007, 03:47 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Yes, IE and Opera are wrong, getElementById should not work as there is no id on the element. Either add an id or use the forms/elements collection or use getElementsByName.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old May 6th, 2007, 05:15 PM
Registered User
 
Join Date: Apr 2007
Location: Milano, , Italy.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot...your help is very precious for me!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move next input field automatically javaean Java Basics 3 November 16th, 2007 09:27 AM
Modify field properties in linked table RickD Access 1 September 8th, 2006 06:58 AM
Moving input from textbox to field stealthdevil Access VBA 7 May 24th, 2006 11:33 AM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM
Reading field properties from an Access database Anonymouse VB Databases Basics 0 October 29th, 2004 11:44 AM



All times are GMT -4. The time now is 10:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.