The reason why you are having problems with the "document..." is because you

are probably calling the edit handler for the image twice or passing more
than one object 
id to the edit handler. I faced a very similar problem and even created my
own version of the image 
object. My version pretty much mimics the spectra version, but I added some
more functionality. It works
great if I call the edit handler once, but gives me the same javascript
error if I call it more than once. 

Once I have that solved, I will go ahead and let you know. 

- Nitin


> -----Original Message-----
> From: Nate Smith [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 14, 2001 11:24 AM
> To:   Spectra-Talk
> Subject:      Using the File's Upload Method Results in JScript Error
> 
> Hey all,
>  
> I'm new to Spectra, and I'm having problems figuring out how to use
> Spectra's default Image and File objects embedded in my custom objects. In
> particular, I'm having problems writing my own edit handlers. I wrote an
> edit handler for a custom myArticle object that uses a custom PLP.
> Everything works fine when I'm editing text and such, but when it comes to
> editing the embedded objects I'm having problems. I asked a few questions
> and discovered that I need to invoke the file's upload and picker methods.
>  
> Ok, so I did that and now I'm getting a JScript error when I click the
> Spectra generated upload button. The error is as follows:
> document.forms[...]._cfaemptyevent' is null or not an object
>  
> Can anybody help me out here? The help documents for Spectra only show a
> code fragment and not the entire PLP code.
>  
> This makes me think that I'm not wrapping my form with a necessary Spectra
> tag that generates the JScript. The following code is my entire PLP
> handler:
>  
> <cfa_PLPHandler>
> <!--- /// Change the form.submit in the following line to be 'form.the
> name
> of your submit button' /// --->
> <CFIF IsDefined('form.submit')>
>  
>  <!--- default form processing here --->
>   <CFSET output[thisstep.name] = StructNew()>
>   <CFLOOP index="formItem" list="#Form.Fieldnames#">
>    <CFSET "output.#FormItem#" = Evaluate("Form.#FormItem#")>
>   </cfloop> 
>  <!--- marks this step as complete --->
>  <cfset thisStep.isComplete = 1>
>  <!--- progresses to the next step --->
>  <cfset thisStep.advance = 1>
>  
> <CFELSE>
>  
> <!--- the step code --->
>  <cfoutput>
>   Edit Drop Cap<BR>
>   <form action="#thisStep.url#?#thisStep.queryString#" method="POST">
>   <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
>    <TR>
>     <TD VALIGN="top"><SPAN CLASS="fieldlabel">Drop Cap:</SPAN></TD>
>     <TD VALIGN="top">
>      <cfscript>
>          stParams = structNew();
>          stParams.directoryPath =
> '#application.RootDataDir#site\images\uploads\article\dropcap\';
>          stParams.directoryURL = "site/images/uploads/article/dropcap/";
>      </cfscript> 
>      
>      <cfa_contentObject 
>          datasource="#request.cfa.objectstore.dsn#" 
>          stObject="#input.dropcap.file#"
>          stParams = "#stParams#"
>          method="upload">
>  
>     </TD>
>    </TR>
>    <TR>
>     <TD COLSPAN="2"><input type="Submit" name="submit"
> value="next&gt;&gt;"></TD>
>    </TR>
>   </TABLE>
>   </form>
>  </cfoutput>
>  
> </cfif>
> </cfa_PLPHandler> 
> 
> -
> Nate Smith, 
> Lead Developer 
> [EMAIL PROTECTED] 
> www.doceus.com 
> 
>  
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to