-3

I want to know how can we write the below code snippet in a Javascript library:

<SCRIPT FOR="eventlib" EVENT="MyEvent(strTest)">
alert("Uploading files...please wait");
    </SCRIPT>

and also below code snippet:

 <SCRIPT LANGUAGE="JScript">
        function ctrl::ClickEvent(a,b)
        {
            alert("MyWindowControl_ClickEvent");
        }
      </SCRIPT>

I am getting syntax error when I try to write the above snippets in a Javascript LIBRARY.

7
  • 1
    Stupid question time: Do you just mean in a .js file? Commented Apr 16, 2012 at 11:28
  • your code is not even some valid javascript , so unless you are using js in a special context you did not tell us about, your code simply wont work ih a broswer. your script tags are not even valid ... Commented Apr 16, 2012 at 11:34
  • I am writing in a lotus notes JavaScript library i.e. .js file. And can you please enlighten me why it is not valid. These statements are used to capture events trig-erred from a C# user control embedded on a web page. These statements work fine when i use them in a webpage but when i try to write them in a .js file, i get a syntax error. Commented Apr 16, 2012 at 15:46
  • Check out these links and see what javascript has he used :) support.microsoft.com/kb/316516 and social.msdn.microsoft.com/Forums/en/clr/thread/… before you call something stupid!!! Commented Apr 16, 2012 at 16:13
  • 1
    @MujtabaBhat, Phil wasn't calling your code stupid. He was calling his own question stupid. It's the same as saying "Forgive me for this stupid question I'm asking." :) Commented Apr 16, 2012 at 17:33

2 Answers 2

0

You can't include the script tags when inserting into a Lotus Notes javascript library. Only functions.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for the reply Ken...You mean its not possible to write the above code in a .js file!!!
@MujtabaBhat, I can't tell if you're telling me or asking me?
The code above can go into a .js file, but not into the code window of a Lotus Notes script library
0

Instead of writing the Script block, we can write a Javascript function. From the event handler we can call it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.