See Raymond's response :)
<cfif isDefined("caller.form")>
//hmmm spotted problem...should name defaults differently
<cfif attributes.value NEQ value> <--- onChange
<cfset value = "Form submit successful and you changed the default!">
<cfelse>
<cfset value="Form submit successful!">
</cfif>
</cfif>
Could probably go really far and define onChange, onSubmit, etc.
methods for each input. I'd prefer the form collection itself to be an
object though, instead of a structure. This would all be easier if so.
--
jon
mailto:[EMAIL PROTECTED]
Thursday, July 17, 2003, 2:32:23 PM, you wrote:
ksc> As with Raymond's suggestion, you can't change them at runtime.
ksc> ----- Original Message -----
ksc> From: jon hall <[EMAIL PROTECTED]>
ksc> Date: Thursday, July 17, 2003 12:28 pm
ksc> Subject: Re: MSDN on CF -> ASP.net
>> Ok...if you insist.
>>
>> input.cfm:
>> <cfparam name="maxlength" default="255">
>> <cfparam name="width" default="462">
>> <cfparam name="type" default="text">
>> <cfparam name="value" default="Hello There!">
>>
>> <cfif isDefined("caller.form")>
>> <cfset value="Form submit successful!">
>> </cfif>
>>
>> <input id="#attributes.id#" type="#type#" width="#width#"
>> maxlength="#maxlength#" value="#value#">
>>
>>
>>
>> callingpage.cfm:
>> <cfimport taglib="extensions\customtags\ui" prefix="ui">
>>
>> <form method="post">
>> <ui:input id="foo">
>> <input type="submit">
>> <form>
>>
>> Untested...but it should work. Obviously this would not be usable
>> in a
>> real world scenario, I would internally in input.cfm create a
>> structure of some kind of each input contained in the calling page,
>> and use that to reference which particular input I am referencing, and
>> would want to page some kind of page context as well. Of course...I'm
>> making up stuff on the fly here, there may be an even better way.
>>
>> --
>> jon
>> [EMAIL PROTECTED]
>>
>> Thursday, July 17, 2003, 1:44:32 PM, you wrote:
>> ksc> You can change the properties of objects on the page in a
>> different place than where the object is instantiated.
>>
>> ksc> Please show me the equivalent CF code. Then we can make a
>> comparison.
>> ksc> ----- Original Message -----
>> ksc> From: Raymond Camden <[EMAIL PROTECTED]>
>> ksc> Date: Thursday, July 17, 2003 11:37 am
>> ksc> Subject: RE: RE: RE: MSDN on CF -> ASP.net
>>
>> >> Um, how is this any different from
>> >>
>> >> <cfimport ...>
>> >>
>> >> <body>
>> >>
>> >> Customer name <tag:foo>
>> >>
>> >> ?
>> >>
>> >>
>> ========================================================================>> ===
>> >> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
>> >> (www.mindseye.com)
>> >> Member of Team Macromedia
>> >> (http://www.macromedia.com/go/teammacromedia)
>> >> Email : [EMAIL PROTECTED]
>> >> Blog : www.camdenfamily.com/morpheus/blog
>> >> Yahoo IM : morpheus
>> >>
>> >> "My ally is the Force, and a powerful ally it is." - Yoda
>> >>
>> >> > -----Original Message-----
>> >> > From: [EMAIL PROTECTED] [EMAIL PROTECTED]
>> >> > Sent: Thursday, July 17, 2003 11:24 AM
>> >> > To: CF-Talk
>> >> > Subject: Re: RE: RE: MSDN on CF -> ASP.net
>> >> >
>> >> >
>> >> > Sure..
>> >> >
>> >> > Here's my .aspx page...
>> >> >
>> >> > <% Page Inherits="myPage" CodeBehind="myPage.aspx.cs" %>
>> >> >
>> >> > <html>
>> >> > <head>
>> >> > <title>My Page</title>
>> >> > </head>
>> >> >
>> >> > <body>
>> >> >
>> >> > Customer Name:
>> >> > <asp:textbox id="txtCustomer" width="462px" runat="server" />
>> >> >
>> >> > <br>
>> >> >
>> >> > <asp:button id="btnSave" text="Save" runat="server"
>> >> > cssclass="button" />
>> >> >
>> >> > </body>
>> >> > </html>
>> >> >
>> >> > Here's my codebehind page...
>> >> >
>> >> > using System;
>> >> > using System.Web;
>> >> > using System.Web.UI;
>> >> > using System.Web.UI.WebControls;
>> >> > using System.Web.UI.HtmlControls;
>> >> >
>> >> > public class maintainGroup : System.Web.UI.Page
>> >> > {
>> >> > protected System.Web.UI.WebControls.TextBox txtCustomer;
>> >> > protected System.Web.UI.WebControls.Button btnSave;
>> >> >
>> >> > // Runs when the page loads
>> >> > protected void Page_Load(object sender, System.EventArgs e)
>> >> > {
>> >> > // Let's give the textbox some text.
>> >> > txtCustomer.Text = "Hello There!";
>> >> > // Let's give it a maxlength.
>> >> > txtCustomer.MaxLength = 255;
>> >> >
>> >> > // Let's make the button call a method when it's clicked.
>> >> > btnSave.Click += new EventHandler(this.FooBar);
>> >> > }
>> >> >
>> >> > protected void FooBar(object sender, System.EventArgs e)
>> >> > {
>> >> > // Let's change the text in the button.
>> >> > btnSave.Text = "You clicked me!";
>> >> > }
>> >> >
>> >> > }
>> >> >
>> >> >
>> >> >
>> >> > ----- Original Message -----
>> >> > From: Raymond Camden <[EMAIL PROTECTED]>
>> >> > Date: Thursday, July 17, 2003 10:35 am
>> >> > Subject: RE: RE: MSDN on CF -> ASP.net
>> >> >
>> >> > > Can you give a very small example of this, i.e. real code?
>> >> > >
>> >> > >
>> >> >
>> >>
>> ======================================================================> > ==
>> >> > > ===
>> >> > > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
>> >> > > (www.mindseye.com)
>> >> > > Member of Team Macromedia
>> >> > > (http://www.macromedia.com/go/teammacromedia)
>> >> > > Email : [EMAIL PROTECTED]
>> >> > > Blog : www.camdenfamily.com/morpheus/blog
>> >> > > Yahoo IM : morpheus
>> >> > >
>> >> > > "My ally is the Force, and a powerful ally it is." - Yoda
>> >> > >
>> >> > > > -----Original Message-----
>> >> > > > From: [EMAIL PROTECTED] [EMAIL PROTECTED]
>> >> > > > Sent: Thursday, July 17, 2003 10:21 AM
>> >> > > > To: CF-Talk
>> >> > > > Subject: Re: RE: MSDN on CF -> ASP.net
>> >> > > >
>> >> > > >
>> >> > > > The paragraph is correct.
>> >> > > >
>> >> > > > You can write a presentation layer in ASP.NET with absolutely
>> >> > > > zero application logic. All the time. With no exceptions.
>> >> > > >
>> >> > > > This still isn't possible in CF, or JSP, or ASP, or PHP,
>> etc...>> > > >
>> >> > > > ----- Original Message -----
>> >> > > > From: Mike Brunt <[EMAIL PROTECTED]>
>> >> > > > Date: Thursday, July 17, 2003 10:07 am
>> >> > > > Subject: RE: MSDN on CF -> ASP.net
>> >> > > >
>> >> > > > > I'm on my way out so can't read all, but paragraph 3
>> >> > deserves some
>> >> > > > > kind of
>> >> > > > > response: -
>> >> > > > >
>> >> > > > > "ColdFusion follows the same development and page
>> >> > execution model
>> >> > > > > as that of classic ASP, PHP, JSP, and other similar
>> >> > Web-scripting
>> >> > > > > languages. Specifically, code is embedded in HTML
>> >> > markup, and as a
>> >> > > > > given
>> >> > > page
>> >> > > > > executesfrom top to bottom, the output of the code's
>> execution>> > > > > takes the place of
>> >> > > > > the embedded code in the resulting HTML document. This
>> >> > > development
>> >> > > > > model is
>> >> > > > > easy to grasp, but it does have a number of drawbacks.
>> Chief>> > > among
>> >> > > > > these is
>> >> > > > > the lack of separation between application logic and
>> >> > > presentation
>> >> > > > > markup.Mixing code and presentation makes the code
>> harder to
>> >> > > read,
>> >> > > > > which increases
>> >> > > > > the time and effort involved in maintenance, and creates
>> >> > > significant> > challenges for non-programming graphic designers
>> >> > > who need to
>> >> > > > > modify a page.
>> >> > > > > Over the years, ColdFusion has introduced several ways to
>> >> > > mitigate
>> >> > > > > this lack
>> >> > > > > of separation, including custom tags, and others-but the
>> >> > > > > fundamental model
>> >> > > > > remains."
>> >> > > > >
>> >> > > > > What about cfc's and for those who really want to move
>> >> more OO
>> >> > > > > concepts CF and Mach II. This is typical MS BS and
>> >> deserves a
>> >> > > > > response
>> >> > > from
>> >> > > > > MM in my
>> >> > > > > opinion. (A lot of bloody abbreviations there!).
>> >> > > > >
>> >> > > > > Kind Regards - Mike Brunt
>> >> > > > > Webapper Services LLC
>> >> > > > > Web Site http://www.webapper.com
>> >> > > > > Blog http://www.webapper.net
>> >> > > > >
>> >> > > > > Webapper <Web Application Specialists>
>> >> > > > >
>> >> > > > > -----Original Message-----
>> >> > > > > From: Jesse Houwing [EMAIL PROTECTED]
>> >> > > > > Sent: Thursday, July 17, 2003 8:44 AM
>> >> > > > > To: CF-Talk
>> >> > > > > Subject: MSDN on CF -> ASP.net
>> >> > > > >
>> >> > > > > First it explains what both ASP.net and Coldfusion are
>> and
>> >> that
>> >> > > > > they share a similar background. A simpel feature
>> >> comparison is
>> >> > > > > used to
>> >> > > show
>> >> > > > > how one can
>> >> > > > > convert a Coldfusion Application to ASP.net.
>> >> > > > >
>> >> > > > > It contains a few errors, especially 'forgetting' to
>> >> > mention that
>> >> > > > > a lot of functionality is available in the standard
>> JAVA
>> >> API's
>> >> > > > > which
>> >> > > van be
>> >> > > > > directlyaccessed from coldfusion (Image support in
>> ASP.net is
>> >> > > also
>> >> > > > > only available
>> >> > > > > through teh .Net framework, the same applies to SAX XML
>> >> > > support and
>> >> > > > > Threading).
>> >> > > > >
>> >> > > > > They conclude that ASP.net is more reliable, faster
>> >> > scaling better
>> >> > > > > etc. etc. without showing any figures ro numbers.
>> >> > > > >
>> >> > > > > Read it for yourself:
>> >> > > > >
>> >> > > > >
>> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-
>> >> > > > > us/dnaspp/html/coldfusiontoaspnet.asp
>> >> > > > >
>> >> > > > > Jesse
>> >> > > > >
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >>
>> ksc>
>>
ksc>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4