<cfscript> identifies script code that is executed by CF on the server; 
<script> identifies script code that is executed by the browser on the 
client; they *look* similar but that are radically different things!

On Wednesday, August 28, 2002, at 12:17 , Kris Pilles wrote:

> I am having some trouble with some of my javascript
>
> Well my code works within
>
> <script></script> tages
> But when I put them in <Cfscript></cfscript> tags it doesn't here is the
> code:
>
> A couple functions I use throughouit my app::
>
>       <cfscript>
>               alert("Invalid SSN");
>               window.parent.document.forms[0].SSN.select();
>       </cfscript>
>
>       <cfscript>
>       window.parent.document.forms[0].first.value = '#firstname#';
>       window.parent.document.forms[0].last.value = '#lastname#';
>       </cfscript>
>
>       <cfscript>
>               alert("Invalid SSN Format");
>               window.parent.document.forms[0].SSN.select();
>       </cfscript>
>
> <script>
> function ConfirmSSN(sSSN)
> {
>       document.all.WorkFrame.src = "confirmSSN.cfm?SSN=" + sSSN;
> }
>
> function enterinfo()
>       {
>       document.employee.lastname.value = retlname;
>       document.employee.firstname.value = retfname;
>       }
> </script>
>
> I thought that the syntax between javascript and cfscript was pretty
> much interchangeable?? What is my problem???
>
>
> Please help!
>
> Thanks
>
> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 1:46 PM
> To: CF-Talk
> Subject: RE: Function?
>
>
>> Yes, you are right.  I thought that she had wanted to do javascript,
>> then serverside validation, and if something is wrong, bring them back
>
>> to the input page with prefilled fields and alert them.  If nothing is
>
>> wrong, still bring them back to the input page, except this time
>> instead of an alert message, display a submit button for them to
>> click.
>
>> heh i'm sleepy i guess
>
> Actually, dependant upon the application, I could see a situation where
> it might be beneficial to take the contents of a single input field and
> pass or submit them to an action page in the onblur() event of the
> field, thus making allmost all visible content always current, and
> eliminating the need for a submit or save button.
>
> The only drawbacks are that it makes "undo" a little unwieldy and has
> the potential to drastically increase bandwidth and server resource
> usage as a result of sending dozens if not hundreds or thousands of page
> requests for such a tiny amount of data.
>
> But the idea is interresting and possibly viable, given circumstance.
>
>
> Isaac Dealey
> Certified Advanced ColdFusion 5 Developer
>
> www.turnkey.to
> 954-776-0046
>
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to