The selector is a string. Therefore with a slight modification you
should be able to do this

    <script type="text/javascript">
        function loadContent(id) {
            $("#contentArea"+id).load("rpc.php?o="+id+"");
        }
    </script>

On Aug 31, 6:47 pm, TheOriginalH <[EMAIL PROTECTED]> wrote:
>     <script src="jquery-latest.js" type="text/javascript"></script>
>     <script type="text/javascript">
>         function loadContent(id) {
>             $("#contentArea").load("rpc.php?o="+id+"");
>         }
>     </script>
>
> Works well, but I'd like the function to work for an area with a
> variable div. So if the function is called with an id of 6, it loads
> the content to "#contentArea6". Any ideas on how to achieve it? TIA.

Reply via email to