Problems exporting to external js file

I wanted to keep my pages as clutter free as possible and also be validated so  wanted to move as much javascript to an external file.
I followed the instructions in this discussion http://forums.adobe.com/thread/481537?start=0&tstart=0
to the letter and exported most of the javascript in the template into an external file but as soon as I did that DW said that there were now syntax errors in the code in the external js file which previously worked perfectly while in the head of the template. When I deleted the javascript with the offending line of code DW pointed out further syntax errors including Google analytics code! As well as off the rack script that I had copied and pasted for putting social media buttons on the page.
Needless to say that when I linked the .js to my template they didn't work. But when I put them back in the head they worked perfectly.
What am I doing wrong? Here is the javascript. The emphasized bold italics are the places that DW says are syntax errors.
// JavaScript Document
<!--Bread crumbs code-->
<script type="text/javascript">
function breadCrumbs(base,delStr,defp,cStyle,tStyle,dStyle,nl) { // by Paul Davis - http://www.kaosweaver.com
loc=window.location.toString();subs=loc.substr(loc.indexOf(base)+base.length+1).split("/") ;
document.write('<a href="'+getLoc(subs.length-1)+defp+'" class="+cStyle+">Home</a>  '+'<span class="+dStyle+">'+delStr+'</span> ');
a=(loc.indexOf(defp)==-1)?1:2;for (i=0;i<(subs.length-a);i++) { subs[i]=makeCaps(unescape(subs[i]));
document.write('<a href="'+getLoc(subs.length-i-2)+defp+'" class="+cStyle+">'+subs[i]+'</a>  '+'<span class="+dStyle+">'+delStr+'</span> ');}
if (nl==1) document.write("<br>");document.write('<span class="+tStyle+">'+document.title+'</span>');
function makeCaps(a) {
  g=a.split(' ');for (l=0;l<g.length;l++) g[l]=g[l].toUpperCase().slice(0,1)+g[l].slice(1);
  return g.join(" ");
function getLoc(c) {
  var d="";if (c>0) for (k=0;k<c;k++) d=d+"../"; return d;
</script>
<!--Google analytics code-->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8313452-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<!--Script for adding Social Media Share Buttons-->       
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "380208c3-e9f3-4198-8bef-1de3e344f3ae", doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>

I asked my system adminstrator (he does it for me as a favor) who is a security expert in his day job about SSIs and this was his response.
"Server side includes? No, not if you want some semblance of security.
SSI went out of use with the 1990s."
There does seem to be a security risk involved
http://httpd.apache.org/docs/current/misc/security_tips.html#ssi
And according to IBM http://tinyurl.com/bh2v442

Similar Messages

  • Problems exporting to Windows Media file

    Hello,
    I don't know why, but when I export movies as WMV files, I am only able to do a few seconds of it (30 seconds to 35 seconds) . Any one know why I am not able to export the entire movie? I did not install it on this computer, but I believe it's using a codec from Flip4Mac.
    Thanks in advance

    resonally, I don't use either one. For WMV format, I use Microsoft's free Windows Media Encoder on my Windows XP system (no Mac version available).< </div>
    Yar, find a cheap used PC; should be about $100.
    Having a dedicated PC for this will save you endless headaches. You just cannot imagine how weird it is getting QT to WMV. Popwire and Flip4Mac both have excellent white papers you can download that explain why their solution is better than the other guy's. These can give you some clues about the types of problems you are going to have with bitrates, codecs and gamma/bright changes between platforms.
    You also want to explore thoroughly the option of using Flash for crossplatform delivery. It is completely agnostic, universally available, and tolerant of all kinds of weird data issues.
    bogiesan

  • Problem exporting image to specific file size

    I've had some professional images shot and I can see from the file size in Aperture that they range from 13 - 73 mb. I need to submit them as 72dpi and 300dpi files and they must be between 1 & 3 mb in size.
    I'm having no problems in exporting them at the correct dpi but the file sizes come out between 451kb and 1.8kb: 3 of the 6 images are too small, ie under 1mb.
    What I'm doing is 'export version', then choosing the preset option of 'jpeg original size', editing it to the dpi I want, setting the image quality at a max of 12.
    How can I get these file sizes to be bigger?
    Thanks, and please help me quickly because I've a submission deadline approaching!

    Well that's interesting Ernie. I did as you said, but also exported an image while I had the settings at 4288 x 4288 pixels. The resultant file size at that setting is 1.4MB. The file size when I went back to 'original size' is 795KB, exactly the same as before.
    So I thought - if I can go above original size in that way, then can I alter the % to be over 100? I tried at 150%, which it accepted, and I've now got a file size of 1.3MB.
    So I guess I've got what I wanted - not that I really understand it, because 'original size' clearly isn't original size at all!
    Sorry Leonie - I didn't answer your question - they haven't given me a specification for pixel size as in 4288 x 4288: only 300 & 72dpi, a file size of 1-3MB, and a they must be JPGs.
    And thanks for your help Frank - I've tried starting out with JPGs and with TIFFs as the photographer supplied me with both. I'd cropped some of the images but not others. I appreciate you offer of having a go with my images, but I think that - as I can go to over 100% - I've got it sorted now! Just hope there's no deterioration in image quality.
    Many thanks everyone!

  • Problem exporting as a Pict file in CS5

    I need to export a file in Pict file mode and I know Photoshop CS5 discontinued that format. Does anybody knows what could be a good replacement. I need to import the Pict file in DVD Studio Pro to use as an overlay for a menu. Thank you!!

    Batfilms wrote:
    ...I need to import the Pict file in DVD Studio Pro to use as an overlay for a menu...
    Are you certain of this need? I don't remember ever using PICT in any Final Cut Studio app. PICT is sooo last century.
    There's a long list of available formats:
    http://www.apple.com/finalcutstudio/specs/#dvdstudiopro
    I've always had success with PSD without any live layer effects.

  • Problem with using external jar file

    Hi
    I was using mail.jar library for swing application to send and receive emails. It just works perfect when I run with netbeans. But when I run the executable jar file at dist folder it runs but mail related functions doesn't work.What should I do now to make it work with mail features outside netbeans.
    thanks
    vinay
    Edited by: 899657 on Dec 24, 2011 5:07 AM

    899657 wrote:
    No. Because I am running the jar file which is created by netbeansNetbeans creates a 'dist' directory in which it puts your jar and a "dist/lib' directory in which it puts the dependent jars that are added to the project using 'project right mouse click'->Properties->Libraries. I would expect to see this 'dist/lib' directory contain mail.jar and activation.jar and any other jars that your jar needs. Within your program jar's manifest I would expect to see the Class-Path attribute have relative reference these jars ( lib/mail.jar lib/activation.jar ) and for the Main-Class attribute define your main class.
    Given this setup then you should be able to just type -
    java -jar yourjar.jarto run your program.

  • Problems exporting and playback the MPEG2-DVD videos, from .MP4 file!

    I have PremiereProCS4 v.4.2.1 installed on this PC:
    OS:WindowsXPProx64Bit; CPU:IntelCore2Quad Q9650; RAM:4GB DDR2 PC2-6400 Kingston; HDD:3x500GB WestrnDigital Caviar Green; VGA: Sparkle GeForce 9400GT 512MB.
    I have downloaded an AVCHD file .MTS 1920x1080p 25p, made by Canon HF100 AVCHD camcorder, from this source (.rar file):
    http://www.megaupload.com/?d=RWR5MNYHhttp://www.megaupload.com/?d=B9ZDX2RZ
    The videos in question called: "25pf_1.25_f1.8.MTS" playback and export from Premiere as MPEG2-DVD very well.
    I playbacked it on Premiere on the second Monitor as "OutputDevice". All Ok.
    I playbacked also the DVD made with EncoreCS4, on the external DVD set-top-box-player. All OK.
    I downloaded also another clip 1080p 25p, converted as .mp4, from the same author, imported then in Premiere with Preset "XDCAM EX 1080p 25p" (470MB) :
    http://www.megaupload.com/?d=B9ZDX2RZ
    No problems with playback.
    Exported as MPEG2-DVD PAL "Lower Field First".
    Opened in NeroShowTime Player: the video have a serious interruptions of the playback, some moments plays back-and-forward, and it isn't fluid at all!
    I tried to create a DVD with EncoreCS4 and played it with DVD Player set-top-box, and the result is bad, and is the same as the playback on my PC with NeroShowTime Player. It present the back-and-forwars interruptions.
    I tried also to create an AVCHD Project 1080p 25p and import the .MP4 file, but the problem persists !
    After exporting them, and played-back on NeroShowTime and on Set-Top-Box Player, the video have strange behavior, and plays back-and-forward!
    1) What Preset in Premiere should I use to editing, for this .MP4 file format, (filmed with Canon HF100 AVCHD and converted from original .MTS format to .MP4 format)?
    2) Is this a transcoding problem?
    3) Is this an exporting MPEG2-DVD PAL field-order issue?
    This is my bad exported MPEG2-DVD converted file, available for downloading:
    http://rapidshare.com/files/337858976/Canon_HF100_1920x1080p_25p_01_AVCHD25p.m2v.html
    Strange! With .MTS files I haven't any exporting problems at all!
    Please response me hurry!
    Many Thanks!
    Horsepower.

    OK! Sanyo use a bad format.
    But about JVC GY-HM100 Professional:
    I know this model very well!
    It records to .MP4 XDCAM_EX at the same manner of Professionals Sony Camcorder such this: Sony XDCAM_EX model "PMW-EX1" price €6.478,80.
    This JVC GY-HM100 camcorder is not tha same as Consumer JVC camcorders.
    It doesn't record MOD or TOD files.
    It records .MP4 files editables in Premiere with XDCAM_EX "Preset"!
    See those details:
    http://pro.jvc.com/pro/attributes/HDTV/manual/editing1.html
    http://pro.jvc.com/pro/hm100/content.jsp?model_id=MDL101845&attributeId=2&feature_id=02
    See also this page:
    http://pro.jvc.com/pro/hm100/content.jsp?model_id=MDL101845&attributeId=12&feature_id=12
    The first Brochure called "A Guide to the Most Efficient Workflow with ProHD
    (6 pg brochure)" explain very well the .MP4 - XDCAM_EX format and the Editing process that should be with Adobe PremiereProCS4.
    I have inspected the downloaded .mp4 file in question, and GSPOT v.2.70a reading this:
    -CONTAINER:
         isom: MP4  Base Media v1 [IS0 14496-12:2003]
    -VIDEO:
         CODEC:avc1
         NAME: H.264/MPEG-4 AVC
    -AUDIO:
          CODEC: mp4a: MPEG-4 AAC LC
    1c) Is this an AVCHD video codec?

  • I am having problems exporting my time lapses from quick time pro i need to save my files as photo jpegs but the standard video compression window will not open fully,

    i am having problems exporting my time lapses from quick time pro i need to save my files as photo jpegs but the standard video compression window will not open fully, it just keeps my mac (old 1.6Ghz 2.5 GB sdram G5 still good for most stuff i need) spinning for ever but i can see compression type H.264 selected and the other setting but i can not select any other options as it still thinking but never opens! why is this happening how do i get round it?
    my work flow is: 300 images shot on a 5d mark II medium jpegs opened in Light Room cropped to 16:9 then exported and opened in quick time i can save a .mov H264 giving me files sizes of 14 mb for a 16 second time lapse, mp4 9 mb. the only way i can get large files is saving as a self contained movie then i get 300mb files.
    i need to save my files 1920 x 1080 photo jpeg codec as i want HD quality.
    i am sure there is a simple way round this?
    thanks guys!

    It is very difficult to offer troubleshooting suggestions when the "os version" you are using is unknown as each os has their own troubleshooting solutions. 
    How large is your hard drive and how much hard drive space do you have left? 

  • Problem in ALV export to Excel (Local File)

    Hi guys,
    I'm using the option export data do local file, option excel, but some strange behave is happening...
    Some columns are exported without the last digit...
    Ideas?
    Regards,
    LMS

    Hi LMS,
    Use this link.
    Export to excel in ALV
    Problem with Export to Excel from ALV Grid
    Hope this will help you to resolve your problem.
    Regards,
    Vijay

  • Problems in Frame 1 with External HTML files

    I am having an issue with loading two external html files within
    my website.
    I have a case study page with a
    dynamic textbox and a scrollbar attached to it.
    I have another page "news" that
    contains another dynamic textbox with a scrollbar attached to
    it.
    I created two .txt files with my
    information for both pages.
    Working in Flash CS3 with
    Actionscript 2.0 at 30fps.
    My problem is this:
    I can go to my news page and the .txt file will be visible,
    but once I go to the other case study page and reveal that .txt
    file, I go back to the news page and the .txt file is no longer
    visible. Only a nonworking scrollbar is displayed with no text and
    nothing else.
    I believe I need to do something different in Frame 1's
    Actioncode. I just don't know how to get the other .txt file to
    work along with the other. I will be adding more .txt files in
    dynamic textboxes later and I really need to resolve this issue so
    I am able to add them with no problems. Appreciate anyone's help
    immediately if you can.
    Here is the temporary website link so you can test and see my
    problem. Don't forget to go the the news button first in the
    navbar. Then go to the case studies link and find the MAX Cat
    Packaging and view that .txt file, then go back and you will see my
    problem.
    Click Here to
    Visit Site

    well I made a separate layer and placed the symbol with the
    text box and scrollbar attached. That was the only thing on the
    layer as you mentioned to separate it. I don't see how I could
    separate the scrollbar from it as it is needed. So I made some
    keframes, selected the textbox inside the symbol and added the code
    you told me to add:
    caseStudyMC._visible=false; In the other frames where I
    needed it visible I added the code:
    caseStudyMC._visible=true;
    When I tested the movie. I didn't see the text but I saw the
    scroll bar still and the text still failled to appear after viewing
    the MC Case study text.
    Is the code supposed to go in Frame1? What do I do with the
    scroll bar image? I tried to Make it all disappear using the alpha
    at 0, but it still didn't work.
    thanks for all your help. hope you understand what I
    wrote.

  • Testing SWF with external XML file, strange problem.

    Hi!
    My problem started after migration to 2.01. But I think it's
    not version problem.
    I have old project which uses external XML files ("
    http://www.mydomain.com/myxml.xml").
    When I teste project in "bin" folder it works perfect and SWF
    import data from XML.
    I created new Flex project and copied all scripts from old
    one. And my new app can't read external XML!!! (tested in "bin"
    folder):
    *** Security Sandbox Violation ***
    Connection to xmlURL halted - not permitted from
    file:///C:/myproject/bin/myproject-debug.swf
    BUT when I copy my new SWF to the old project "bin" folder
    then it WORKS! Strange!
    I found in Help "The Global Flash Player Trust directory" and
    I checked files: "flexbuilder.cfg", "flexbuilder.fbr" there are all
    my project paths (old and new).
    Thanks for help!
    newman

    You should your homework with Google and other search engines
    better ;)
    http://www.robrusher.com/1/2006/08/Flex-2-Error-with-XML.cfm

  • Export DV Steam (.dv file) for Video Server Problem

    From Final Cut, I need to export a DV Stream file for our Video Server. It accepts .dv files. Problem is: the exported clip "inherits" just over 5 minutes of black or the last frame of video on the tail. This creates obvious timing problems for our on-air playback.
    I've seen other posts on this forum with identical problems, but none of them were solved. It was however suggest to NOT use DV Stream file. Unfortunately this is not an option for my station, as our server requires those files.
    So in summary, exporting a 30 sec spot to a DV Stream becomes a 5 minute 37 sec spot. No good.
    Thanks in advance,
    TOR
    Mac Pro   Mac OS X (10.4.8)   8 GB RAM

    Sounds weird enough! What servers are you using, and will they not accept a MPEG-2 transport stream as well? Most I've seen do and that can save a tremendous amount of space.
    But back to your problem of the added 5 minutes of black; as I understand your description, you're saying that the extra 5 minutes is added at the tail end ... correct? If so, won't the programming aspect of your set up switch to another stream at the programmed time regardless if the first program is still playing? ie; you enter the start and end time of each event for playback. Say event 105 starts at 8:00:00 PM and ends at 8:00:30 PM. Event 106 starts at 8:00:30 and ends at 8:01:00. Each spot is programmed to air for 30 seconds so at 30 seconds into event 105, event 106 SHOULD start playback and be switched to air - even though event 105 still has 5 minutes of black to go.
    -DH

  • $$PORTLET_ID$$ problem using external JS file

    Hi mates, I have the following problem ..
    I have JS functions in an external file and I'm trying to use the following adaptive tag in a JSP.
    <pre>
    <pt:namespace
         pt:token="$$PORTLET_ID$$" xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>
    </pre>
    I have added $$PORTLET_ID$$ to all my JS functions' names, unfortunately it cannot be replaced into the JS file during runtime.
    Is there any way to do this , without using inline JavaScript?

    I am not sure about v 5.* (there is no options like this for v 5.*), but in G6 you can check special option (see      Advanced Settings screen for Web Service) that allow parse external JS files on the fly (I have never tried by myself but I saw this option in G6).

  • External CSS file in HTML export options

    When exporting to HTML from ID CS5.5, is the option for an external css file a link to a file or a url?

    @ mmurphytech4pub, the External CSS allows you to choose a file from your computer. However, you can also mention an http:// URL if you're CSS file is hosted on a web server.

  • Strange problem with linking to external vob-file

    I have a strange problem with linking to external vob-file. I
    have created a link using BudApi:
    on mouseup
    set OK = baOpenFile ( the pathname &
    "Files\General\Video\VTS_01_1.VOB", "normal")
    end
    This code opens mpg-videos correctly, but nothing happens
    when I try to open vob-files with the same code. The strangest
    thing is that when I change the default program for vob-files to
    WinDVD this code works and the file opens, but when I change the
    default program to Nero Showtime this code doesn't do anything
    (when I open the file 'manually' from the folder, it opens
    correctly on Nero Showtime). My client uses Nero Showtime, so I
    really would appreciate any help on this one.

    temes wrote:
    >
    quote:
    Originally posted by:
    Newsgroup User
    >> When using Nero Showtime as a default program, the
    error code is 31,
    >> "There is no application associated with the given
    filename".
    >
    > Which suggests that something has gone wrong with file
    associations.
    > If
    > you double-click one of these files in an Explorer
    window does it fire
    > up Showtime and open the file?
    >
    >
    > Yes, the file opens correctly in Nero Showtime when
    double-clicking
    > it in an Explorer. I tried the file associations and
    created a
    > html-page with a link to the vob-file, and the html-link
    opens the
    > vob-file correcly with Nero Showtime. My client reported
    this
    > problem, so it's not just my computer which is having
    this problem.
    If you open a command prompt, do you get an association
    listed like this
    example for .txt files:
    C:\>assoc .txt
    .txt=txtfile
    C:\>ftype txtfile
    txtfile="D:\Program Files\JGsoft\EditPadLite\EditPadLite.exe"
    "%1"
    Andrew

  • Problems exporting files

    I'm new to using Flash (I'm using Flash Professional CS5) and am having problems exporting my files.
    While the files will export as .mov files, when I try to play the files they're simply a blank white or black screen.
    Any help or ideas on what I'm doing wrong?

    The most likely reason is that you are attempting to export a muxed mpeg file. QT will not export sound from such files. QT Mpeg Limitations
    This freeware will export to a number of different formats from mpeg with the sound and video intact. Mpeg StreamClip

Maybe you are looking for