myboycrais99 Posted June 3, 2010 Report Share Posted June 3, 2010 Hi, I am new to forum posting but I will do my best :angry: I have been running US 3.3 for a while but decided to finally upgrade to US 5.6. Currently, I have tried both US 5.6.5 and 5.6.6 on windows 7 x86 and my pages load fine, but all my old javascript code that worked in US 3.3 no longer loads! Can anyone help me? Here is a basic code that I started with that used to work, but it no longer works (my apologies to the original author, I can't remember where I originally got this from, but it is a call to a basic javascript function [attached] that shows a countdown timer. Do I need to do something special with 5.6? Thanks in advance for all your help!! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"><!--#cd { margin: auto; height: 50px; width: 450px; font-family: "Courier New", Courier, mono; font-size: 24pt; color: #000; text-align: center; font-weight: bold; background-image: url(back.jpg); vertical-align: middle;}--></style></head> <body><h1 align="center">Counting Down to New Year's 2020</h1><p align="center">According to the time at Kuala Lumpur, Malaysia. </p><script language="JavaScript" SRC="countdown.php?timezone=Asia/Kuala_Lumpur&countto=2020-01-01 00:00:00&do=t&data=WAWASAN 2020"></SCRIPT><p> </p></body></html>countdown.phpindex.html Quote Link to comment Share on other sites More sharing options...
Ric Posted June 3, 2010 Report Share Posted June 3, 2010 Problem is with your php script. It is an old script that uses short tags '' and '=' These should be replaced with their long form counterpart. '<?php' and '<?php echo' There is a quick way to test if this is the problemBy default Uniform Server has short tags disabledYou can enable short tags as follows: Edit file UniServer\usr\local\php\php.ini Change this line:short_open_tag = OffTo:short_open_tag = On Please read the note above this line it explains you should not use short tags. All the bestRic :angry: Quote Link to comment Share on other sites More sharing options...
myboycrais99 Posted June 3, 2010 Author Report Share Posted June 3, 2010 Thanks Ric!! That did the trick. I noticed that the original author was using short tags with "<?" and I fixed that but didn't realize that the equal sign in "<?=" needed to be replaced with an echo statement. Thanks again for all your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.