Welcome visitor
* Login
* Register
It is currently March 25th, 2019, 2:15 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 4 posts ] 
Author Message
  Prevent .swf banner from reloading.
PostPosted: April 10th, 2009, 11:12 am 

Posts: 3
Hi,

I've a .swf banner wanted to be shown on top of each option pages(yes, all pages share one .swf).
How do i prevent it from reloading while new option is selected?

Using <frame> or CSS ?

Thanks in advance for your time.


Top
 Profile  
 
  Re: Prevent .swf banner from reloading.
PostPosted: April 10th, 2009, 4:48 pm 
User avatar

Posts: 29
Let me see if I understood.

You want the contents of your pages to change but the banner on top to remain?
If so, I would use frames. Just remember that frames are not very search engine friendly.

If I was you, I would code the header (the one that does not change) in a separate file and just call it at the begining of each page using a PHP include (assuming you have PHP installed in your server).

This way, if you want to change your header you will only have to modify one file instead of modifying each document of your site.

You can do the same for your footer.


Let me know if you need to learn how to use the PHP include function.

REGARDS

_________________
Ooh, I love your magazine. Especially the 'Enrich Your Wordpower' section. I think it's really...really... really...good.
- Homer Simpson


Top
 Profile  
 
  Re: Prevent .swf banner from reloading.
PostPosted: April 11th, 2009, 7:50 am 

Posts: 3
Hi off1,

Your assumption was accurate.
If the scripts were not long, would be appreciated if you could provide header and footer php script.

Thank you :)


Top
 Profile  
 
  Re: Prevent .swf banner from reloading.
PostPosted: April 11th, 2009, 3:19 pm 
User avatar

Posts: 29
Create a file called header.php and write inside all your header's HTML code. Something like:

<div>
<h1>This is my header</h1>
</div>

do the same for the footer.

Then, every new page you create must also have the .php extension. Each one should look like:

<?php
  include('header.php');
?>

WRITE HERE THE BODY OF THE PAGE (you can add any HTML code you wish)

<?php
  include('footer.php');
?>


This way you won't have to re-write the header and footer every time.

Remember, when you work with PHP you have to:

  • Name every document with the .php extension, even if their contents is pure HTML.
  • You cannot preview a PHP file in your browser just by double-clicking on it as you would with a HTML file. If you want to preview a PHP file you must do it through the HTTP protocol of your server by writing
    http://servername/filename.php in the address bar.

TIP Take advantage of your header.php file and use it to include your <!DOCTYPE> declaration, and your <head>, <title>, <meta>, and <style> tags.


Let me know how if you have any further question.

_________________
Ooh, I love your magazine. Especially the 'Enrich Your Wordpower' section. I think it's really...really... really...good.
- Homer Simpson


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron