Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Element submit is undefined in the form

New Here ,
Oct 31, 2011 Oct 31, 2011

Hello,this is Mr -Bat n  i am getting this error when i display forms every operations work n the error disappears after subit button is pressed then it goes  why it happens.ca anyone help me please. inthe code i have written this:

<cfif IsDefined(form.submit)>

<cfquery name="New" datasource="CFM">

Insert into dbo.City_Master(City_Id,City_Description,State_description)

Values(#CityCode#,'#Cityname#','#State#')

</cfquery>

<cfquery name="Update" datasource="CFM">

Update dbo.City_Master set City_Description='#Cityname#' where State_description='#State#'

</cfquery>

<cfquery name="Search" datasource="CFM">

Select * from dbo.City_Master

</cfquery>

</cfif>

679
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Oct 31, 2011 Oct 31, 2011

Hello Mr Bat.

It's because you've used isDefined improperly. It takes a string as an argument, you're trying to pass it the *value* of form.submit, which does not exist.

Translate
Guide ,
Oct 31, 2011 Oct 31, 2011
LATEST

Hello Mr Bat.

It's because you've used isDefined improperly. It takes a string as an argument, you're trying to pass it the *value* of form.submit, which does not exist.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources