Need root directory referenced

Hi all, firstly thanks for helping.

I have this bit of code that currently looks for the helper.html file in the same directory.
I want it to look for the helper.html file in the root directory without referencing the URL of the site.

Can anyone edit this for me please?

function iframeResizePipe(){ var height = document.getElementById('container').scrollHeight; var pipe = document.getElementById('helpframe'); pipe.src = '[b]helper.html[/b]?height='+height+'&cacheb='+Math.random(); pipe.src = '<?php echo @dirname($_SERVER['HTTP_REFERER']); ?>/helper.html?height='+height+'&cacheb='+Math.random(); }

Just remove all the PHP code and leave the file name.

Thanks Kevin,
but the page with the above code on isn’t in the root directory.

So if I have

[code]de: [Select]

1
2
3
4
5
6
function iframeResizePipe(){
var height = document.getElementById(‘container’).scrollHeight;
var pipe = document.getElementById(‘helpframe’);
pipe.src = ‘helper.html?height=’+height+’&cacheb=’+Math.random();

         }  [/code]

What do I put infront of the help.html file?

,/ ??

Did you actually try what I told you? If you did what was the result?

Sponsor our Newsletter | Privacy Policy | Terms of Service