I just looked at it. Your getting this problem because you are literally doing 
a hard post to /ajax_request/...... its no wonder its dumping the response to 
the browser. 

I see you have two options; one is to just stuff the normal form in an element 
hidden within the page and then display that form within the box using 
javascript (thus giving the form the correct action). Otherwise, just submit 
the form via AJAX. 

Does that help?

Cheers, Tim


On 12 Jan 2010, at 05:50, stephanos wrote:

> I don't want to appear pushy but this thing is really show stopper for
> me
> and I bet it's pretty obvious/easy for you to fix. If not I apologize
> for my impatience :-)
> 
> On Jan 9, 10:15 am, stephanos <[email protected]> wrote:
>> Okay, this took my a while (new to git/github) - but here is my
>> stripped down version of the 
>> problem:http://github.com/stephanos/liftweb-fileupload-modal-issue/
>> 
>> Hope it helps :-)
>> 
>> On Jan 7, 8:14 pm, David Pollak <[email protected]> wrote:
>> 
>>> Stephanos,
>> 
>>> It would be ideal if you could put up a quick project on GitHub that
>>> demonstrates the problem.  Having reproducible code helps us solve problems
>>> faster.  Any chance you could do that?
>> 
>>> Thanks,
>> 
>>> David
>> 
>>> On Wed, Jan 6, 2010 at 11:17 PM, stephanos 
>>> <[email protected]>wrote:
>> 
>>>> Hi guys,
>> 
>>>> I'm stuck with this problem for a few days now and need help. I want
>>>> users to be able touploada ZIPfile. When I embed this functionality
>>>> directly in the page it works flawlessly - but I need to put it into a
>>>> modal and that's were the trouble starts.
>> 
>>>> When I submit the form it executes correctly but it prints (!) the
>>>> response to the browser:
>>>>   try{jQuery("#lift__noticesContainer__").each(function(i)
>>>> {this.innerHTML = "<div class=\"success\"><ul><li>Thanks for the
>>>> upload!</li></ul> </div>";});} catch (e) {}
>> 
>>>> The code looks right but it shouldn't print to the screen. What am I
>>>> doing wrong?
>> 
>>>> #########################################################
>>>> My current progress (using M8):
>> 
>>>> HTML:
>>>>    <lift:SourceUpload form="post" multipart="true">
>>>>        <fieldset style="width: 90%; margin: 0 auto">
>>>>            <strong>At first</strong> select the zipfile<upload:file/
>> 
>>>>            <br/><br/>
>>>>            and <strong>then</strong> push
>>>>            <input type="submit" value="upload!"/>
>>>>        </fieldset>
>>>>    </lift:SourceUpload>
>> 
>>>> CODE:
>>>>    def request(in: NodeSeq) =   // opensfileuploadmodal
>>>>        ajaxButton(in, () => S.runTemplate(List("/katas/share")).
>>>>                   map(ns => ModalDialog(ns)) openOr Alert("Internal
>>>> error: Couldn't find template!"))
>> 
>>>>    def render(in: NodeSeq): NodeSeq = bind("upload", "file" ->
>>>> SHtml.fileUpload(processFile _))
>>>>    ....
>> 
>>>> Cheers,
>>>> Stephan
>> 
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Lift" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<liftweb%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/liftweb?hl=en.
>> 
>>> --
>>> Lift, the simply functional web frameworkhttp://liftweb.net
>>> Beginning Scalahttp://www.apress.com/book/view/1430219890
>>> Follow me:http://twitter.com/dpp
>>> Surf the harmonics
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to