Jump to content
Larry Ullman's Book Forums

Diamond Dave

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Diamond Dave

  1. Thanks HartleySan,

         You descibed what I have been experiencing with the last three examples with the js file. This is something I need to pay attention to when referencing files. Normally I can tell where an error like that is coming from but in the case of including or referencing a JavaScript file, nothing works so it can be tough tracking the cause. I need some work with debugging JavaScript, no doubt. Maybe throw an echo statement in the file so I know it is getting referenced properly.

         It's funny I always thought an absolute link started from the C drive; I'll read the articles you posted.

  2. HartleySan,

    Very cool that people are looking over these posts, I did not expect a response, especially so quickly.

     

    I simply added one dot and the slash before the file name in the source attribute to get it to work.

    It is hard to explain so here are some examples.

     

    This is the way I am used to the files being included. I had seen Larry including files this way in the scripts in the book "PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)":

     

    $page_title = 'Browse the Prints';
    include ('includes/header.html');

     

    Now, in the book "Effortless E-Commerce with PHP and MySQL" I see the files included with the dot (.) and a slash at the beginning of the relative path:

     

    $page_title = 'Add a Site Content Page';
    include ('./includes/header.html');

     

    I am saying only the single dot (.) because I am aware that two dots before the slash backs up one directory. Obviously these two examples do the same thing.

     

    So my script would not execute like this:

    "<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>"

     

    But would like this:

    "<script type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>"

     

    Obviously there is a difference with the slash and without it.
     

  3. Please don't laugh about the user name, it's an old nickname. I was expecting the "username taken" warning to disappear instantly but I guess you haver to press enter.

    Larry, you have my utmost respect and gratitude for putting all of this learning material out there for us. And then you hover over our questions, continuing to help us out-pretty cool.

    Anyways, I could not for the life of me include the latest WYSIWYG editor in the text area in my Chapter 5 script as it is written on page 113.

    I worked on it a couple hours trying different things like renaming the files and such because TinyMCE version 4.0.5 had different file names.

    Finally I downloaded the older version, 3.5.8. Still nothing. After all this all I needed to do was add a dot (.) before the path to the source of the JS file in the script tag the way it is done in all of the include and require commands -->   (<script type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>).

    Is that wierd, or what? Wow, sometimes simple things can put a stop to the fun.

    Thought I would throw this comment in there, I didn't see anyone else write about the subject.

    Man I'm serious when I say that scripting is fun even for a Saturday night. If I get a job doing this-goodness you'll here from me then.

×
×
  • Create New...