Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 2nd, 2008, 09:43 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Submit form and validation ind IE 6.0 and Firefox

I have a form with, where a validation scripts checks wether fields are filled by the user. This works perfect in IE 6.0 - but NOT in
Firefox - and I guess not in IE 70
I showed the essential code below. Note : that the submit button has the type of 'button' . (works in IE60 - but can't be submittet with Firefox)
If I change the input type to 'submit' when the Form submits with Firefox but the validation script is not executed , and form is posted without all the nessary data.
Please someone out there ...HELP - I need somebody help - just anaybody Help...

best wishes - Otto

<form action="form_ac.asp" method="post" name="formadd" id="persondata">

<input type="button" name="btnSubmit" value="Registrer data">

Sub btnSubmit_OnClick()
If Len(formadd.stryear.value) = 0 THEN
Alert "Du skal vælge din årgang- TAK!"
Exit Sub

elseif Len(formadd.hold_id.value)= 0 then
Alert "Du skal vælge din klasse - TAK!"
Exit sub

elseif Len(formadd.fornavn.value)= 0 then
Alert "Du skal angive dit fornavn - TAK!"
Exit sub
Call formadd.submit()
Old February 2nd, 2008, 09:56 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You are using VBScript which is NOT supported by Firefox. In fact, it's only supported by IE.

Search Google for JavaScript validation and you'll find plenty results showing you how to proceed with JavaScript.

Feel free to post here with any follow up questions, although the JavaScript category here at p2p.wrox.com would probably be a better place to post.


Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Old February 2nd, 2008, 11:48 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks a lot for quick response.
I just so lovely when one finds simple solutions
to ones problems ..:-) Best wishes -Otto Leholt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox Error when Form Floated / Form locks socoolbrewster CSS Cascading Style Sheets 5 October 6th, 2007 09:59 PM
How to put validation with Javascript in Firefox. nitinp ASP.NET 2.0 Professional 0 February 7th, 2007 05:15 AM
Firefox Problem - submit form mattastic Javascript How-To 4 July 19th, 2005 07:30 AM
Checking validation of a textbox on submit Lucy Javascript How-To 7 November 23rd, 2004 07:25 AM
How can we submit a form without a submit butto phpsharma BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 October 20th, 2003 08:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.