You also mentioned JQuery LightBox -- I noticed that there are a couple of
open solutions to that, for example
http://www.no-margin-for-errors.com/projects/prettyPhoto/, which is a JQuery
Lightbox "clone". Personally I do all of these things on my own, but I know
that many JavaScript toolkits support this kind of thing anyway, like Dojo,
or MochiKit. The way I do it is I create a semi-transparent div that covers
the entire screen (use javascript to figure out the dimensions) and place
that at the bottom of my HTML, so the the z-index is top-most (or you could
use z-indices), then I create a fake "dialog" (be certain to place this
below the semmi-transparent div in the code, so that it will be on top and
don't place it in the semi-transparent div, or else this div will be
semi-transparent also) with a div that is slightly smaller than the screen
and using CSS add borders, background-image, and float it to the center
(margin: 100px auto;). Then I can place whatever I want in it, you will
probably need to use some ajax to get the data to stay, but then don't
refresh the page, or use javascript to cause a postback to occur and
repopulate the fields of your form with the stuff the user already put in
there (that's what I do, grab the $_POST variables if there are any and put
them where they would be, for when I do purely PHP-based form validation).
Or you could simply send the new item to your web service via your ajax
call, and use another ajax call and some javascript to repopulate the
combobox.

The nice thing is that there are so many ways to go about doing this from
homebrew to adapting somebody else's solution. If you see something you like
you could even find out how they did it with firebug. I wish I had a live
example of my own that I could show you, but sadly I don't, but attached is
a mockup of something I did for somebody about a year ago.

On Tue, Nov 4, 2008 at 10:21 AM, MilesTogoe <[EMAIL PROTECTED]> wrote:

> Nathan Lane wrote:
>
>> Are you saying that you are trying to create a CSS/HTML-based dialog "pop
>> up" in front of the form to add a new item to the list table via javascript
>> I assume? You could just use javascript to refresh the list, you could also
>> put the list in an iframe and refresh the whole page. It kind of sounds like
>> you're looking for a more artificial refresh. PHP in general is not
>> Model-View-Controller based like rails, so you might take Firebug (a firefox
>> plugin) and look at the rails final product you did and see how you could
>> emulate the rails product in PHP using HTML and JavaScript. I don't know of
>> a quick solution to this in PHP off hand.
>>
> yes we are looking at some javascript to pop up another css/html form in
> front of the other form.  The looking at it in firebug idea is a good one
> (keep forgetting how useful it is)  - we didn't do this in rails, just saw
> an example that someone else did.   For example, 37signals seems to do this
> on the sidebar with their products.
>
>
>
>
>> Nathan
>>
>> On Tue, Nov 4, 2008 at 8:13 AM, MilesTogoe <[EMAIL PROTECTED]<mailto:
>> [EMAIL PROTECTED]>> wrote:
>>
>>    I have the case on a select box needing to have an add capability
>>    (popup a form to add a new element to the list table and refresh
>>    the list) without disturbing the filled in data on the underlaying
>>    form.   I've seen this done in Rails but searched around this AM
>>    trying to find a cool JQuery lightbox kind of dialog and didn't
>>    see anything like this - does anyone know of a link to a good
>>    example or tutorial of this ?
>>    _______________________________________________
>>
>>    UPHPU mailing list
>>    [email protected] <mailto:[email protected]>
>>    http://uphpu.org/mailman/listinfo/uphpu
>>    IRC: #uphpu on irc.freenode.net <http://irc.freenode.net>
>>
>>
>>
>>
>> --
>> Nathan Lane
>> Home, http://www.nathandelane.com
>> Blog, http://nathandelane.blogspot.com
>>
>
>


-- 
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.com
_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to