I have a html page that has this in the head area <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=550');"); } // End --> </script> Code (markup): It's a little part of a popup code for a spell checker window I have on my site. I'm moving all of my site into a wordpress PHP script this week. I would like to put the spell checker on a php page as well on one of my wordpress pages. I need help. Should I put the code into the wordpress header? OR Is it possible to put the code and any other HEAD codes I need into a separate file and call upon them? If I fill the wordpress header file with a lot of codes will it hurt the loading too much? Thanks for opinion and input. Please help
Open header.php from your template directory and add this code before </head> tag : <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/file.js"></script> Code (markup): Create the file file.js and add your javascript code into it. file.js must be on your theme directory PS: on file.js you don't need <SCRIPT LANGUAGE="JavaScript"> and </script> So put the code without these tags.
Glad to help you. PS:For your script I think you can make a rule to not consider two consecutive spaces as words.Just a suggestion.