Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

ext1.ext2 ?

New Here ,
Aug 22, 2008 Aug 22, 2008

Copy link to clipboard

Copied

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

Regards,
OGLES
TOPICS
Extensions

Views

626
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 23, 2008 Aug 23, 2008

Copy link to clipboard

Copied

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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 23, 2008 Aug 23, 2008

Copy link to clipboard

Copied

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:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410

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:
http://www.adobe.com/cfusion/exchange/

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



--
Danilo Celic
| http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 23, 2008 Aug 23, 2008

Copy link to clipboard

Copied

quote:

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


Genius, thanks ! Just what I needed..

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 25, 2008 Aug 25, 2008

Copy link to clipboard

Copied

LATEST
>
quote:

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

>
> Genius, thanks ! Just what I needed..

That's a good one!

Randy

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines