Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
OGLES #1
ext1.ext2 ?
How can I get Dreamweaver to recognise .js.php files as .js files ?
Regards,
OGLES
OGLES Guest
-
Steve #2
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
-
danilocelic AdobeCommunityExpert #3
Re: ext1.ext2 ?
OGLES wrote:
You can change how Dreamweaver handles file extensions by reading this:> How can I get Dreamweaver to recognise .js.php files as .js files ?
[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
-
OGLES #4
Re: ext1.ext2 ?
[Q]//<script> function demo(){ alert(''); } //</script>[/Q]
Genius, thanks ! Just what I needed..
OGLES Guest
-
Randy Edmunds #5
Re: ext1.ext2 ?
> [Q]//<script> function demo(){ alert(''); } //</script>[/Q]
That's a good one!>
> Genius, thanks ! Just what I needed..
Randy
Randy Edmunds Guest



Reply With Quote

