About #upload{} in form error

11 views
Skip to first unread message

郎咸武

unread,
Feb 10, 2012, 12:36:38 AM2/10/12
to nitro...@googlegroups.com

hi everyone
 i using #uploade{} element uplade file. It cant not upload. It appear some error in chrome browse(
  1. Uncaught TypeError: Cannot set property 'action' of undefined
    1. NitrogenClass.$uploadnitrogen.js:186
    2. anonymousprofile:135
    3. c.event.handlejquery.js:55
    4. c.event.add.j.handle.o
). 
What is this wrong?
If i using #uploade{} not in form. It is ok. Why?

thank everyone

-------some code------ 
 49                     <form action="https://miyuer.com/settings/accounts/update"  method="post">                                                    
 50                       [[[page:settings()]]]
 51                     </form>

page:settings------code
 69         #panel{class="clearfix", body=     
 70             [
 71              #label{text="头像"},           
 72              #panel{class="input", body=[#upload{tag=photo, show_button=false}]}]},

 91     CardBody=[Photo],                                                                                                                             
 92     Body = #panel{id=div_vCard, body=CardBody}
 93            %%#panel{class="clearfix",body=["ickname"]}
 94             ,
 95     wf:update(div_vCard, Body);    
-- 
只为成功找方法,不为失败找理由

Jesse Gumm

unread,
Feb 10, 2012, 8:08:48 PM2/10/12
to nitro...@googlegroups.com
I'm not sure why defining a form around the upload element causes an
error, but I can say that the upload element doesn't need a form (in
fact, none of the built-in form elements in nitrogen need a form
defined).

But it should be a little more resilient than it currently is and not
throw an error.

-Jesse

2012/2/9 郎咸武 <langx...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to
> nitrogenweb...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nitrogenweb?hl=en.

--
Jesse Gumm
Sigma Star Systems
414.940.4866
gu...@sigma-star.com
http://www.sigma-star.com

Lxw

unread,
Feb 10, 2012, 8:36:33 PM2/10/12
to nitro...@googlegroups.com
First,thank you.
i look up source code. You are right.
thanks
jason

Jesse Gumm <gu...@sigma-star.com>编写:

Reply all
Reply to author
Forward
0 new messages