Exporting javascript from the head

Hope someone can help - I've built up a site (
http://www.magic-dust.co.uk),
added in some simple Spry effects along the way, and as a result
got some javascript in the head of the document. I know I should
put this in an external .js file and link to it from the HTML, but
I'm unsure of how to do this.
Any advice much appreciated.
Thanks in advance. Matt.

> Hope someone can help - I've built up a site
> (
http://www.magic-dust.co.uk),
> added in some simple Spry effects along the way, and as
a result got some
> javascript in the head of the document. I know I should
put this in an
> external .js file and link to it from the HTML, but I'm
unsure of how to
> do
> this.
Remove this:
<script src="SpryAssets/SpryEffects.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_effectAppearFade(targetElement, duration, from,
to, toggle)
Spry.Effect.DoFade(targetElement, {duration: duration, from:
from, to: to,
toggle: toggle});
//-->
</script>
<!-- InstanceEndEditable -->
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length;
i++)
if (a
.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a
)&&x.oSrc;i++)
x.src=x.oSrc;
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for
(i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers
.document);
if(!x && d.getElementById) x=d.getElementById(n);
return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null &&
!img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn =
img.src;
if ((nbArr = document[grpName]) == null) nbArr =
document[grpName] =
new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img =
MM_findObj(args
)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img =
MM_findObj(args)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] :
((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver
; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr; img.src
= img.MM_up;
img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img =
MM_findObj(args
)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
//-->
</script>
Put this into an external file named something like
myscripts.js
<!--
function MM_effectAppearFade(targetElement, duration, from,
to, toggle)
Spry.Effect.DoFade(targetElement, {duration: duration, from:
from, to: to,
toggle: toggle});
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length;
i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++)
x.src=x.oSrc;
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for
(i=0;!x&&i<d.forms.length;i++)
x=d.forms
[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n);
return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a
))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null &&
!img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn =
img.src;
if ((nbArr = document[grpName]) == null) nbArr =
document[grpName] =
new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img =
MM_findObj(args)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img =
MM_findObj(args
)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] :
((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver; img.src = (img.MM_dn) ?
img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr
; img.src = img.MM_up;
img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img =
MM_findObj(args)) !=
null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
//-->
Then in the <head></head> tags of your page put
this:
<script type="text/javascript"
src="myscripts.js"></script>
Where"myscripts.js" is the path to the file you made.

Similar Messages

  • I just started a free trial of the Adobe XI product that allows me to create an editable PDF. I'm done creating the form and ready to export it. When I click Export PDF from the File menu, it says Adobe encountered an unexpected error. What am I doing wro

    I just started a free trial of the Adobe XI product that allows me to create an editable PDF. I'm done creating the form and ready to export it. When I click Export PDF from the File menu, it says Adobe encountered an unexpected error. What am I doing wrong?

    Good to know  — there is no such application as "Adobe XI".
    "Adobe" is the name of the company.
    "XI" is indicative of the use of either Acrobat XI or Reader XI.
    Neither Acrobat XI Pro (for which Adobe provides a free, fully functional 30-day trial) nor Adobe Reader XI (the free to download and use PDF viewer that Adobe provides) have  an "Export PDF" entry under "File".
    "Export PDF" only is present in Adobe Reader XI over on the right on the "Tools" panel.
    The "Tools" panel provides a way for a user of Adobe Reader XI to connect to various By Subscription online services (gotta pay eh).
    Export PDF is one of these. A subscription lets you send a PDF file to the online internet service (aka "cloud" service). The service then exports to a supported file format (Word / Excel / ...) and the user selects / directs where the output file is to be saved on the user's local machine.
    Of course to use any of the online subscription services one must have an active (paid up in full) subscription to the service.
    So ---- As described the puzzle pieces don't fit eh.
    What specific Adobe (the company) applications are you using?
    Acrobat XI Pro? Adobe Reader XI? Both? 
    Be well....

  • Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper)

    Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper). For example, if I am downloading a paper by smith called "Surgery" that was published in 2002, it will automatically set the file name in the download to smith- surgery 2002. I have heard pages is smart enough to do this.
    thank you

    Pages can export only its own documents. They may be exported as PDF, MS Word, RTF or Text files.
    Pages can import (ie. Open a file as, or Insert a file into, a Pages document) documents in several formats, but won't rename the document as you describe. Documents that can be Opened (eg. Text, AppleWorks 6 WP, MS Word files) are converted to Pages documents, and retain their original names, with .pages replacing the original file extension. Files that can be Inserted (generally .jpg, .pdf and other image files) become part of the existing Pages file and lose their names.
    It may be possible, using AppleScript, to extract the text you want and to Save a Pages file using that text as the filename, but that would depend in part on being able to identify which text is wanted and which is not.
    How will the script determine where the author's name begins and where it ends?
    How will the script recognize the beginning and of the title, an decide how much of the title to use in the filename?
    How will the script recognize the year of publication?
    For papers published in a specific journal, with a strict format for placing each of these pieces on information, or containing the needed information as searchable meta data in the file, this might be possible. But it would require knowledge of the structure of these files, and would probably handle only papers published in a specific journal or set of journals.
    Outside my field of knowledge, but there are some talented scripters around here who might want to take a closer look.
    Best of luck.
    Regards,
    Barry

  • Exporting images from the Captivate 5 Library

    I am able to export Captivate 4 images to a folder. I am able to export Captivate 5 images to a folder, but they cannot be opened with Fireworks or any other application I've tried. Although the file is a bmp, Fireworks says, "Could not open the file. Unknown file type." Am I the only one experiencing this problem?
    thomas

    Yes. I can right-click and edit a background in Fireworks, but what I'm talking about here is different. Captivate has long offered the option to export images from the library. This has been, and still is easy. The difference is that it doesn't work. The exported files are not readable.

  • Export data from the R/3 system from a ABAP report to BW system

    Hi Everyone,
    I have requirement to export data from the R/3 system from a ABAP report to BW system.
    Currently we are planning to create a Ztable to put the data into that, but I would like to know , is there a better way to do instead of going for a Ztable.
    Regards,
    Shobana.K

    Hi Shobha,
    In the second option as you mentioned sending the data to BI.
    1. Check when u click on second  option what is the target details that is showing?( Menas suppose if you send the data using Open Hub u will find the options like FF,Otherparty,etcc...).
    2. As you mentioned if you have option to upload the data to Table.Then you can load and u can create the Generic DS.
    Issues & Concern
                1. Need to think how the data will be poplated(Means how are going to maintain Delta info records table level before
                   populating to it)
                 2. whether Ztable should be refreshed before updating R/3 report data to Ztable.
    Based on the concerns verify your scenario.If  everything ok then u can proceed as per u r plan.
    Regards
    Ram.

  • Can we still export data from the PSA?

    in bw 3.5 we were able to create an export datasource from the PSA.  now in netweaver 7.0 it seems this functionality is lost.   am i correct on this?
    thanks

    Hi Brian,
    in BI 7.0 the PSA belongs to the new BI-Datasource object which you can maintain with transaction RSDS. The new transformations and data transfer processes can be directly connected to the datasource without having to generate an export datasource. Also InfoProvide can now directly connected without generating export datasources.
    Bye
    Frank

  • I have a 30 Gig 5th Gen IPOD It plays but there is no sound from the head phones and when its docks can anyone help

    I have a 30 Gig 5th Gen IPOD It plays but there is no sound from the head phones and when its docks can anyone help

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • Can I edit a HD project in SD, then export HD from the original files?

    I have a project that has been shot in HDV that, for a couple of reasons, I have to edit on my laptop instead of my rather powerful desktop. As well as it being HDV (1080 50i), it's also going to need lots of effects adding to it. Now, my laptop is pretty good for a laptop, but I know it's not going to be able to handle this - it plays back HDV choppily at the best of times, so this would give it a heart attack.
    So I was wondering - would it be possible to take the captured HDV files, export them as SD files (like standard DV Microsoft AVI), which my laptop can handle easily, edit using those files but then, at the end, export the video in 1080 50i from the original captured HDV files (using my desktop if necessary)?
    I think I've seen or heard this discussed before, because that's where I got the idea from. So is it possible, and if so, how?

    Thanks for the quick response. I've just read through that other thread, thanks for the link. Also thanks for making me realise that what I'm looking for is called proxy editing - if I'd known that, I would have found much more useful information when I first googled for it! I've actually just tried something similar, playing around with the first 30 seconds of my footage. I've exported it as two files - HD.mpeg and SD.avi, created a new project, imported the AVI, did a simple edit, added some lighting effects, saved it, then closed. I then moved the AVI file and reopened the project - of course it told me the file was missing and asked me where it was. I pointed it to HD.mpeg instead of SD.avi and it accepted it - the project is now in HD with the edit and effects intact. That's basically exactly what I wanted, there's just one problem I can foresee - I'll have to edit the 720x576 footage in 1440x1080 sequences, leaving a huge margin around the edges in the sequence monitor. I can live with that by zooming in on it, until I have to crop a shot, then it's going to be tricky to get it scaled and positioned correctly. I'm going to make some kind of guide to overlay it, see how that works out - it should do me for this one project.

  • Update the z table from the header text of VF01 on save

    Hi All,
    I have a  Z table 'ZEXIM_LICDETAILS'. Whenever a billing doc. of type 'ZEXP' is created with tcode VF01, the Z table fields should also be updated. I have learned that we cannot include tabs in Billing Doc, so the licence number is put in the header text of the VF01.
    Is there any way that I can update my Z table from header text, when we save the VF01.
    Waiting for your repy in anticipation.
    Thanks a lot in advance,
    Anu

    Write code in USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    Reddy

  • Removing my photo from the header on e-mails

    Hello all.
    When I send an e-mail with "Mail" a thumbnail of an image I took with Photo Booth appears in the header bar. I have deleted the image from the Photo Booth folder but it still come up on my e-mails. I have looked through the Mail settings to try and remove it but cannot see how to.
    Can anyone help please.

    kptphoto,
    That photo only appears on your computer. It doesn't send that photo with the email. You're the only one who sees it.
    The photo is located in Address Book with the contact associated with that email address.
    Regards,
    Captfred

  • Missing export options when exporting Excel from the CRXIR2 CrystalReportVi

    Hi!
    This is an app ported from CR9 to CRXIR2/Net. I print to screen using the CrystalReportViewer in a Windows form. Export button is enabled, but when I click and export to say "Excel", no further dialog is shown. Ie I never get the one wherev you normally would change options like Column widths and page breaks. What have I done wrong?
    Exporting from the Crystal designer app itself works, ie I get the additional dialog.

    OK. I had 11.5.12.1838 installed which is R2 Sp6. Or is it 2A? Your blog says "Check the version. It should be 11.5.12.1838."
    Edit:
    The behaviour is also different. If I run the CR designer and select export, I get a window, much like the one in CR9, ie where I can select destination etc. From the viewer I get a window, much like the ordinary Windows save dialogue and from there I cannot change any options. All I can do is select export type.
    To add insult to injury the dialog defaults to *.rpt, even though I have done a:
    m_Report->ExportOptions->ExportFormatType = CrystalDecisions::Shared::ExportFormatType::PortableDocFormat;
    before passing the report to the viewer.
    To elaborate: This is what I would like to happen:
    http://www.pedago.fi/dalton/diverse/export1.png
    Then:
    http://www.pedago.fi/dalton/diverse/export2.png
    But what I get is:
    http://www.pedago.fi/dalton/diverse/export3.png
    Edited by: Anders Gustafsson on Nov 10, 2011 9:03 AM
    Edited by: Anders Gustafsson on Nov 10, 2011 10:17 AM
    Edited by: Anders Gustafsson on Nov 10, 2011 12:53 PM

  • Remove "content-length" item from the header of httpServletResponse

    Hi all,
    tomcat6.0, JDK5.0.
    I use tomcat6.0 as the web container and JDK version is 1.5.
    I found tomcat connector will add "content-length" item in all httpServletResponse header.
    But now I need generate some chunked http response.according the RFC, there should be no "content-length" item in the http header when response is chunked-encoding.
    So how can I remove the 'content-length" item from the httpServletResponse header?
    Thanks a lot!
    Rare

    one posting to a question, please:
    http://forum.java.sun.com/thread.jspa?threadID=5268921&tstart=0
    %

  • How do I extract the name of the incoming file from the Header?ta

    Hi all,
    I am using 11g TP4:
    I have an File Adapter Service that reads a file. In the Routing Service I want to include the name of the file that was read in the message passed onwards to the target service.
    Previously we used an expression like
    <xsl:variable name="INFILENAME"
    select="ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/>
    to set the $INFILENAME variable to the name of the file.
    This does not seem to work anymore. I notice a new namespace has appeared:
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.GetRequestHeaderExtnFunction"
    is this namespace the origin for a new function that replaces getRequestHeader? Is it still getRequestHeader? What then is the correct syntax - as I am getting XPath errors with either ehdr or mhdr. Is there any documentation on accessing the contents of the header?
    Thanks for any help you can provide.
    Lucas

    Hi Lucas (says Lucas),
    After a little digging and trying out things I have found the solution.
    The Advanced Components palette available in the Mapping Editor has a section Mediator Functions. The getProperty() function shown there can be used to extract header properties. The property I am after is called jca.file.FileName, and can be assigned in the XSLT document like this:
    <ns2:filename>
    <xsl:value-of select="mhdr:getProperty('in.property.jca.file.FileName')"/>
    </ns2:filename>
    Note that the Assign Values dialog that is available in the Mediator editor has a long list of many names of properties that are available, including jca.file.Directory and jca.file.Size as well as many properties for the AQ, BPEL and EBS adapters.
    hope this helps any one besides myself.
    bye for now,
    Lucas

  • Mail. How can I copy the sender and date info from the Header like I used to do in Lion?

    I used to find it very useful to drag and highlight all the info in the header of the email including sender, cc, date, subject etc to be able to paste in into other docs as reminders of who sent what when. Now I have to do 2 copy/pastes. Not a deal killer but makes my life just that little bit more unnecessarily complicated.

    There is usually a toolbar button in the editor to turn a text link into a clickable hyperlink (look for a chain like button).<br />
    You can select the text and click that button to turn the link into a clickable hyperlink.<br />
    If you can't find the button then hover them all to check the tooltip of each.<br />
    * Make Link - https://addons.mozilla.org/firefox/addon/142

  • Embedding and calling JavaScript from the CS SDK

    Hi, the article about the communicating between JavaScript and the CS SDK is exactly what i was looking for!
    http://cookbooks.adobe.com/post_Communicating_between_JavaScript_and_the_CS_SDK_us-17383.h tml
    Unfortunately I have a problem with the example code. Everytime i try to run the script an error message pops up:
    "Error #1014: Class flash.external::HostObject could not be found."
    Does anyone have a solution for this problem or any idea why this error appears?
    I didnt change the script, i included the apedelta.swc and the link type of the apedelta.swc is external. (I checked it like a hundred times. :-))
    Thanks in advance!
    Joerg

    Unless I am wrong, you cannot debug in Flex once you loaded csaw libraries. I mean, Flex will catch most mxml/as errors but it won't be able to deal with the part interacting with cs apps. At this level, only ExtensionBuilder can.
    To be clear and given the fact you correctly imported the right classes and all needed stuff, this won't work in FB:
    trace (app.activeDocument.name) or whatever cs dom command.
    Hope it helps,
    For what it worth, I created a jsinterface call to alert() so I use it as a trace replacement tool. Once again ExtensionBuilder is far more usefool in this workflow.
    Loic

Maybe you are looking for