Escaping ()

by jkeilholz <jkeilholz(at)triad.rr.com>

 Date:  Thu, 27 Jun 2002 13:47:58 -0700 (PDT)
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Hey All!

I'm trying to check a variable in a form but I am having a slight difficulty
with the name of it. Due to the cgi script that I am using I need to have
the name of the form equal to "$char(1)_understand" so that it requires a
value for the field. However, I am also trying to verify the form through
Javascript before I pass the form to the script so that if they don't give
the correct answer the user will be alerted to respond. In doing so I am
writing a simple little verifier such as:

		accepted = form1.$char(1)_understand.value;
	if (accepted == "agree"){
		return true;
		}

BUT>>>> The problem lies in the (). Netscape continuously tells me that it's
expecting a ; following that spot but of course that's not what I want to
do. I'm trying to determine the best approach for the regular expression but
there doesn't seem to be anything to escape the line. I've even tried the
expression /(form1\.\$\char\(1\)_understand\.value)/ but it still doesn't
work. Any one have any ideas?

Thanks in Advance,
Joe Keilholz


BTW: If you'd like to see the full page, go to
http://www.news-record.com/store/archives.html 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.