How to change frame url to be absolute?

Last post 02-20-2010, 8:50 AM by bartg. 3 replies.
Sort Posts: Previous Next
  •  02-19-2010, 3:26 PM 58849

    How to change frame url to be absolute?

    How to change frame url to be absolute?

    Because when I am at
    http://wyspanauki.pl/News-editForm/id-17/
    frame gets url
    http://wyspanauki.pl/News-editForm/id-17/partnerzy.hernas.pl/htdocs/cuteeditor_files/template.php
    but should be
    http://wyspanauki.pl/cuteeditor_files/template.php
  •  02-19-2010, 4:36 PM 58851 in reply to 58849

    Re: How to change frame url to be absolute?

    bartg:
    How to change frame url to be absolute?

    Because when I am at
    http://wyspanauki.pl/News-editForm/id-17/
    frame gets url
    http://wyspanauki.pl/News-editForm/id-17/partnerzy.hernas.pl/htdocs/cuteeditor_files/template.php
    but should be
    http://wyspanauki.pl/cuteeditor_files/template.php
     
    Can you explain this issue in details?

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-20-2010, 5:37 AM 58859 in reply to 58851

    Re: How to change frame url to be absolute?

    On
    http://wyspanauki.pl/News-editForm/id-17/
     i have cute editor for php but it looks like:
    (i get 404 error). When i look in the source i see that link to frame is:
    http://wyspanauki.pl/News-editForm/id-17/partnerzy.hernas.pl/htdocs/cuteeditor_files/template.php
     and it is wrong, because working address should be
    http://wyspanauki.pl/cuteeditor_files/template.php
     
     
    Just for explanation:
    • my site is in folder: partnerzy.hernas.pl/htdocs/ and here is cuteeditor_files directory
    • the url for this site is: http://wyspanauki.pl
     
  •  02-20-2010, 8:50 AM 58861 in reply to 58859

    Re: How to change frame url to be absolute?

    I dont know how u implemented this, i guess that not good, cause it is not working, so i decided to write own function.
     
    I replaced this in include file

    1. $this->FilesPath=dirname($this->GetWebPath(__FILE__)); 

     with this:
    1. $aURI = explode('/'$_SERVER['SCRIPT_NAME']);  
    2. array_pop($aURI);  
    3. $sURI = implode('/'$aURI);  
    4. $sURI .= '/';  
    5. $sURL = 'http://' . $_SERVER['HTTP_HOST'] . $sURI;  
    6.     $this->FilesPath=$sURL.$this->FilesPath; 
     and now everything is working
View as RSS news feed in XML