?
Solved

Coldfusion 8 required field does not work

Posted on 2009-07-11
7
Medium Priority
?
377 Views
Last Modified: 2013-12-16
I have a required field which is not working.  Per this thread

http://www.experts-exchange.com/Web_Development/Software/Macromedia_Dreamweaver/Q_22834971.html

Even though I was able to browse to the /cfide/scripts folder, I copied the cfide folder into my site root and added scriptSrc="/CFIDE/cfform.js" to the cfform tag and still no go.  There is also a mapping to the cfide folder in the cf8 admin panel.

It fails in both ie7 and FF. Details:

Form tag:
    <cfform method="post" id="form1" action="#cgi.SCRIPT_NAME#?client_id=#url.client_id#&action=#url.action#" preservedata="yes" scriptSrc="/CFIDE/cfform.js">

Field tag:
<cfinput type="text" name="client_company" id="client_company" value="#c.client_company#" size="80" maxlength="100" required="yes"  message="Please enter the Client company name." />

Viewing page source, among everythingthere, I see:

<script type="text/javascript" src="/CFIDE/cfform.js"></script>
<script type="text/javascript" src="/CFIDE/masks.js"></script>
<script type="text/javascript">
      if (window.ColdFusion) ColdFusion.required['client_company']=true;
</script>
        //form element client_company required check
        if( !_CF_hasValue(_CF_this['client_company'], "TEXT", false ) )
        {
            _CF_onError(_CF_this, "client_company", _CF_this['client_company'].value, "Please enter the Client company name.");
            _CF_error_exists = true;
        }

It SEEMS like everything is correct.  

Ideas anyone?
0
Comment
Question by:Richard__G
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 52

Expert Comment

by:_agx_
ID: 24835701
> I copied the cfide folder into my site root and added scriptSrc="/CFIDE/cfform.js"
> to the cfform tag

If you copied the whole CFIDE folder, then wouldn't the files still be located in:

      /CFIDE/Scripts/cfform.js
      ... etc...

And not

       /CFIDE/cfform.js
0
 

Author Comment

by:Richard__G
ID: 24886620
Sorry, yes.  I changed it to /CFIDE/Scripts/cfform.js and still have the same problem.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 24886751
I agree the settings seem correct, but obviously not ;-)  About 95% of the time the problem is one of three things:

1) A problem with the /CFIDE mapping. The mapping should be from the _root_ of your site. (If you are using IIS you may need to create a virtual mapping)
2) The files are not where you think they are (ie you are using the wrong path or they were copied to a different location)
3) The js files do not actually exist in that folder. Check the physical files and paths

You should be able to view the javascript files directly from your browser:

         http://yoursite.com/CFIDE/Scripts/cfform.js

If you receive an http 404 error then check the 3 things above
http://kb2.adobe.com/cps/186/tn_18653.html

> I changed it to /CFIDE/Scripts/cfform.js

Though either way should work, if the files are in the default location /CFIDE/Scripts/*, you do not have to  use "scriptSrc".  Note the "/" means from the root of your site.  
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:Richard__G
ID: 24887409
I really appreciate your help, thanks!

Guess what... my fault.

I finally focused on the fact that this is the only form misbehaving and just kept removing elelments.  Turns out I had a field with an ID DIFFERENT from its  field name. Once I matched them up, bingo. It worked.  Argggg.

So how do points work in this situation? Please reply with the above solution so I can give you some!



0
 
LVL 52

Expert Comment

by:_agx_
ID: 24888061
Well there are some general guidelines for when an expert solves the problem for you. But you solved your own problem ;-)  So in my opinion this one is entirely up to you.  I would be okay with anything you decide (including PAQ'ing and requesting a point refund).
0
 

Accepted Solution

by:
Richard__G earned 0 total points
ID: 24889421
Heck - they're yours for trying to help, it kept me focused.  Can you include the below in a reply and I'll award them to that?  Thanks again!

I agree the settings seem correct, but obviously not ;-)  About 95% of the time the problem is one of three things:

1) A problem with the /CFIDE mapping. The mapping should be from the _root_ of your site. (If you are using IIS you may need to create a virtual mapping)
2) The files are not where you think they are (ie you are using the wrong path or they were copied to a different location)
3) The js files do not actually exist in that folder. Check the physical files and paths

You should be able to view the javascript files directly from your browser:

         http://yoursite.com/CFIDE/Scripts/cfform.js

If you receive an http 404 error then check the 3 things above
http://kb2.adobe.com/cps/186/tn_18653.html

> I changed it to /CFIDE/Scripts/cfform.js

Though either way should work, if the files are in the default location /CFIDE/Scripts/*, you do not have to  use "scriptSrc".  Note the "/" means from the root of your site.  
---------------------------------------------------------------------------------------------
Guess what... my fault.

I finally focused on the fact that this is the only form misbehaving and just kept removing elelments.  Turns out I had a field with an ID DIFFERENT from its  field name. Once I matched them up, bingo. It worked.  Argggg.

So how do points work in this situation? Please reply with the above solution so I can give you some!
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 800 total points
ID: 24893287
Didn't I already post that above?  ;-)  ( I do not use the "ask a question" feature much, so I have very little experience with the closing a question options )
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question