Click to See Complete Forum and Search --> : please take a look at my website


MayaPT
09-22-2004, 01:25 PM
Hi to everyone,

I wanted to ask if you could please take a look at the site http://www.ponto-dot.com

This is my first website and it was all built with HTML and Javascript. Right now it has one iframe and simply loads diffenent pages according to the different link you press. I set it up like this so i didn't have to load the background everytime the topic changed.

Do you think there is other way of doing this by using PHP and/or advantages you might remember?

Thanks to all in advance for your help.

Hellspire
09-23-2004, 08:51 AM
There are tons of advantages in the use of PHP. Note that using PHP however, would not remove HTML nor 'some' of your javascript. Although quite frankly I think your javascript define content iframe is much nicer and appealing to the eye than php. Mainly because to change the page in php, even for the iframe, you would have to load the page all over again, because when php is parsed it is done at the load of the page and is not recallable without a reparse.

Read the documentation for PHP for more information on PHP's capabilities and advantages..... its a 'great' tool for website design, and much better than asp in my opinion (although not in its form memory capacity ;) - I know ASP as well btw - )

Cheers

MayaPT
09-23-2004, 09:11 AM
Hi Hellspire,

Thanks for taking the time to have a look at my site, i was starting to loose hope someone would do it.

Right my javascript function is making the frame pointo to "content.php?content=NameOfContentPage"

in the content.php all i have is


if (isset($content)
{
include ($content.".html");
}



Of course this is just a test, this way i will be able to put the content source files in another place or just write them in code in the content.php.

I have done this only to see if i can prevent users from acessing the iframe content pages by themselves and using php is the only way i remembered since i can put these files in other dir or simply change the file permissions. Please correct me if i'm wrong.

Thanks again for taking the time to look at my site, it's really a good help when someone is beginning to have ppl with more experience comment our work. ;)

artemis
09-23-2004, 12:13 PM
i would think would be a bad idea since someone could go to your site and open up the content page while not in frames and type in their 'evil' address e.g.
http://evilsite.com/badscript
and then code from their webpage would be executed.
it seems like a major security hole to me.

what you could do is create an array with the filenames and then pass the array index, e.g:


#from content.php?page=0
if(isset($page)){
include($pages[$page]);
}


that way only your pages could be included.

hope that helps!

daed17
09-23-2004, 06:34 PM
Nice job....fix the holes... personally I like asp and php.
How long have you been programming?

MayaPT
09-23-2004, 06:47 PM
Hi again,


Thanks to all for the replies.

@artemis:

I thought about your advice, i now have the content.php reloading in the iframe but this time i load the links from a file on the server into an array and i pass only the array index. Thanks for wonderfula advice

@daed17:

Thanks for checking my site, it's always the best help a newbbie can get. What you mean by fixing the holes? is it because there's a lot of empty space? i'm stuck on how to solve that, i might have to rewrite the whole stuff... :-/

On the programming question it's a tricky one 'cause i did some programming in several languages (Basic,Pascal,C/C++) for some years. When it comes to web it will make two weeks next monday (had to learn HTML and JavaScript basics and now PHP).


Thanks again to all and Best Regards!

daed17
09-23-2004, 07:10 PM
it's like little blue dots in the gallery.

Is it just me?

MayaPT
09-24-2004, 04:55 AM
hey daed17,

I know what you mean, it only happens in internet explorer though and i can't seem to understand why. Maybe it has something to do with the pictures being links, maybe i must change some CSS styles, i will have a look at it today.

Thanks for noticing that to me, i'm making the mistake of building the site in linux and sometimes i get some surprises when i look at it from windows.