How about creating the form once and moving it to where ever it's
needed. This assumes you can only have one form displayed at a time.
Failing that. Make one form and clone it each time it's needed.

Adrian

On Oct 25, 9:15 pm, "Merlin" <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I am trying to add a comment functionality to my webapp that includes
> a reply possibility on each comment. Like on digg for example. I am
> new to AJAX, but would like to take this oportunity and to jump into
> cold water with that task now.
>
> My goal is to use JQuery to show and hide a dialog box which contains
> the form to reply on the comments.
> Basicaly I managed to do this, but now I have a general understanding
> problem. Let's say there are 100 comments there and I want to have
> reply possiblity for each of them. Do I have to integrate the same
> code underneath each one? I would rather like to have a box in that is
> used for everyone of them. I believe this is somehow done with divs,
> but I do not know how.
>
> Here is my code:
> <html>
>   <head>
>     <script src="/app_global/jquery-1.2.1.pack.js" type="text/
> javascript"></script>
>     <script type="text/javascript">
> $(document).ready(function() {
>   $('#slickbox').hide();
>   $('a#reply').click(function() {
>     $('#slickbox').toggle('slow');
>     return false;
>   });
>
> });
>
>     </script>
>   </head>
>   <body>
> <a href="#" id="reply">Reply</a>
> <div id="slickbox"><p>Space for reply box</div>
> <p>
> next comment
>   </body>
>   </html>
>
> I would like to place a complex reply form into the id=slickbox, but
> here is where the problems starts. If I do this for all 100 comments
> the code will be way to much to load. There must be a smarter way to
> achieve this.
>
> Thank you for any help on this. I am pretty much stuck here.
>
> Best regards,
>
> Merlin
> --
>   Merlin
>   [EMAIL PROTECTED]
>
> --http://www.fastmail.fm- Does exactly what it says on the tin

Reply via email to