Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30847

Re: How fetch data from form for javascript screening

From Robert Baer <robertbaer@localnet.com>
Newsgroups comp.lang.javascript
Subject Re: How fetch data from form for javascript screening
References <ti0hz.37337$Z95.7322@fx29.iad> <7944450.CDJkKcVGEf@PointedEars.de>
Message-ID <Itdhz.1$uD.0@fx17.iad> (permalink)
Date 2016-07-12 13:40 -0800

Show all headers | View raw


Thomas 'PointedEars' Lahn wrote:
> Robert Baer wrote:
>
>>     What i have..(comments 'mobile' and '686' are correct)..help?
>
> <http://catb.org/esr/faqs/smart-questions.html>
>
>> <script type="text/javascript">
>> // ** Screening code to use follows
>
> “Screening”?
* Yes; ASSuME i can get the data entered in the form fields, i want to 
test according to certain criteria and REJECT the "e-mail" attempt.

>
>>     document.writeln("First check addressing.. ");
>>
>>     var subjptr=7;
>>
>>     tstE= EBody[subjptr];
>
> 1. Assignment to undeclared identifier.
>
> 2. “EBody” should probably be “eBody”.
* Well,the assignment does that. I used the name EBody  for the array; 
could have mixed the character cases at randumb for all javascript cares.

>
>>     document.writeln("EBody[7]="+tstE+", ");   //  mobile
>
>    document.writeln("EBody[" + subjptr + "]=" + tstE + ", ");   //  mobile
>
> would be wiser.  However, see the FAQ on debugging.
* Point taken; thanks.

>
>>     gott= Email.indexOf(tstE);
>
> Assignment to undeclared identifier.
* Been thru that already (above).

>
>>     document.writeln("Email.indexOf('mobile')="+gott+"<BR><BR>");   //  686
>>
>> // ** Note: The getElementsByClassName() method is not supported in
>> //  Internet Explorer 8 and earlier versions.
>>
>> </SCRIPT>
>>
>>
>>    <form name="dataholder" action="">
>
> How can the user submit that form without script support?
* I know absolutely NOTHING how forms work.
* for an input form that DOES work without script support, see 
http://www.oil4lessllc.com/index-4.html.

>
>>      <div class="form-group">
>>        <label>Your Name<span style="color:#F00">*</span></label>
>
> Use stylesheet rules, avoid style attributes.
* I know less about style sheets than a fly.

>
>>        <input type="text" class="form-control" name="QN" id="#">
>
> Invalid ID except in HTML5.<http://validator.w3.org/>
* Stolen coding that i am fiddling with in futile attempts to get info 
from form to javascript.

>
>> […]
>>        <!-- The browser must use the tpe for crude checkfor te @ sign -->
>
> I beg your pardon?
   Note: input type="email"; the browser must be doing the checking for 
an "@" sign - input must be like x@x and not xxx.

>
>>        <input type="email" class="form-control" name="QE" id="#">
>
> Invalid, duplicate ID.
* Again,stolen code. Removing the id= totally makes zero difference.

>
>> […]
>>        <input type="text" class="form-control" name="QS" id="#">
>
> Invalid, duplicate ID.
*  Moo; herd you first time.

>
>> <script type="text/javascript">
>>
>> // do not know what to do to get those variables
>
> That is not a question.
* OK, it was a statement. _HOW_ do i get this to work?
   Code stolen from http://www.oil4lessllc.com/index-4.html.

>
>> //  following gives undefined
>> //    Qmsg=document.getElementsByName("form-control").innerHTML ;
>> //    document.writeln(Qmsg+"|<BR>");
>
> getElement*s*ByName
* Yes; online guides indicated a message field/block is an array; that 
reading from a multi-line field/block is done by a set (array) of elements.
   I could change that, but the change will not fix the rest of the 
problems.

>
   How can i transfer the data?

   Thanks.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-11 22:41 -0800
  Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-12 11:38 +0200
    Re: How fetch data from form for javascript screening "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-12 11:50 +0200
      Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-12 13:50 -0800
        Re: How fetch data from form for javascript screening "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-13 00:09 +0200
          Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-12 17:27 -0800
        Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-13 01:15 +0200
          Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-12 18:53 -0800
            Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-13 18:03 +0200
              Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-14 00:16 -0800
                Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-14 23:40 +0200
    Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-12 13:40 -0800
      Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-13 01:09 +0200
        Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-12 17:51 -0800
          Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-14 01:07 +0200
  Re: How fetch data from form for javascript screening "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-13 14:30 +0200
    Re: How fetch data from form for javascript screening Robert Baer <robertbaer@localnet.com> - 2016-07-13 23:56 -0800
      Re: How fetch data from form for javascript screening Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-15 11:32 +0200

csiph-web