...

View Full Version : Making .asp appear with dynamic height, via cross-domain, into HTML



Crstf
11-02-2011, 06:58 PM
Hi guys

I have a news posting script written in ASP from years ago that I intend on using for a new website (purely because I can't write PHP well enough to create a new script and the 25+ example scripts I've downloaded don't quite do what I need). My problem is that, as ASP is now so dated, the files don't render properly on the server.

So my idea was to upload these files to an ASP-compatible free host and reference them within the HTML on the real domain. With HTML or PHP includes this doesn't work but it does seem possible with the use of iFrames.

The problem with using iFrames though is that I can't get the height to change depending on the content of my remote .asp file. It only seems to work based on a pre-declared height, but of course the height is going to change as news posts are made.

My question is, does anyone know of a working solution for what I'm trying to achieve, or has anybody cracked dynamic height adjustments using iFrames and files on different domains?

Thanks in advance.

VIPStephan
11-02-2011, 07:05 PM
Uhm… actually ASP has nothing to do with the outcome in the browser, it’s HTML in combination with CSS that is defining how something looks. So, the problem is not your ASP, it’s probably the HTML you’ve written in there that is supposed to render in the browser. Please give us the output source code as you see it when choosing “view source” in the browser and we might be able to figure somethig out.

Crstf
11-02-2011, 07:30 PM
As you say, there is no problem with the ASP itself. Viewing the ASP on the free server that has ASP support shows the page as intended. Viewing the ASP on my 'real' server just shows its source code in the browser window though, the page doesn't render because the server doesnt support ASP.

What I want is for the iFrame on the main server to expand to allow the whole of the .asp file to show. Any ideas?

alykins
11-02-2011, 08:26 PM
are you trying to develop asp without the framework? that won't work...
as for finding out the height "dynamically" through the iframe, that will not work if they are not on same server/same project (and even then if possible a pain in the *)... are you just trying to make changes to the asp pages and then upload them to a server? I think visual studio express is a free download (limited capability but would allow you to develop and debug *I think*)....
also looking at the code in the iframe, some of it is outdated, if you are starting up from scratch I would take some time and change things to modern conventions (one thing I saw that stood out the most was the use of <center> tags)

Crstf
11-02-2011, 09:14 PM
Hi,

I'm not developing any .asp because the existing news posting script has a log in/post/log out system which works really well, and I want to reuse it. It's a system someone else created for me years ago.

I totally agree about the dynamic height increase being a pain the @ss, it's stumped me for a good few days now so I wondered if any of you guys had any thoughts. I'm not giving up easily though! There must be a way....!?

What's wrong with <center> ? The code you're looking at is indeed years old but even nowadays I find that <center> still gets the job done when needed :)

Crstf
11-02-2011, 09:56 PM
For anyone else who has this problem, see the top answer at http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content

did the trick for me :)

alykins
11-03-2011, 01:11 AM
glad u got it working... as for the center
w3.org Ref (http://www.w3.org/wiki/HTML/Elements/center) for center deeming it non-conforming obsolete
and this (http://www.w3.org/TR/html5/obsolete.html#obsolete) furthermore does... now I'm pretty sure i read somewhere that non-conforming obsolete items would essentially stop working (but that's a *thought I read)... but they may or may not work pending browser support



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum