Calling java script in view

Hi gurus,
I am stuck with some issu, here is my issue as fallows
Scenario:
I am planning to open outlook client by passing some java script and i want to attach history of the email like same as reply button in MSoutlook
- To call java script i am using webwidget UI element in WDJ and on action of  button i am calling that java script like as fallows
String html = ReplyAll_class_j.callActiveXFromHTML(this.wdComponentAPI,"toemail", "fromAdd", "Subject of email",  <html><body>htmlbody</body></html>);
wdContext.currentContextElement().setHtml(html);
-  in java class i am passing some java script like as fallows
public static String callActiveXFromHTML(IWDComponent compAPI,String toMailAddress,String ccEmailAddress,String mailSubject,String htmlBody) {
Script is here
the Issue is when i click the button it is not opening the outlook client but it is doing when i am click on the tab to recall the component, I thought it is doing this because i am passing "this.wdComponentAPI" as a parameter, but i dont know other solutions so please help me in this issue
thanks in advance
Anu

Hi,
I am not sure why is that statement "WE CANNOT CALL JS from WDJ"???? I did that pretty number of time in my developments. Can you please try the below mentioned way...
Inside your method what ever you write to open the JS window
String htmlcontent="Your HTML Content";
try
byte[] html=new byte [ 4096 ] ;
html=htmlcontent.getBytes("UTF-8");
wdContext.currentContextElement().setVaHTML(html);
IWDWindow win =wdThis.wdGetAPI().getComponent().getWindowManager()
          .createNonModalExternalWindow(WDWebResource.getWebResource(html, WDWebResourceType.HTML).getURL(),"window Name As per your choice");
win.setWindowSize(600,600);
win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
win.removeWindowFeature(WDWindowFeature.MENU_BAR);  
win.show();
catch(WDURLException url)
wdComponentAPI.getMessageManager().reportException("WDURLException::"+url.toString(),true);
Regards,
SrinivaS

Similar Messages

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • How to call java script function from JSP ?

    how to call java script function from JSP ?

    i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks

  • Calling java script from a button

    Hi,
    I have a Form and I would like to let the end-user to confirm some action that was initiated by pressing a button. The best way would be to call Java script, but the button is an 'item' button and not a 'region' button - i..e it is placed between items and not above the region, like Save, Cancel etc.
    In case of 'item' buttons I do not have 'Optional URL Redirect' field where to place the javascript call.
    Tamas

    You can try this..
    Instead of using button
    Edit the Item to which you want to associate a button.
    Go to Element tab
    Under Post Element Text enter
    </ br> <a href="#" -onclick=call_me() class="t20Button">Click me</a>Note : you need to change class="t20Button", i'm using theme 20 and in that the look and feel of button is derive from t20Button.
    remove the hyphen before onclick ..
    Regards,
    Shijesh

  • How to call Java script from java code?Can Jscript be executed at server?

    Hi All,
    We are using 'WebTrends' tool to analyze our site usage pattern.
    To use WebTrends, we need to :
    1) call Java Script code from the java code
    2)Java script has to be executed at server.
    Please comment on two points mentioned above. If yes, please let me know how to do them?
    Thanks in advnce,
    Regards,
    Ganga

    You can check out Rhino project.
    [http://www.mozilla.org/rhino/]

  • Calling java script from link

    Hi,
    I have a link on the page, when i click on the link i should call java script. Java script is written on page level edit area as HTML text.
    Can you give me the syntax ? how to call that script

    say you had a javascript function defined on or accessible to your current page that looked like this...
    function popupURL(url)
    {w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();}
    ...you could then call it with a link that looked like this...
    &lt;a href="javascript:popupURL('http://www.google.com');"&gt;Open Google in Another Window&lt;/a&gt;
    ...hope this helps,
    raj

  • Calling Java Script Function from Applet

    How can I call the Java Script method from Applet. This should work both on IE and NN running on both Windows NT and solaris. I know it is possible to call the function in Java script using JSObject. But I don't have JSObject at run time. Please let me know how to call Java Script function from applet without using JSObject.

    For Java <-> JavaScript communication in Netscape / Mozilla see:
    http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/lc.html#1014290
    http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/lc.html#1008480

  • Any way (event) to call Java method after view created in JSF 2.0

    Hi,
    I am using JSF 2.0 Mojarra's implementation.
    I am interested to know if there is a way to call Java methods before and/or after view has been restored.
    I wanted to initialize data for my page in this Java method.
    I could see there is an event class PostRestoreStateEvent added in JSF 2.0. How to use it?
    I tired to use f:event element as below, but it does not work. Can anyone share anyother idea to achieve this behaviour?
    <f:metadata>
    <f:event type="postRestoreState" listener="#{employeeLoadBean.loadAfterRestoreView}"/>
    </f:metadata>
    Regards,
    Kishore K S

    Hi,
    The problem is solved as below.
    <f:metadata>
    <f:event type="javax.faces.event.PostRestoreStateEvent" listener="#{employeeViewEventListener.postRestoreState}"/>
    </f:metadata>
    The above calls the Java method #{employeeViewEventListener.postRestoreState} whenever View has been restored.
    It was not working when shortName of the event (ie., postRestoreState) is given and throwing ClassNotFound exception.
    Regards,
    Kishore K S

  • Getting error in calling Java Script function in HTMLB page

    Hi
      I am having a button in HTMLB page which calls the Java Script function for click event.I have included the Java Script in the script folder of the application.
    I am calling the function present in JS like this,
    <SCRIPT src="portalsdc.js"></SCRIPT>
    function buttonClick() {
    someFunc()
    <hbj:button
    onClientClick="JavaScript:buttonClick();"
    disabled="false"
    design="STANDARD"
    />
    The Error i am getting in calling someFunc()is "Object Expected " ..
    Any suggestion how to make it work.
    Thanks in advance
    Saravanan

    Hi,
    My code in page is
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
    <hbj:page title="Epcf iView" >
    <SCRIPT src="portalsdc.js"></SCRIPT>
    <script language="JavaScript">
    function buttonClick() {
         someFunc()
    </script>
    <hbj:form>
    <hbj:button
    id="sendEvent"
    text="Send event"
    width="125px"
    tooltip="This button raises an event ..."
    onClientClick="JavaScript:buttonClick();"
    disabled="false"
    design="STANDARD"
    />
    </hbj:form>
    </hbj:page>
    </hbj:content>
    The code in Java script portalsdc.js is :
    function someFunc()
         alert ("HI");
    Even i have set and tried jsObjectNeeded = TRUE for button.
    Thanks and Regards,
    Saravanan

  • Calling java script from  HTMLInputText component of java server faces

    Iam attempting to do some thing like this
    HtmlInputText component = new com.ntrs.wcm.ui.components.inputtext.HtmlInputText();
         component.setId(componentId);
         component.setValueBinding("value",
                   FacesContext.getCurrentInstance().getApplication().createValueBinding(backingBeanEL));
         component.setSize(length);
         component.setMaxlength(length);
    now on the component iam calling the followng jav ascript function
    component .setOnkeydown("DisableCtrlKey(event)");
    The java script
    iam calling is
    function disableCtrlKey(e)
    //list all CTRL + key combinations you want to disable
    var forbiddenKeys = new Array(‘a’, ‘n’, ‘c’, ‘x’, ‘v’, ‘j’);
    var key;
    var isCtrl;
    if(window.event)
    key = window.event.keyCode; //IE
    if(window.event.ctrlKey)
    isCtrl = true;
    else
    isCtrl = false;
    else
    key = e.which; //firefox
    if(e.ctrlKey)
    isCtrl = true;
    else
    isCtrl = false;
    //if ctrl is pressed check if other key is in forbidenKeys array
    if(isCtrl)
    for(i=0; i<forbiddenkeys .length; i++)
    //case-insensitive comparation
    if(forbiddenKeys.toLowerCase() == String.fromCharCode(key).toLowerCase())
    alert(‘Key combination CTRL + ‘
    +String.fromCharCode(key)
    +‘ has been disabled.’);
    return false;
    return true;
    I have this function in the correct js page of my application but the script doesnt get executed and still iam able to do ctrl+v on the text box can anyone suggest waht i might be doing wron

    You can try this..
    Instead of using button
    Edit the Item to which you want to associate a button.
    Go to Element tab
    Under Post Element Text enter
    </ br> <a href="#" -onclick=call_me() class="t20Button">Click me</a>Note : you need to change class="t20Button", i'm using theme 20 and in that the look and feel of button is derive from t20Button.
    remove the hyphen before onclick ..
    Regards,
    Shijesh

  • Calling Java Script to open a Map (Like Google Map) from Oracle Forms 10g

    Hello,
    We are on Oracle EBS rel 12, Forms 10g. We have a requirement of calling a Custom Map application (Like Google Maps) from Oracle Forms 10g.
    When the user enters the address like town, city, country etc and clicks on a button there should be a call to this Google Map like application which will pass the co-ordinates (Latittude, Longitude) to the map and shows the place on it. If the user selects a different location on this maps and closes the window the parameters co-ordinates (Latittude, Longitude) should be back in the calling form and this new location should replace the original location.
    I appreciate if I can get some help for the above requirements.
    Thank you.
    GM

    Thank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
    Example:
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
    I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
    Regards
    GM

  • Problem in calling Java Script and Process at the same time

    Hi Frenz,
    I have a requirement like this. when i press the button a page level process(Not Application level Process) and java script function has to happen. i wrote the Java script function to close the child window and reload the Parent window. I wrote the Process for the Parent window to get the updated screen.
    But the Process is not happening and the only the java script function is achieved.
    Can you suggest any idea to achieve both of the things at the same time?
    Thanks in Advance.....

    See this example:
    http://apex.oracle.com/pls/otn/f?p=31517:93
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Calling Java Script from a link

    Does any one know how I can call a JavaScript function when I click on a link in a report. Where would I put the call? Is it even possible?
    Thanks
    Aron

    Hello,
    where specificly (name of fielld) i.......Is this on a report? a list ? just some html in the middle of the page?
    You need to add a little bit more detail on your question.
    Don't skimp on the words we have have plenty of space for the post ;)
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Calling java script function in portal

    Hi,
    I want all the users (anonymous & logged in) of my portal application to have drag and drop facility to my portlets. I couldn't see DVT enabled property in my workspace as mentioned in
    http://edocs.bea.com/wlp/docs102/portals/develop_portals.html#wp1057635
    How to activiate this feature? Will it support anonymous user to change the portlet locations?
    Alternative:
    I found JQuery UI from http://ui.jquery.com/ has sortalble javascript function. It has the similar feature like drag and drop.
    Please let me know, how to add jquery.js sortable javascript function to my portal application, so that users can place the portlets in any place within the page.
    Thanks
    Baskar

    Hi ,
    I guess visitor tool (deskop shell property) allows only logged in users to move the portlets. correct me if i am wrong. It would be very helpful if you point me to some good documentation on this.
    I would like to have this feature for non-logged in users also. Is it possible in weblogic portal V 10
    Thanks
    Baskar

  • Captivate 8: How to add a button onto a question slide to invoke some java script?

    I have some question slides where the user has to guess an item on a picture. Because the picture is very small, I want to add a zoom button which calls a function in my LMS to popup the picture in a bigger window. I could not find a way to add a button where I can call java script, so I tried to solve this by using a smart shape with option "use as button" set and adding the java script action. This works fine for the popup but now the submit button on the slide no longer works. Clicking the submit button just disables the answers and stays on the current slide even if I did not click onto the shape button previously. How can I achieve my goal to display a bigger picture of an image on my slide on the users request?
    I also tried the "ImageView" widget, but this is not a practicable solution.
    Thanks,
    Martin

    I think I found the solution: In the "Timing" tab for the shape there is an option "Pause After" which was set to 1,5 seconds. I cleared this options and now the submit button is working again.
    Martin

Maybe you are looking for

  • Activate customer invoice form in SAP

    Hi Expert, Need your advice. We've encountered incident whereby when sending the document type = DR (Customer Invice) for trigger correspondence at T-Code : F.61.  When spool out the printing, system propmt out error message : Form Z140_DOCU_EXC_02 (

  • Home Sharing troubleshooting

    I'm having lots of problems at the moment watching movies on my Apple TV (home videos) it keeps dropping off after 5 / 10mins back to the main menu. I've tested the network and everything is working fine. everything was working fine over 1 week ago s

  • Cannot suddenly air print, but has not been a problem previously

    Have not had a problem air printing, but suddenly not able to.  Have checked printer settings and works fine from iPhone and laptop but will not work from ipad.  Any one any clues please.

  • Help! Having problem with ichat/video

    Hello Last week i bought a macbook and love it. Yesterday i was playing around with the camera and using the video effects ( changing the way i could look). Then a blue screen flashed then it would happen again few min later. Today, it happend again,

  • Re-install mavericks in order to clear dylib

    Hi, I want to reinstall my mavericks in order to clean my lib (specially dynamic libraries) and start some command-based application all over again. I messed up some of my dynamic libraies whilte installing a python-based software, Do you think this