Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default ext1.ext2 ?

    How can I get Dreamweaver to recognise .js.php files as .js files ?

    Regards,
    OGLES
    OGLES Guest

  2. #2

    Default Re: ext1.ext2 ?

    Rename it, deleting the .php extension. I always put my javascript files in
    a subdirectory named scripts and have never had this problem.

    HTH

    Steve

    "OGLES" <webforumsuser@macromedia.com> wrote in message
    news:g8mjuq$pp$1@forums.macromedia.com...
    > How can I get Dreamweaver to recognise .js.php files as .js files ?
    >
    > Regards,
    > OGLES

    Steve Guest

  3. #3

    Default Re: ext1.ext2 ?

    OGLES wrote:
    > How can I get Dreamweaver to recognise .js.php files as .js files ?
    You can change how Dreamweaver handles file extensions by reading this:
    [url]http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410[/url]

    However, it only applies to the "last" file extension, that is if you change .php files to be read as JavaScript files, then you'll lose PHP support, as Dreamweaver can associate one file extension with one document type.

    If you do not specifically need the PHP support in the files, then you should only use .js files only. Otherwise, within Dreamweaver you might get what you're looking for by adding an open script tag above your JavaScript code and a closing script tag at the end of your content, and then comment them out with // comments, like:
    //<script>
    function demo(){
    alert('');
    }
    //</script>

    The comments will prevent the browser from "seeing" the script tag, but Dreamweaver will see it as a real script tag because it is seeing the file as part of the HTML of a PHP page.

    FYI: While this forum is named Dreamweaver Extensions, the extensions part of it does not have to do with file extensions, rather extensions refers to add ons, such as those found at the Adobe Exchange:
    [url]http://www.adobe.com/cfusion/exchange/[/url]

    General Dreamweaver and web questions should be asked in the Dreamweaver General forum:
    [url]http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=12&catid=189&entercat=y[/url]
    and dynamic server coding related question can be asked in Application Development forum:
    [url]http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=12&catid=263&entercat=y[/url]



    --
    Danilo Celic
    | [url]http://blog.extensioneering.com/[/url]
    | WebAssist Extensioneer
    | Adobe Community Expert
    danilocelic AdobeCommunityExpert Guest

  4. #4

    Default Re: ext1.ext2 ?

    [Q]//<script> function demo(){ alert(''); } //</script>[/Q]

    Genius, thanks ! Just what I needed..
    OGLES Guest

  5. #5

    Default Re: ext1.ext2 ?

    > [Q]//<script> function demo(){ alert(''); } //</script>[/Q]
    >
    > Genius, thanks ! Just what I needed..
    That's a good one!

    Randy
    Randy Edmunds Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139