I don't know a thing about tinyMCE, so I can't help much.  The first
thing I would do is throw in an alert call to tell me exactly what URL
it thinks it's working with in the first place.

Aside from that, there is a problem in your code.  If the URL has no
query string, it will create one of the form ?&type= , which might
yield unpredictable results.  Try changing the first part of your code to:

function myFileBrowser (field_name, url, type, win) {

var cmsURL = window.location.pathname; // script URL
var searchString = window.location.search; // possible parameters

tinyMCE.openWindow({
file : cmsURL + (searchString.length ? "&type=" : "?type=") + type, //
PHP session
ID is now included if there is one at all
title : "File Browser",

--- In [email protected], "waqas_indus" <[EMAIL PROTECTED]> wrote:
>
> Hi experts,
> I m new in php .I m using tiny mce editor with php.But i have a
> problem in insert /edit image .Anyone who used it then pls tell me so
> that i can solve my problem.
> 
> My problem is basically is in function myFileBrowser
> 
>       function myFileBrowser (field_name, url, type, win) {
> 
>    
>     var cmsURL = window.location.pathname;      // script URL
>     var searchString = window.location.search;  // possible parameters
>     if (searchString.length < 1) {
>         // add "?" to the URL to include parameters (in other words:
> create a search string because there wasn't one before)
>         searchString = "?";
>     }
> 
>     
> 
>     tinyMCE.openWindow({
>         file : cmsURL + searchString + "&type=" + type, // PHP session
> ID is now included if there is one at all
>         title : "File Browser",
>         width : 420,  // Your dimensions may differ - toy around with
> them!
>         height : 400,
>         close_previous : "no"
>     }, {
>         window : win,
>         input : field_name,
>         resizable : "yes",
>         inline : "yes",  // This parameter only has an effect if you
> use the inlinepopups plugin!
>         editor_id : tinyMCE.getWindowArg("editor_id")
>     });
>     return false;
>   */
>   }
> 
> When i try to insert or edit image and clcik on browse button then it
> opens the current page not the option of vrowse the pic
> 
> 
> Waiting for ur positive reply,
> Thanks,
> Vicky
>


Reply via email to