473,830 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does this code do?

I've got a form which has the following code:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n FrontPage_Form1 _Validator(this )"
name="FrontPage _Form1">

It works, but I don't understand it. If I try and use this code on
another site it fails (Error: Object expected), but works with:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n true">

I think the object expected is "true", and I can see that the method in
the original code may return true or false, but I don't know where this
validation code is! Neither site has FrontPage extensions.
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat
Jul 20 '05 #1
5 5706
"Nige" <uY***@ntlworld .com> wrote in message
news:li******** *************** *********@4ax.c om...
I've got a form which has the following code:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n FrontPage_Form1 _Validator(this )"
name="FrontPage _Form1">

It works, but I don't understand it. If I try and use this code on
another site it fails (Error: Object expected), but works with:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n true">

I think the object expected is "true", and I can see that the method in
the original code may return true or false, but I don't know where this
validation code is! Neither site has FrontPage extensions.
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat

In the HTML source,
look for a JavaScript "include" file such as

<script language="javas cript" src="Validator. js"></script>

that contains:

function FrontPage_Form1 _Validator(...) {
...
}

Jul 20 '05 #2
In comp.lang.javas cript, McKirahan wrote:
In the HTML source,
look for a JavaScript "include" file such as

<script language="javas cript" src="Validator. js"></script>

that contains:

function FrontPage_Form1 _Validator(...) {
...
}


None found, but you led me onto the trail. There is a FrontPage web-bot
that does it; this is hidden when in FrontPage (sigh!).
--
Nige

Please replace YYYY with the current year
ille quis mortem cum maximus ludos, vincat
Jul 20 '05 #3
"Nige" <uY***@ntlworld .com> wrote in message
news:3e******** *************** *********@4ax.c om...
In comp.lang.javas cript, McKirahan wrote:
In the HTML source,
look for a JavaScript "include" file such as

<script language="javas cript" src="Validator. js"></script>

that contains:

function FrontPage_Form1 _Validator(...) {
...
}


None found, but you led me onto the trail. There is a FrontPage web-bot
that does it; this is hidden when in FrontPage (sigh!).


What is a WebBot?

A WebBot is a web-based robot program capable of performing certain
automatic operations. FrontPage WebBots are used by Microsoft to invoke many
of the interactive features built into FrontPage. Those features are added
to your site through the FrontPage Editor.

http://www.subspacenet.com/support/frontpage.htm
Chapter 20
Automation with FrontPage's WebBots

WebBots greatly streamline the development process and eliminate the need to
write your own scripts or add complicated HTML commands. With a WebBot you
can collect the results from forms, automatically add navigation bars,
create pages with full text searches, allow registered users to access key
areas of your Web site, and much more. There is no programming involved at
all.

http://www.emu.edu.tr/english/facili...r/bookslib/Mic
rosoft%20FrontP age%20Unleashed ,%20by%20Willia m%20Robert%20St anek/ch20.htm
Jul 20 '05 #4
Nige wrote:
I've got a form which has the following code:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n FrontPage_Form1 _Validator(this )"
name="FrontPage _Form1">

It works, but I don't understand it. If I try and use this code on
another site it fails (Error: Object expected), but works with:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n true">

I think the object expected is "true", and I can see that the method in
the original code may return true or false, but I don't know where this
validation code is! Neither site has FrontPage extensions.


Here is what is likely happening...

Somewhere in your source code that works, you have something like:
<SCRIPT LANGUAGE="JavaS cript" SRC="something. js"></SCRIPT>

This means that it is loading some javascript code, likely including
FrontPage_Form1 _Validator in the code.

In the version that fails, either you do not have the line, including
the javascript, or the code is not in the proper place on your server,
or both. Because of this, when you try to run the form validator, it
has never been defined, and you get a failure.

If you do not care about form input validation, you likely do not need
to worry about the function... just a guess.

Without seeing the server, it could be a different answer.
Brian

Jul 20 '05 #5
Nige wrote:
I've got a form which has the following code:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n FrontPage_Form1 _Validator(this )"
name="FrontPage _Form1">

It works, but I don't understand it.
Me too. It is invalid HTML (the `form' element does not
have a `language' attribute), and you have not provided
the FrontPage_Form_ 1_Validator(... ) function.
If I try and use this code on another site it fails
(Error: Object expected),
You have not included the above function, so you cannot call it.
but works with:

<form action="/cgi-bin/FormMail.pl" method="POST"
language="JavaS cript"
onsubmit="retur n true">
Of course. There is no function called here, only the `onsubmit'
handler is used in overkill (the event is never canceled, so the
event handler could be just left out.)

And it is still invalid HTML, the default scripting language (for
event handlers) is to be defined within the `head' element with

<meta http-equiv="Content-Script-Type" content="text/javascript">

(for JavaScript.)
I think the object expected is "true",
No. If `false' is returned, the `submit' event is canceled,
otherwise, and especially if `true' is returned, it is not.
The "object expected" is the Function object to be called
that is undefined.
and I can see that the method in the original code may return true
or false, but I don't know where this validation code is! Neither
site has FrontPage extensions.


I seriously doubt that. Nothing undefined can be called.[1]
PointedEars
___________
[1] By chance, this is quite similar to "Kiri-kin-tha's First Law of
Metaphysics": Nothing unreal exists. (Yes, we had a ST:4 re-run
here recently ;-))
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

70
8921
by: Roy Yao | last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ? According to my analysis, operator sizeof, (type) and * have the same precedence, and they combine from right to left. Then this expression should equal to "sizeof( (int)(*p) )", but the compiler does NOT think so. Why? Can anyone help me? Thanks. Best regards. Roy
7
1909
by: Fendi Baba | last post by:
The function is called from opencalendar(targetfield). Thanks for any hints on what could be the problem. .............................................................. var decimalPointDelimiter = ".";
8
1722
by: Kim Forbes | last post by:
I am learning Javascript; and most books only give you partial definitions for the functions they show you. Here is a line of code from a browser sniffing function: var isWin = (navigator.platform.indexOf("Win") !=-1) ? true:false; What does the -1 stand for. Excuse me for such a basic question, but I can't find the answer anyway.
58
30265
by: Larry David | last post by:
Ok, first of all, let's get the obvious stuff out of the way. I'm an idiot. So please indulge me for a moment. Consider it an act of "community service".... What does "64bit" mean to your friendly neighborhood C# programmer? The standard answer I get from computer sales people is: "It means that the CPU can process 64 bits of data at a time instead of 32." Ok... I guess I *kind* of understand what that means at an intuitive level, but what...
2
2428
by: hsharsha | last post by:
Consider the below code: int main(void) { class inner {}; friend class inner; /* what does this signify???? */ return 0; }
21
6540
by: Niu Xiao | last post by:
I see a lot of use in function declarations, such as size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE* restrict fp); but what does the keyword 'restrict' mean? there is no definition found in K&R 2nd.
10
3338
by: tony | last post by:
Hello!! I have some demo programs written in C# and they have this construction "" see below. I haven't seen this before so what does it mean ? public bool ShowDropDownButtons { get { return showDropDownButtons; }
92
6271
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
9
2019
by: James Dow Allen | last post by:
How about this idea? Post fragments of C code which seem fun, interesting or instructive. Puzzles can be posed in various ways. (What does this do? Can you see the bug? How to code this for better efficiency? Code for better readability, etc.) Best, perhaps, would be fragments from another's admirable application. "What does this do?" puzzles might need comments removed and symbols obfuscated, as I've done in both of the...
3
2049
by: qianz99 | last post by:
Hi I am not sure what this code does. I have the following questions 1. where is the case? 2. #define TLV_INTEGER(name, octets) p->name = -1; Is it define a function TLV_INTEGER(name, octets) and return a -1? and similar questions on other #define 3. in #define PDU(name, id, fields) \
0
9780
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10520
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6940
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.