PDA

View Full Version : There MUST be a way!!!



squeakyfiji
November 29th, 2003, 19:38
I need to host a segment of PHP code on a page that is hosted on a server that does not support PHP. I can host the code somewhere else without a problem. I am thinking the best way to do this is through I frames, the problem is that the frame needs to scale verticly dynamicly. I am sure there is a way to do this with either Javascript or another method.

I am not to woried about browser compatability because my users are almost all colege students, and it seams that the ones who know the least about computers have the newest XP boxes anyways.

Thanks,
Steve

Wojtek
November 30th, 2003, 01:13
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var x = ((screen.width/2)-40);
msg = "IframeCode";
document.write(msg);
// End -->
</script>

put your iframe code where IframeCode is and change some vars.
replace your width="123" with width=x

play with the code :)

squeakyfiji
November 30th, 2003, 01:42
That works for horizontily, I am trying to do it veritcaly.

I came up with this but it does not work.

<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var y = (screen.height=X);

msg = "<iframe src="http://www.bukesher.org/Hillel/news_system/news_view.php" scrolling="no" frameborder="0" width="500"></iframe>";
document.write(msg);
// End -->

I think I need to fine the valule of the length of the page and then set the width varible that way. Not at all sure how that is done.