Jump to content

Novice: question WinXP Bocks scripts


DampDog

Recommended Posts

Hello all, I'm new to this forum and an absolute novice at using HTML.I've added a tiny bit of java script to my html code to automatically add the date.Thing is now every time I access the page Windows XP popup blocker tell me it's detected a script within the page. I know thats what it is supposed to do! but is there a way to have automated date, time, etc. within a page without setting it off every time I visit the page?Oh I've put the scripts in a seperate *.js fileSorry can't type either, WinXP Blocks :)

Link to comment
Share on other sites

well, you can use php. If you're looking for a clock that will show the seconds changing, then sorry... but if you just want today's date then you can easily use php. http://us3.php.net/manual/en/function.date.phpyou could do something like this:<?=date("m.d.y");?> and that will return month.day.year (ex: 10.25.05)

Link to comment
Share on other sites

Thx for the help.I've been thinking about having a little try at PHP for some time, even been out and bought a book this weekend! I'm pretty sure my web provider already has PHP & MySQL enabled.Would you be good enough to take a little look?http://www.freedom2surf.net/help/webhostingtechfaq.phpAlso PHP appears to be significantly more complex to set up. What would I need at my end? I've down loaded this free PHP editor. http://www.mpsoftware.dk/And it seems more than man enough for the job, in fact way above my head at this time.I assume if I start to use PHP then all the clever stuff happens server side, so the popup blocker never gets triggered?Oh one last thing, can you use PHP to switch and image on a mouseover event? At the moment I use a bit java script to do that.Sorry to throw this lot back at you, but all this stuff is way new to me. The problem is when your starting out is. You don't know, what you don't know, if that makes sense.Thx anyway.

Link to comment
Share on other sites

Also PHP appears to be significantly more complex to set up. What would I need at my end? I've down loaded this free PHP editor. http://www.mpsoftware.dk/
You don't need much. That should work fine. I use notepad myself, so pretty much any program will work. :)
I assume if I start to use PHP then all the clever stuff happens server side, so the popup blocker never gets triggered?
Correct. The current date will simply be sent as if it was just regular text. PHP scripts are completely undetectable (except for the fact the the file extension is usually .php :) )
Oh one last thing, can you use PHP to switch and image on a mouseover event? At the moment I use a bit java script to do that.
No, php creates the content before it's sent to the user, whereas javascript does this afterward. So php can't do things onmouseover. However, you can still put javascript in your php pages just as you would put html in them.
Link to comment
Share on other sites

Thanks Nick I'd almost given up on getting a reply.Having read a little, I'm not sure that it is the way I should go. PHP appears to be a content management language and as yet I don't really think I'm up to the task or it's quite what I want.This is my first attempt at a web page for myself, just a learning exercise more than anything. All I really wanted was to be able to do was flip a few images and add the time and date automatically. Java script will do much, much, more than I can take in at the moment. I really just wanted a way to not set off XP's popup blocker. Which just irritates me, and I guess anyone visiting the site.Here's my fledgling page. most of the links are dead as yet apart from the Health one.http://www.rigger.f2s.com/Thank you for time it's much appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...