Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Jim Steil

I am using FancyBox to display my modal dialog.  www.fancybox.net.

I believe it does support callbacks.  I just don't know how to register 
it so that it is executed after the form has been accepted and the db 
updated.


-Jim

On 8/30/2011 3:14 PM, Bruno Rocha wrote:


What modal lib are you using?

It support js callbacks?

In nyro I can specify some JS to be included inside model frame.

You can have a view to be used only with crud and input the javascript 
there.


http://zerp.ly/rochacbruno

Em 30/08/2011 17:01, "Jim Steil" mailto:j...@qlf.com>> 
escreveu:

> Still stuck on this one. Anyone have any advice?
>
> The problem (as it stands now) is after an update to the record via a
> modal edit form, I can't get the 'next' url to load in the main window.
> It is now displaying in the modal window (iFrame). Bruno recommended
> executing some JS to set the window.parent.location but I don't know
> where I'd specify this. Any help would be appreciated.
>
> -Jim
>
> On 8/25/2011 4:59 PM, Jim Steil wrote:
>> It would appear that I can supply an 'onaccept' argument on a
>> crud.create that is a function or list of functions to be executed
>> after the record is updated. Is there a way I could use this to
>> change the 'target' on the form submission in the event of a
>> successful update?
>>
>> Again, any help would really be appreciated. I'm pulling my hair out
>> on this one...
>>
>> -Jim
>>
>> On 8/25/2011 10:10 AM, Jim Steil wrote:
>>> Ok, found what was causing the problem.
>>>
>>> On my page that I'm loading in my modal window I was specifying a
>>> different view. This view had:
>>>
>>> 
>>>
>>> ...in the  section. This caused all submits/re-displays to go
>>> to the parent to display. If I take it out it works as expected.
>>> However, now (as Bruno mentioned) when I submit my form the next url
>>> is loaded in the modal as well. I'm using CRUD in my modal window,
>>> how/where do I specify the window.parent.location='next url' as Bruno
>>> mentioned?
>>>
>>> Thanks again.
>>>
>>> -Jim
>>>
>>> On 8/25/2011 8:18 AM, Jim Steil wrote:
 Anthony and Bruno

 Thank you for your replies. I tried nyroModal but get the same
 results as with FancyBox (which I've been using). I am going to
 work up a simple app that shows my problem. Either that will show
 me where my problem lies or provide something simple for you to see
 the behavior I'm dealing with.

 Thanks again for the input.

 -Jim

 On 8/24/2011 6:13 PM, Bruno Rocha wrote:
>
> Your modal uses Iframe?
>
> nyroModal needs target='_blank' to open in iframe and work as 
you want.

>
> Other modal plugins has other ways for doing it.
>
> For redirect in parent window. You ll need to execute a javascript
> inside modal.
>
> window.parent.location = ''
>
> http://zerp.ly/rochacbruno
>
> Em 24/08/2011 17:55, "Jim Steil"  >>

> escreveu:
> > Hi
> >
> > I have a crud.update that I'm displaying in a modal iFrame. 
This is

> > working fine for me except when there is an error in the form and
> crud
> > redisplays with the error message. This is opening outside the
> iFrame
> > when I want it to load inside the iFrame. But, on submit, the
> next url
> > should load outside the iFrame.
> >
> > Make any sense? Any advice on where to look to get this working
> the way
> > I want?
> >
> > -Jim
> >
> >


Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Bruno Rocha
if using IFRAME:

$('.yourselector iframe').load( function(){ $('body',
$('iframe').contents()).prepend('JS HERE  '); });


Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Bruno Rocha
What modal lib are you using?

It support js callbacks?

In nyro I can specify some JS to be included inside model frame.

You can have a view to be used only with crud and input the javascript
there.

http://zerp.ly/rochacbruno
Em 30/08/2011 17:01, "Jim Steil"  escreveu:
> Still stuck on this one. Anyone have any advice?
>
> The problem (as it stands now) is after an update to the record via a
> modal edit form, I can't get the 'next' url to load in the main window.
> It is now displaying in the modal window (iFrame). Bruno recommended
> executing some JS to set the window.parent.location but I don't know
> where I'd specify this. Any help would be appreciated.
>
> -Jim
>
> On 8/25/2011 4:59 PM, Jim Steil wrote:
>> It would appear that I can supply an 'onaccept' argument on a
>> crud.create that is a function or list of functions to be executed
>> after the record is updated. Is there a way I could use this to
>> change the 'target' on the form submission in the event of a
>> successful update?
>>
>> Again, any help would really be appreciated. I'm pulling my hair out
>> on this one...
>>
>> -Jim
>>
>> On 8/25/2011 10:10 AM, Jim Steil wrote:
>>> Ok, found what was causing the problem.
>>>
>>> On my page that I'm loading in my modal window I was specifying a
>>> different view. This view had:
>>>
>>> 
>>>
>>> ...in the  section. This caused all submits/re-displays to go
>>> to the parent to display. If I take it out it works as expected.
>>> However, now (as Bruno mentioned) when I submit my form the next url
>>> is loaded in the modal as well. I'm using CRUD in my modal window,
>>> how/where do I specify the window.parent.location='next url' as Bruno
>>> mentioned?
>>>
>>> Thanks again.
>>>
>>> -Jim
>>>
>>> On 8/25/2011 8:18 AM, Jim Steil wrote:
 Anthony and Bruno

 Thank you for your replies. I tried nyroModal but get the same
 results as with FancyBox (which I've been using). I am going to
 work up a simple app that shows my problem. Either that will show
 me where my problem lies or provide something simple for you to see
 the behavior I'm dealing with.

 Thanks again for the input.

 -Jim

 On 8/24/2011 6:13 PM, Bruno Rocha wrote:
>
> Your modal uses Iframe?
>
> nyroModal needs target='_blank' to open in iframe and work as you
want.
>
> Other modal plugins has other ways for doing it.
>
> For redirect in parent window. You ll need to execute a javascript
> inside modal.
>
> window.parent.location = ''
>
> http://zerp.ly/rochacbruno
>
> Em 24/08/2011 17:55, "Jim Steil" mailto:j...@qlf.com>>
> escreveu:
> > Hi
> >
> > I have a crud.update that I'm displaying in a modal iFrame. This is
> > working fine for me except when there is an error in the form and
> crud
> > redisplays with the error message. This is opening outside the
> iFrame
> > when I want it to load inside the iFrame. But, on submit, the
> next url
> > should load outside the iFrame.
> >
> > Make any sense? Any advice on where to look to get this working
> the way
> > I want?
> >
> > -Jim
> >
> >


Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Anthony
On Tuesday, August 30, 2011 4:00:17 PM UTC-4, Jim S wrote:
>
>  Still stuck on this one.  Anyone have any advice?
>
> The problem (as it stands now) is after an update to the record via a modal 
> edit form, I can't get the 'next' url to load in the main window.  It is now 
> displaying in the modal window (iFrame).  Bruno recommended executing some 
> JS to set the window.parent.location but I don't know where I'd specify 
> this.  Any help would be appreciated.
>

Maybe have the 'next' URL return a blank page that immediately executes the 
JS in the head.

Anthony


Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Jim Steil

Still stuck on this one.  Anyone have any advice?

The problem (as it stands now) is after an update to the record via a 
modal edit form, I can't get the 'next' url to load in the main window.  
It is now displaying in the modal window (iFrame).  Bruno recommended 
executing some JS to set the window.parent.location but I don't know 
where I'd specify this.  Any help would be appreciated.


-Jim

On 8/25/2011 4:59 PM, Jim Steil wrote:
It would appear that I can supply an 'onaccept' argument on a 
crud.create that is a function or list of functions to be executed 
after the record is updated.  Is there a way I could use this to 
change the 'target' on the form submission in the event of a 
successful update?


Again, any help would really be appreciated.  I'm pulling my hair out 
on this one...


-Jim

On 8/25/2011 10:10 AM, Jim Steil wrote:

Ok, found what was causing the problem.

On my page that I'm loading in my modal window I was specifying a 
different view.  This view had:




...in the  section.  This caused all submits/re-displays to go 
to the parent to display.  If I take it out it works as expected.  
However, now (as Bruno mentioned) when I submit my form the next url 
is loaded in the modal as well.  I'm using CRUD in my modal window, 
how/where do I specify the window.parent.location='next url' as Bruno 
mentioned?


Thanks again.

-Jim

On 8/25/2011 8:18 AM, Jim Steil wrote:

Anthony and Bruno

Thank you for your replies.  I tried nyroModal but get the same 
results as with FancyBox (which I've been using).  I am going to 
work up a simple app that shows my problem.  Either that will show 
me where my problem lies or provide something simple for you to see 
the behavior I'm dealing with.


Thanks again for the input.

-Jim

On 8/24/2011 6:13 PM, Bruno Rocha wrote:


Your modal uses Iframe?

nyroModal needs target='_blank' to open in iframe and work as you want.

Other modal plugins has other ways for doing it.

For redirect in parent window. You ll need to execute a javascript 
inside modal.


window.parent.location = ''

http://zerp.ly/rochacbruno

Em 24/08/2011 17:55, "Jim Steil" mailto:j...@qlf.com>> 
escreveu:

> Hi
>
> I have a crud.update that I'm displaying in a modal iFrame. This is
> working fine for me except when there is an error in the form and 
crud
> redisplays with the error message. This is opening outside the 
iFrame
> when I want it to load inside the iFrame. But, on submit, the 
next url

> should load outside the iFrame.
>
> Make any sense? Any advice on where to look to get this working 
the way

> I want?
>
> -Jim
>
>


Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
It would appear that I can supply an 'onaccept' argument on a 
crud.create that is a function or list of functions to be executed after 
the record is updated.  Is there a way I could use this to change the 
'target' on the form submission in the event of a successful update?


Again, any help would really be appreciated.  I'm pulling my hair out on 
this one...


-Jim

On 8/25/2011 10:10 AM, Jim Steil wrote:

Ok, found what was causing the problem.

On my page that I'm loading in my modal window I was specifying a 
different view.  This view had:




...in the  section.  This caused all submits/re-displays to go 
to the parent to display.  If I take it out it works as expected.  
However, now (as Bruno mentioned) when I submit my form the next url 
is loaded in the modal as well.  I'm using CRUD in my modal window, 
how/where do I specify the window.parent.location='next url' as Bruno 
mentioned?


Thanks again.

-Jim

On 8/25/2011 8:18 AM, Jim Steil wrote:

Anthony and Bruno

Thank you for your replies.  I tried nyroModal but get the same 
results as with FancyBox (which I've been using).  I am going to work 
up a simple app that shows my problem.  Either that will show me 
where my problem lies or provide something simple for you to see the 
behavior I'm dealing with.


Thanks again for the input.

-Jim

On 8/24/2011 6:13 PM, Bruno Rocha wrote:


Your modal uses Iframe?

nyroModal needs target='_blank' to open in iframe and work as you want.

Other modal plugins has other ways for doing it.

For redirect in parent window. You ll need to execute a javascript 
inside modal.


window.parent.location = ''

http://zerp.ly/rochacbruno

Em 24/08/2011 17:55, "Jim Steil" mailto:j...@qlf.com>> 
escreveu:

> Hi
>
> I have a crud.update that I'm displaying in a modal iFrame. This is
> working fine for me except when there is an error in the form and 
crud

> redisplays with the error message. This is opening outside the iFrame
> when I want it to load inside the iFrame. But, on submit, the next 
url

> should load outside the iFrame.
>
> Make any sense? Any advice on where to look to get this working 
the way

> I want?
>
> -Jim
>
>


Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil

Ok, found what was causing the problem.

On my page that I'm loading in my modal window I was specifying a 
different view.  This view had:




...in the  section.  This caused all submits/re-displays to go to 
the parent to display.  If I take it out it works as expected.  However, 
now (as Bruno mentioned) when I submit my form the next url is loaded in 
the modal as well.  I'm using CRUD in my modal window, how/where do I 
specify the window.parent.location='next url' as Bruno mentioned?


Thanks again.

-Jim

On 8/25/2011 8:18 AM, Jim Steil wrote:

Anthony and Bruno

Thank you for your replies.  I tried nyroModal but get the same 
results as with FancyBox (which I've been using).  I am going to work 
up a simple app that shows my problem.  Either that will show me where 
my problem lies or provide something simple for you to see the 
behavior I'm dealing with.


Thanks again for the input.

-Jim

On 8/24/2011 6:13 PM, Bruno Rocha wrote:


Your modal uses Iframe?

nyroModal needs target='_blank' to open in iframe and work as you want.

Other modal plugins has other ways for doing it.

For redirect in parent window. You ll need to execute a javascript 
inside modal.


window.parent.location = ''

http://zerp.ly/rochacbruno

Em 24/08/2011 17:55, "Jim Steil" mailto:j...@qlf.com>> 
escreveu:

> Hi
>
> I have a crud.update that I'm displaying in a modal iFrame. This is
> working fine for me except when there is an error in the form and crud
> redisplays with the error message. This is opening outside the iFrame
> when I want it to load inside the iFrame. But, on submit, the next url
> should load outside the iFrame.
>
> Make any sense? Any advice on where to look to get this working the 
way

> I want?
>
> -Jim
>
>


Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil

Anthony and Bruno

Thank you for your replies.  I tried nyroModal but get the same results 
as with FancyBox (which I've been using).  I am going to work up a 
simple app that shows my problem.  Either that will show me where my 
problem lies or provide something simple for you to see the behavior I'm 
dealing with.


Thanks again for the input.

-Jim

On 8/24/2011 6:13 PM, Bruno Rocha wrote:


Your modal uses Iframe?

nyroModal needs target='_blank' to open in iframe and work as you want.

Other modal plugins has other ways for doing it.

For redirect in parent window. You ll need to execute a javascript 
inside modal.


window.parent.location = ''

http://zerp.ly/rochacbruno

Em 24/08/2011 17:55, "Jim Steil" mailto:j...@qlf.com>> 
escreveu:

> Hi
>
> I have a crud.update that I'm displaying in a modal iFrame. This is
> working fine for me except when there is an error in the form and crud
> redisplays with the error message. This is opening outside the iFrame
> when I want it to load inside the iFrame. But, on submit, the next url
> should load outside the iFrame.
>
> Make any sense? Any advice on where to look to get this working the way
> I want?
>
> -Jim
>
>


Re: [web2py] CRUD update in modal iframe

2011-08-24 Thread Bruno Rocha
Your modal uses Iframe?

nyroModal needs target='_blank' to open in iframe and work as you want.

Other modal plugins has other ways for doing it.

For redirect in parent window. You ll need to execute a javascript inside
modal.

window.parent.location = ''

http://zerp.ly/rochacbruno
Em 24/08/2011 17:55, "Jim Steil"  escreveu:
> Hi
>
> I have a crud.update that I'm displaying in a modal iFrame. This is
> working fine for me except when there is an error in the form and crud
> redisplays with the error message. This is opening outside the iFrame
> when I want it to load inside the iFrame. But, on submit, the next url
> should load outside the iFrame.
>
> Make any sense? Any advice on where to look to get this working the way
> I want?
>
> -Jim
>
>


[web2py] CRUD update in modal iframe

2011-08-24 Thread Jim Steil

Hi

I have a crud.update that I'm displaying in a modal iFrame.  This is 
working fine for me except when there is an error in the form and crud 
redisplays with the error message.  This is opening outside the iFrame 
when I want it to load inside the iFrame.  But, on submit, the next url 
should load outside the iFrame.


Make any sense?  Any advice on where to look to get this working the way 
I want?


-Jim