John,

There are several popup types on this page: 
http://orangoo.com/labs/greybox/advance_usage.html

>From what you have I think you want GB_show().

Replace:
   createpopup("mc/attachments.php?daft_id="+$F('draft_id'),500,380);

With:
   GB_show('Your Caption', "mc/attachments.php?daft_id="+$F
('draft_id'), 500, 380)

I just assumed 500 as a height and 380 as the width. The function
documentation is:
   GB_show(caption, url, /*optional*/ height, width, callback_fn)

Hope that helps!

Jonathan

On Jan 3, 12:58 pm, "[email protected]" <[email protected]>
wrote:
> Hello!
>
> I LOVE Greybox - it's worked for everything on our new release EXCEPT
> I can't get it to play nice within another function :)
>
> I've read many posts in this forum, and the complete documentation,
> and still I can't get it - I'm an advanced beginner programmer, so the
> more information the better!
>
> Here's what I'm trying to do:
>
> My original script calls the function:
>
> <a href='#' onclick='addattachment();'><img src='images/
> upload_files_here.gif' border='0'></a>
>
> the function addattachment is located in a script.js file that has the
> following:
>
> //Allow the person to add attachments on demand
>         function addattachment()
>
>         {
>                 savedraft();
>                 attachmentinterface();
>         }
>
>         function attachmentinterface()
>         {
>                 //This function should only be called by the addattachment 
> function
>
>                 //Have id?
>                 //If not, try again in 100 ms
>                 if(trim($F('draft_id')) == '')
>                 {
>                         setTimeout('attachmentinterface()',100);
>                         return false;
>                 }
>
>                 
> createpopup("mc/attachments.php?draft_id="+$F('draft_id'),500,380);
>
>         }
>
> createpopup is an OLD popup window that I'm trying to replace.
>
> How can I call Greybox from within this function to replace the
> CREATEPOPUP function?
>
> Many thanks!
>
> John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GreyBox" 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/greybox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to