Forum Moderators: open

Message Too Old, No Replies

how to display dynamic content on html page

need to know how to display dynamic content without using cookies and ajax

         

fm_notaware

3:43 pm on Sep 12, 2008 (gmt 0)

10+ Year Member



I have converted my .asp pages to HTML pages. however, certain portion like to show login status and the left panel links which can change with due time .. how do i reflect this data.
i thought of using Iframe but again would the links open in the same window ..
any idea ...
All help need! Thanking you all.

[edited by: tedster at 7:46 pm (utc) on Sep. 12, 2008]

cyberjorge

1:13 am on Sep 17, 2008 (gmt 0)

10+ Year Member



Have you tried using AJAX to load external page on the same page?
On my case, I've used this script...

dynamicdrive.com/dynamicindex17/ajaxcontent.htm

Of course you need to tweak it to make them fit to your liking.

peterdaly

1:20 am on Sep 17, 2008 (gmt 0)

10+ Year Member



Why did you convert to .html?

Why no cookies? Why no ajax?

Seems to me like you just took away all the potential tools for the job, so more information would be helpful.

g1smd

9:04 am on Sep 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Just because a URL ends in .html it doesn't mean to say that the associated filename on the server has to also end in .html. It could have any ending, and any type of functionality inside it.

In any case, is that what you mean by "convert to .html" - you changed the name?

Did you once have pages with scripting in them and you have now removed that scripting? or is it just a name change?

rocknbil

10:00 pm on Sep 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



need to know how to display dynamic content without using cookies and ajax

Always an excellent idea to NOT build critical functions reliant on JS. But for something like this, it may be an easier method, as this doesn't sound like a "critical function". If the site works with JS disabled and this doesn't impede users, give it a shot.

I have converted my .asp pages to HTML pages.

Since you mentioned ASP, I am presuming you are on a Windows-based server. My usual recommendation for this is server-side includes (SSI,) but that's a little more difficult to set up in Windows (mostly because you have to get an administrator to allow SSI's on your domain, and getting the admin to do that is the difficult part, unless you're the admin.) SSI's do exactly what you want, this is what they are designed for, right tool for the job.

Alternatives to this would be -

- On the pages you need this, go back to .asp and let the server-side programming do it's job.

- Set an iFrame inside the page in that location and let an .asp script output the log in data to the iframe.

- Investigate if PHP (or perl, or any server-side language) is running on your server and a) see the first suggestion and make this a PHP page that includes your dynamic content, or b) use PHP or perl to output the data to the iFrame, as in the second suggestion.

i thought of using Iframe but again would the links open in the same window ..

If you want them to, yes. Set the target to _top.

<iframe src="login.asp" target="_top">