Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript 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 July 21st, 2006, 05:07 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default .js outside script problems

hi all,

the code below has an error message and it says that the code in bold is null or not an object, now this code is within a .js file and calls those variables from a html page outside of the .js file:

var firstname = document.recruit.firstname.value;
var age = document.recruit.age.value;
var timeplayingcss = document.recruit.timecss.value;
function validateform(){
    if (firstname == "" || firstname == null && age <= "18" ||age == "" || age == null && timeplayingcss == "" || timeplayingcss == null) {
        alert("Excuse me " + document.recruit.firstname.value + " but you've left a few fields blank");
    }
    else
    {
    window.close();
    window.open("validated.html","","width=200,height= 200");
    }
}

function close_bringup(){
    var name = document.recruit.firstname.value;
    window.close;
    window.open("index2.html");
}

thanks to anyone who can help
__________________
Apocolypse2005, I'm a programmer - of sorts.
Reply With Quote
  #2 (permalink)  
Old July 25th, 2006, 07:33 PM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you have a form on your page with the name "recruit"? E.g. <form name="recruit" ... > ?

Jon Emerson
http://www.jonemerson.net/
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
File Uploading Script Problems mercury7 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 13 January 8th, 2009 09:13 AM
Script Debugging Problems calcott VBScript 1 August 16th, 2008 02:04 AM
GoDaddy script install problems robhmac Perl 3 October 24th, 2006 07:39 AM
JS Script help... Thomas82 Classic ASP Basics 2 April 29th, 2005 05:16 AM
Repeat use of a js script fails John K. King Javascript 1 May 19th, 2004 02:56 PM



All times are GMT -4. The time now is 12:18 AM.


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