Forum Moderators: open
And another question.
Would Javascript code cause problems to SE spiders?
Thanks everyone.
Regardless SP2 will complain about scripts all the time because MS was too lazy to actually program SP2 to recognize the difference between YOU deciding to run a script intentionally and Windows itself trying to automate a script.
With anti-spyware by MS you can have it remember what scripts you don't want to keep getting harrased about, but this is a pain if you work with Javascript.
My adivce is to uninstall SP2 if you value your sanity.
Back to your questions, a simple date/time script should not be triggering any warnings. How are you including the script? Is it inline within the HTML document or as a separate file?
For your second question, search engine spiders will ignore the script - it won't cause any problems.
<script language="JavaScript1.2">
<!-- Begin
var months=new Array(13);
months[1]="Enero";
months[2]="Febrero";
months[3]="Marzo";
months[4]="Abril";
months[5]="Mayo";
months[6]="Junio";
months[7]="Julio";
months[8]="Agosto";
months[9]="Septiembre";
months[10]="Octubre";
months[11]="Noviembre";
months[12]="Diciembre";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) // Y2K Fix, Isaac Powell
year = year + 1900; // [onyx.idbsu.edu...]
document.write(date + " de " + " ");
document.write(lmonth + " del " + year);
// End -->
</script>
I just adapted the document write and the variables to display it in spanish.
Let me know if this one is out dated and is the cause of the SP2 to complain.
Thanks again.
Back to your questions, a simple date/time script should not be triggering any warnings. How are you including the script? Is it inline within the HTML document or as a separate file?
I have tried to steer clear of javascript for a variety of reasons, not least of which is that I know little about it, already so many issues and angles to keep up with...
I now want to include a few simple scripts to bookmark, mail a friend etc, nothing serious. However, my first concern is stability for my users - conversion.
Any warning messages about ssl certificates, javascript etc is a big no-no in ecommerce, so this sp2 issue worries me.
What would the difference be re sp2 in including js inline or as a seperate file?
Advice much appreciated.
But when I preview my page in Dreamweaver, IE alerts me that content is blocked!This is correct. Microsoft created a Lockdown Zone to block all Active Content on pages that reside on your local hard drive. JavaScript and Flash will be blocked when you preview a local file - but the page will display normally when viewed on the internet. Microsoft did this to protect the lowest common denominator of users from malevolent content delivered via traded CDs, DVDs, and other portable media - or from files saved via the internet or e-mail to your local hard drive.
According to this there is no real problem with SP2 as far as visitors are concerned(?)
Enabling the preview of Active Content in DreamweaverTo enable viewing active content in files that are on your local hard drive:
In IE, Choose Internet Options - Advanced
Scroll down to the Security Heading
Check the option labeled: Allow active content to run in files on my computer. You can also check the box above this if you want to allow active content to run from CDs.
Restart Internet Explorer for the changes to take effect
Which means I can start asking stupid questions here about mail-a-friend scripts? :)
So the answers are if you upload the page and it doesn't block, no, you don't have a problem. Javascript is (generally) ignored by SE's so using it shouldn't be a problem - just don't bury any vital links in Javascript (such as drop-down menus, etc.)