DW Not calling script unless I put it in Template

Hi all,
I'm trying to call a function (javascript) that needs to be
placed within the <head> tags of my page. The page is based
off my main template, which contains a few basic javascript
functions used throughout the site.
Please take a look at my code. I believe I have placed the
script (validateAddToCart) in the correct position, in the
"Editable" region of the <head> portion of the page. But when
I click the button that calls the script, it doesn't work (right
now I have it just displaying an alert for test purposes).
However, if I were to edit my main template and place this
function into the same area as the other common javascript
functions... it works. I am able to call it just fine. Of course I
don't want to do this, as the script is only going to be used from
this one page.
Does anyone see what the problem is? Any help would be
appreciated. Thanks!

Where is the script?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Vozzek" <[email protected]> wrote in
message
news:fh24df$94t$[email protected]..
> Hi all,
>
> I'm trying to call a function (javascript) that needs to
be placed within
> the
> <head> tags of my page. The page is based off my
main template, which
> contains
> a few basic javascript functions used throughout the
site.
>
> Please take a look at my code. I believe I have placed
the script
> (validateAddToCart) in the correct position, in the
"Editable" region of
> the
> <head> portion of the page. But when I click the
button that calls the
> script,
> it doesn't work (right now I have it just displaying an
alert for test
> purposes).
>
> However, if I were to edit my main template and place
this function into
> the
> same area as the other common javascript functions... it
works. I am able
> to
> call it just fine. Of course I don't want to do this, as
the script is
> only
> going to be used from this one page.
>
> Does anyone see what the problem is? Any help would be
appreciated.
> Thanks!
>
>
>
>

Similar Messages

  • HT4623 my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    my iphone 5 is not getting audio during calls, im not hearing anything unless i put it on speaker. Can you help me is this a software problem its very annoying for every call i dial or recieve i have to put on speaker. Please help me apple please.

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • Do NOT call me and then put me on hold.

    A rep called to ask me is I was satisfied.  After giving him an ear full for a while, which I wasn't actually done telling him how I felt about my "service", he transferred me to someone to get my bill adjusted.  After 5-10 minutes on hold I hung up.  Someone needs to call me back.  I should not be put on hold when you contacted me.  My time is not free, especially when you call me during business hours at my work, as you did yesterday..  How do I have someone call me back rather than wasting my time on hold with you?

    When other people read this post they will know what I am talking about. You apparently do not see it. I was simply stating that you said yourself "ear full" and you put in quotations "service" which I was correct that your not happy with Verizon. It is perfectly normal to assume you were being disrespectful to a rep of a company your not happy with. Disrespect can come in more than one form.
    However, back on topic.
    Your original question was "How do I have someone call me back rather than wasting my time on hold with you?" The answer is highly unlikely they will. You didn't have time to be placed on hold and I get that, most people don't while they are at work. So just call them when you do have time. The billing team most likely does not have outbound calling teams. Which means if they do call back they will have to transfer you to the billing team anyways. I wouldn't wait for the call, it could be weeks but I personally don't think they will at all. I would just call myself when I had time.

  • How to put footer in the Delivery note  sap script form.

    Hi All,
      i am new to SAP SCRIPT , can any one guide us how to Create a footer in the Delivery note sap  script.
      I need to put  some message if the stock of the material is "0"(zero).
           can anyone  tell me the process to do this.
    Thanks
    Channappa Sajjanar

    Hi,
    U create a window in script (Footer), and in the Driver program call this window at last..
    eg:
    create a window in script and call it at the end in the layout..
    /E FOOTER
    P1 'Write Required text what u want to display;.
    now in print program, after printing all the line items in ur internal table call the FM write_form to print the footer...
    LOOP AT itab.
      call function 'WRITE_FORM'
        exporting
         window = 'MAIN'
        exceptions
          others = 1.
    endloop.
    now call, FM write_form to print the footer
    IF stock EQ 0.
    call function 'WRITE_FORM'
        exporting
         window = 'FOOTER'
          element = 'FOOTER'
        exceptions
           others = 1.
    endif.
    Hope it helps!!
    Rgds,
    Pavan

  • Why button can not call its script?

    I did very simple work: open Director MX 2004, click the
    button icon on the Tool Palette, and draw a button on the stage.
    Right click it and menu appear. Click "Scripts..." and script
    window opens. MouseUp() event function is there already. Write
    something in mouseUp(). Anything is OK. Put a breakpoint on some
    line.
    OK, then click menu Control-Play to run the movie. Click the
    button on stage. At this time, it ought to be broken on the
    breakpoint. But it didn't. The mouseUp() was not called!
    On the other hand, other controls are OK, such as Text,
    Shape, etc.. Only botton can not call its script. Is it a bug of
    Director MX 2004?

    It may be that you're creating flash component buttons. Try
    setting the tool palette to 'classic' mode (the dropdown at the top
    of the tool palette). The buttons you create once you've done this
    will be native director buttons.
    I've not really used flash component elements much at all so
    I can't offer advice as to why the mouseup isn't working with it.
    - Ben

  • My Iphone 5 voice speaker is not working.I'm not able to hear the voice of the person calling.But when I put my iphone 5 on speaker mode, things seem ok.Please provide me some suggestions.

    My Iphone 5 voice speaker is not working.I'm not able to hear the voice of the person calling.But when I put my iphone 5 on speaker mode, things seem ok.Please provide me some suggestions.

    Hello rizvijunaid,
    Thank you for providing the details of the issue you are experiencing with calls on your iPhone.  I recommend following the steps in the article below for the issue you described:
    iPhone: Receiver and call audio quality issues
    http://support.apple.com/kb/ts5196
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Mail command in script hangs and does not release control to calling script

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

    Hello folks,
    I am running in a situation which I haven't seen before.
    Main script calls function which executes another script.
    No matter which statement is the last in called script, it hangs on the last line and does not return control to main script.
    I tried to call another script not within the function - it is the same result.
    Can you help please.
    Below example of code:
    --- Main script:
    function checksum
    set -x
    /sybdump/ukgoald/scripts/egrep_expr1
    ##MAIN --- call to script script execution which runs mail command
    checksum
    ---- trace execution of called script:
    + read A B RF_FULL_NAME
    + print
    + /usr/bin/mailx -s Checksum Report [email protected]
    + 0< /sybdump/ukgoald/dump1/egrep_expr1.log3
    + print
    + return 0
    Edited by: ge**** on Dec 14, 2010 11:29 PM

  • I have a sign of a little lock on the top of my iPhone 4 screen and therefore I am not able to hear from the people who call me unless that I switch the speaker on. What should I do

    I have a sign of a little lock on the top of my iPhone 4 screen and therefore I am not able to hear from the people who call me unless that I switch the speaker on. What should I do

    The little lock has nothing to do with speaker volume.  It means you have locked the rotation on your iPhone.
    Have you tried using the volume control on the side of the iPhone to raise the volume when someone calls?

  • My sound is not working on my phone unless i put my head phones in, my phone is not on silent and can not here the ring when phoning someone...help

    my sound is not working on my phone unless i put my head phones in, my phone is not on silent and can not here the ring when phoning someone...hel

    Restart the device. http://support.apple.com/kb/ht1430
    Reset the device. (Same article as above.)
    Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • Hi there I'm wanting 2 phones 1 for wk an a good ph for out of wk on 1 SIM card so I can finish wk put that ph down an use my good ph not call diversion , all these flash apps an you can't do this from any ph so I've been told iPad, iOS 6.1.3

    Hi there I'm wanting 2 phones 1 for wk an a good ph for out of wk on 1 SIM card so I can finish wk put that ph down an use my good ph not call diversion , all these flash apps an you can't do this from any ph so I've been told
    iPad, iOS 6.1.3

    why don't you post using full words, no abbreviations, and proper punctuation?  Then perhaps your question will actually be legibile.

  • I can't hear my phone calls unless I put it on speaker. Tried cleaning by blowing on earpiece and headphone jack and pushing near front camera and earpiece speaker...no luck. HELP!

    I can't hear my phone calls unless I put it on speaker. Tried cleaning by blowing on earpiece and headphone jack and pushing near front camera and earpiece speaker...no luck. HELP!

    If you've tried everything mentioned you probably have a failed earpiece. One option is to get a BlueTooth headset and use it for all calls. It will be cheaper than the $199 out-of-warranty replacement price from Apple (if it's still in warranty or AppleCare it will be free). Good BT headsets can be had for around $40. And it will hold you over until the Next New Thing from Apple is available

  • SAP script element not called

    Hi friends,
    Window contains - elements -800, 801, 802
    I am calling an element 800 in a window which is called from print program (checked in debugging) followed by 801 but in form it is not called (does not display the hard code values i have shown).
    it halts at element 800 on pressing F5 (on other elements also ).
    It executes main window first followed by all other elements.
    But after executing main it executes only element 801 but not 800.
    Regards,
    GURU

    Hi GURU,
    "I am calling an element 800 in a window" - you can only call a text element from a driver program. SAPScript will process only one element per window automatically, thats's the so-called DEFAULT element. Everything in a window text appearing before the first explicit(/E) element definition is the default element.
    If your program does not call 801 but you want to appear it after 800, then remove the 801 element definition and make it part of 800.
    Regards,
    Clemens

  • When making a phone call I have to put it on speaker to hear the person I'm calling.

    When making a phone call I have to put it on speaker to hear who I'm calling. I can't hear when putting the phone to my ear.

    I had the same problem just one hour ago.  I could not hear the person I's talking to unless I put it on speaker.
    I restarted my iPhone 4 and still the problem was there.
    And it automatically started working again in one hour.
    I would suggest to shake the iPhone a little and try to reboot and see if it's helping.

  • EventQueueMonitor: guiInitialized is sometimes not called?

    If waiting for gui initialized event in a java agent that is loaded before my applet, guiInitialized behavior is not stable.
    In some machine, it's invoked, but in a machine in it is not called.
    I don't whether this is a permission or configuration issue.
    I have grant the applet with java.security.AllPermission privilege.
    Can anyone give me a clue?
    Thanks very much!

    Sounds like a race condition. I would use instead:
    ( sleep 10 && /home/myusername/bin/setmouse) &
    And put those xinput lines into that new script (don't forget to chmod +x).
    I would also add to the top:
    export DISPLAY=":0.0"

  • Web service handler could not called in client web service

    Hi All,
    I have two web service ServiceA & ServiceB and both implemented in weblogic.
    The ServiceA is SSL enable and protocol is https which is not published by me.
    The ServieB is my web service(wls8.1) and act as client for ServiceA.
    My problem is when i hit my service, its not able set the handler when it call ServiceA but it is invoking the service and giving application exception like authentication error.
    My service file:
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.HandlerRegistry;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import weblogic.webservice.client.SSLAdapterFactory;
    import weblogic.webservice.client.WLSSLAdapter;
    public class HelloService {
    String wsdl = "https://188.122.123.23/RemoetService?WSDL";
    static {
    SSLAdapterFactory factory = SSLAdapterFactory.getDefaultFactory();
    WLSSLAdapter adapter = (WLSSLAdapter) factory.getSSLAdapter();
    adapter.setTrustedCertificatesFile("D:\\lib\\certs
    cacerts");
    factory.setDefaultAdapter(adapter);
    System.setProperty("weblogic.xml.encryption.verbose","true");
    System.setProperty("weblogic.xml.signature.verbose","true");
    System.setProperty("weblogic.webservice.verbose","true");
    public String sayHello(String user) {
    RemoteService_Impl service = new RemoteService_Impl(wsdl);
    RemotePortType port = service.getRemoteServicePort1();
    String namespace = service.getServiceName()
    .getNamespaceURI();
    QName portName = new QName(namespace,
    "RemoteServicePortType");
    HandlerRegistry reg = service.getHandlerRegistry();
    List handlerList = new ArrayList();
    Map map = new HashMap();
    map.put("Username", "user1");
    map.put("Password", "pwd1");
    HandlerInfo info = new HandlerInfo();
    info.setHandlerClass(WSClientHandler .class);
    info.setHandlerConfig(map);
    handlerList.add(info);
    reg.setHandlerChain(portName,(List)handlerList);
    RemoteServiceResponse = port.callMe(name);
    My Handler file:
    package com.test;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.Name;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.soap.SOAPHeaderElement;
    public class WSClientHandler implements Handler {
    private HandlerInfo handlerInfo;
    public WSClientAuthenticateHandler(){}
    public void init(HandlerInfo hi) {
    System.out.println("Handler init");
    handlerInfo = hi;
    public void destroy() {
    System.out.println("Handler destroy method called");
    handlerInfo = null;
    public QName[] getHeaders() {
    System.out.println("Handler Header method called");
    try {
    Map map = handlerInfo.getHandlerConfig();
    QName[] headers = handlerInfo.getHeaders();
    System.out.println(" Config :"+map);
    for(int i=0;i<headers.length;i++) {
    System.out.println(headers.getLocalPart()+" "+
    headers.toString()+" "+headers.getNamespaceURI());
    }catch(Exception e) {
    e.printStackTrace();
    return handlerInfo.getHeaders();
    public boolean handleRequest(MessageContext mc) {
    SOAPMessageContext smc = (SOAPMessageContext) mc;
    System.out.println("Calling handler class.....................");
    try {
    SOAPEnvelope se = smc.getMessage().getSOAPPart().getEnvelope();
    System.out.println("Calling handler class.....................");
    SOAPHeader soapHeader = se.getHeader();
    Name headerName = se.createName("Security","wsse","http://schemas.xmlsoap.org/ws/2002/07/secext");
    SOAPHeaderElement headerElement = soapHeader.addHeaderElement(headerName);
    SOAPElement element = headerElement.addChildElement(se.createName("UsernameToken", "wsse", "http://schemas.xmlsoap.org/ws/2002/07/secext"));
    element.addChildElement(se.createName("Username", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testuser");
    element.addChildElement(se.createName("Password", "wsse","http://schemas.xmlsoap.org/ws/2002/07/secext")).addTextNode("testpwd");
    System.out.println("Calling handler class.....................");
    System.out.println("** Request: \n "se.toString()"\n");
    }catch(SOAPException e) {
    e.printStackTrace();
    return true;
    /** * Specifies that the SOAP response message be logged to a
    * log file before the
    * * message is sent back to the client application
    * that invoked the Web service.
    public boolean handleResponse(MessageContext mc) {
    System.out.println("Handler Response method called");
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Response: \n"messageContext.getMessage().toString()"\n");
    return true;
    /** * Specifies that a message be logged to the log file if a SOAP fault is
    * * thrown by the Handler instance.
    public boolean handleFault(MessageContext mc) {
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    System.out.println("** Fault: \n"messageContext.getMessage().toString()"\n");
    return true;
    Please need help here.
    Thanks in Advance,
    pps

    I have tested static client calling using handler simple above service and found the issues.
    QName portName = new QName(namespace,
    "*RemoteServicePortType*");
    The above line code has created the issues,becuase in wsdl file ( given similar wsdl file).
    <?xml version="1.0"; encoding="UTF-8"?>
    <definitions name="HelloService"
    targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <message name="SayHelloRequest">
    <part name="firstName" type="xsd:string"/>
    </message>
    <message name="SayHelloResponse">
    <part name="greeting" type="xsd:string"/>
    </message>
    *<portType name="RemoteServicePortType">*
    <operation name="sayHello">
    <input message="tns:SayHelloRequest"/>
    <output message="tns:SayHelloResponse"/>
    </operation>
    </portType>
    <binding name="Hello_Binding" type="tns:*RemoteServicePortType*">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sayHello">
    <soap:operation soapAction="sayHello"/>
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    namespace="urn:examples:helloservice"
    use="encoded"/>
    </output>
    </operation>
    </binding>
    <service name="Hello_Service">
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType1*">
    <soap:address
    location="http://host1:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType2*">
    <soap:address
    location="http://host2:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType3*">
    <soap:address
    location="http://host3:8080/soap/servlet/rpcrouter"/>
    </port>
    <port binding="tns:Hello_Binding" name="*RemoteServicePortType4*">
    <soap:address
    location="http://host4:8080/soap/servlet/rpcrouter"/>
    </port>
    </service>
    </definitions>
    From the above WSDL, I have four port name (port binding="tns:Hello_Binding" name="*RemoteServicePortType1*) which is not matching with PortType (portType name="*RemoteServicePortType*")
    even i have iterated from getPorts() method and used to invoke the service.But handler was not calling when i invoke.
    Please guide me here how i specify correct portname which can call Handler class also.
    Thanks in advance,
    pps

Maybe you are looking for

  • CR2 files from Canon Rebel XSi won't open in CS2

    Ok, so I have a powerbook G4 with Tiger Mac OS X and CS2 student version. I am basically computer illiterate so feel free to state the obvious here. I bought a new Canon Rebel XSi and have been shooting raw CR2 files. I have done this in the past wit

  • Is there a limit to the no of rows in an xy chart?

    The table has X-values (date format) in column A and Y-values (number format) in column B. The (linear) chart displays not more than 135 XY values. The first date is 04/28/2008, the last date is 03/06.2014. I am unable to get additional data on the c

  • How to incorporate LROs in ASO?

    Hi all, Can someone please suggest if there some alternative ways to incorporate LROs in an ASO cube? Can text based measures work for this? Are there other ways like using VB Macros etc.? Thanks.

  • Passing table values to RFC

    how can i pass tables to RFC as input? Thanks.

  • Can't open Time Machine.app

    I cant open the Time Machine app to make a restore. I don't get any error messages or see anything in the console? (Repaired permissions etc.)