Results 1 to 3 of 3

Thread: Malfunction on subdomain

  1. #1
    Join Date
    Aug 2010
    Location
    Yokohama
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Malfunction on subdomain

    1) Script Title: jQuery Image Magnify v1.1

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agemagnify.htm

    3) Describe problem: I have this running nicely on my domain, but it does not run on my subdomain. The jquery.magnifier.js and magnify.cur files are in public_html (if that helps). I have checked the head code on both pages carefully. The one thing I have noticed is that my host (Justhost) adds a bit of code (in bold below) which I cannot delete-- and I don't know what it means, either-- so the whole thing looks like this:

    Code:
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
    <script src="jquery.magnifier.js" type="text/javascript">// <![CDATA[
    /***********************************************
    * jQuery Image Magnify- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    // ]]></script>

    Is that the problem? Or? I've run out of ideas.

    Many thanks for your time and trouble.

    MM
    Last edited by jscheuer1; 08-09-2010 at 02:56 PM. Reason: fix broken link

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That shouldn't matter (the CDATA delimiters). If the script and the cursor are in the public_html folder, only a page that is also in that folder may use them given your script tag.

    Ordinarily, you would use a relative path to the folder, but with a subdomain, you may need the network or even the absolute path. The absolute path is safest. Say your public_html folder is (in the browser):

    Code:
    http://www.mydomain.com/
    Then your script tag should be:

    Code:
    <script src="http://www.mydomain.com/jquery.magnifier.js" type="text/javascript">// <![CDATA[
    /***********************************************
    * jQuery Image Magnify- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    // ]]></script>
    And here, in the jquery.magnifier.js file:

    Code:
    /* jQuery Image Magnify script v1.1
    * This notice must stay intact for usage 
    * Author: Dynamic Drive at http://www.dynamicdrive.com/
    * Visit http://www.dynamicdrive.com/ for full source code
    
    * Nov 16th, 09 (v1.1): Adds ability to dynamically apply/reapply magnify effect to an image, plus magnify to a specific width in pixels.
    */
    
    jQuery.noConflict()
    
    jQuery.imageMagnify={
    	dsettings: {
    		magnifyby: 3, //default increase factor of enlarged image
    		duration: 500, //default duration of animation, in millisec
    		imgopacity: 0.2 //opacify of original image when enlarged image overlays it
     	},
    	cursorcss: 'url(http://www.mydomain.com/magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image
    	zIndexcounter: 100,
    
    	refreshoffsets:function($window, . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Mister Micawber (08-11-2010)

  4. #3
    Join Date
    Aug 2010
    Location
    Yokohama
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Bless you, John. It worked like a dream! I envy you fellows that understand all this. I'm too old to ever hope to get it all into my brain.

    - MM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •