Possible to run javaBean in onClick event?

Hello everybody,
Does anybody know if it is possible to run javaBean from onClick event in JSP,
for example:
.... onClick="<%bean.doSomething()%>" .......
It does not work for me, perhaps it is a syntax error??
Best regards,
danny

Hello everybody,
Does anybody know if it is possible to run javaBean
from onClick event in JSP,
for example:
.... onClick="<%bean.doSomething()%>" .......
It does not work for me, perhaps it is a syntax
error??
Best regards,
dannywell it wont work, coz onClick event is a client side event which will execute in the browser, to run an server event u have to load a page in a new window so that when the page load it would execute the doSomething() methodof the bean.

Similar Messages

  • Using onclick events in the javascript dialog box

    hi,
    Iam creating dialog box to get some inputs and use it for batch processes. so, i need onclick events on that dialog box.
    for example:
    in my dialog box, i fix a browse button(check box) and connect the choose folder box. but, after i click okay button only i get the choose folder box. i need to see the choose folder dialog box after click the check box.. is it possible???
    regards,
    Subha oviya

    hi bob,
    The following code shows a dialog box.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    var myDialog = app.dialogs.add({name:" Dialog Onclick Test", canCancel:true});
    with(myDialog)
    with(dialogColumns.add())
    with(dialogRows.add())
    with(dialogColumns.add())
    var browse_check = checkboxControls.add({staticLabel:"Browse",checkedState:false});
    if(myDialog.show() == true)
    if(browse_check.checkedState == true)
    var filefolder = Folder.selectDialog("Choose Files Folder");
    This is my code. After run this script a dialog box appear on the screen. we check the browse check box and then click he ok button. after then a "choose folder dialog box" will appear.
    i need to see the "choose folder dialog box" before press the ok button and after check the check box. IS IT POSSIBLE?
    Regards,
    Subha

  • Is it possible to run an application from a user or container login script?

    Is it possible to run an application from a user login script or a container login script?
    A "Force Run" application object works fine if the user's workstation is setup to auto-load "Application Window" or "Application Explorer" but in this case I'd like to run an application when someone does a manual login (ie. they right-click red "N" and choose "Novell Login...")
    Using a User Package's "Scheduled Action Policy" and the Event=Login also does not work when a user logs in manually. This type of Event seems to only apply when the user first logs into the workstation, not at a manual login.
    Thanks,
    Marc

    > Is it possible to run an application from a user login script or a
    container login script?
    Yes, see the documentation:
    http://www.novell.com/documentation/...a/a7q6999.html
    Regards
    Rolf Lidvall
    Swedish Radio (Ltd)

  • Can't set a hidden field value from onClick event with a runtime expression

    Hi,
    I need to set a hidden field in an onClick event of button but it's not working.
    <html:submit styleClass="btnLink" onclick="document.empForm.hidden.value='<%= empID%>'">
    <%= empID%>
    </html:submit>
    Althought the second expression is evaluated and written successfully "the button value"
    I heard that this is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions.
    Is there any work around to solve that?
    I can't use EL as I'm using old JSP version

    I guess, it should work; instead of html:submit, try with button.

  • Input Field in table - I need a OnClick Event

    Hello everybody,
    I have the following problem:
    I have created a table in my view which is filled at runtime. The table has 3 different rows and every row has TableSingleMarkableCells, these cells further have a input field as their celleditor.
    I now want to know which cell the user is editing. I have a AttributePointer through which I know that at the time the user presses the enter key. But I need to know whether the focus has changed. Because there is the possibility that the user switches between the differnt cells with the arrow key or the tab key. But the AttributePointer only gives me the first selected cell.
    Have anybody a suggestion to solve this problem -  it seemed to be something like definingb a OnClick event for a input field (additionaly to the default OnEnter event...)
    Best regards,
    Sebastian

    Hi,
    You can find out at which row the editing goes, by using
    onLeadSelect action of TableUIElement.
    in onLeadSelect action you can find row number using this statement
    int rownumber= wdContext.node<TableNode>().getLeadSelection();
    Regards
    LakshmiNarayana

  • Trouble Passing Values Using onClick Event

    I have a page with a div, <div id= PF_Text_Panel></>,  containing text describing an image, the image is in a separate div.  Using CSS the text panel is on top of the image and covers about 1/3 of the image’s left side.  A slide effect, handled by the function Slide, targets the PF_Text_Panel div. The function Slide is triggered by an onClick event allowing the user to slide the description to the left and reveal the entire image.
    The function Slide contains an if statement. The if statement is used to determine if PF_Text_Panel is open or closed using the variable SldPnlState  as a flag like this; if the variable SldPnlState ==1, then run Slide.  The other part of this function, which actually slides the div is an instance of the Slide Effect, inserted using Dreamweaver CS4.
    The variable SldPnlState  is set using the function setSldPnlState
    The function setSldPnlState, initiated by an onClick, passes a value to the variable SldPnlState, in this case it can be set to either 0 or 1 by separate onClick events
    To test if the variable SldPnlState is being passed from the onClick event to the variable I included the function printVar which writes the value of the variable SldPnlState to the screen.
    I believe that the Spry effect Slide portion of the function works because if I go into the code and manually set the variable SldPnlState to 1 the function Slide works and if I set it to 0 the function Slide does not work.
    This the bug:
    printVar indicates that the value is being passed the variable SldPnlState, it displays either a 1 or 0 as expected. 
    The function Slide does not work however, when the variable SldPnlState should be set by the onClick event passing the value using the function setSldPnlState.  It does not seem like the value is being passed from the onClick event triggering the function or that somehow the script stops running.
    You can demo the page at: http://dg-ad.com/Slide_Effect_Logic_Parameter.html
      Attached is the code, if anyone has some suggestions I would really appreciate hearing from you
    <!--begin setup Spry Effects-->
    <script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
    <!--Begin pass variable from flagToggle parameter to SldPnlState variable includes printVar function to sent results to screen-->
    <script language="javascript" type="text/javascript">
    <!--begin set flag using onclick event-->
    var SldPnlState = (1);
    function setSldPnlState(flagToggle)
    SldPnlState = flagToggle;
    </script>
    <!--end set flag using onclick event-->
    <!--begin slider onclick event-->
    <script type="text/javascript">
    if(SldPnlState==1)
    function MM_effectSlide(targetElement, duration, from, to, toggle, transition, fps, horizontal)
    Spry.Effect.DoSlide(targetElement, {duration: 500, from: 0, to: 200, toggle: true, transition: 2, fps: 750, horizontal: true});
    //-->
    </script>
    <!--end slider onclick event-->
    <!--begin write variable onclick event-->
    <script type="text/javascript">
    function printVar()
    document.getElementById('test_display').innerHTML = SldPnlState
    </script>
    <!--end write variable onclick event-->
    </head>
    <body id="wrapper">
            <div style="padding-top:50px;">
            <a href="#" onclick="setSldPnlState(1);">Set var SldPnlState to Flag Status Set Open (1)</a><br><br><br>
            <a href="#" onclick="setSldPnlState(0);">Set var SldPnlState to Flag Status Set Closed (0)</a><br><br><br>
            <a href="#" onclick="printVar();">Print Flag Status to Screen</a><br><br><br>
            <div id="test_display" style="border:#9CC thick groove; width:50px; height:50px; margin:15px; text-align:center; font-size:36px;"></div>
            <a href="#" onclick="MM_effectSlide('PF_Text_Panel');">Slide Panel</a><br><br>
            </div>
    <div id="PF_Text_Panel" style="border:#9C9 thick solid; height:250px; margin-top:25px;">
      <div id="PF_Text" class="PF_Text">
      </div>
      <script type="text/javascript">
        var panelWidget_1=new Spry.Widget.HTMLPanel('PF_Text');
        </script>
    </div>

    Thanks so much for taking a look at this.  The whole reason I am doing this is that I couldn't find a state indicator flag in the Spry.Effect.DoSlide effect.
    I see that the htmlPanel does not have a bearing on the problem as you mentioned but not having the javascript doesn't matter either.  I am using the Spry.Effect.DoSlide effect, it is in the head,  in the function with the if statement, and it is making the div"PF_Text_Panel slide which works fine including the if statement.  If I set the var SldPnlState = (1) it works set it to 0 and the slide effect is disabled.  I need to be able to change the variable using an onclick event.
    The problem as you mention is with the function SldPnlState = flagToggle;  This is what I need to do.  I need to pass a value to  the variable SldPnlState from an onclick event.  As the function Slide is set up, with an if statement, the div will slide if SldPnlState=1 and the slide function will turn off if SldPnlState=0.  However when I do the onclick="setSldPnlState(1);"event there is no effect on the Slide function.  The value seems to pass to the variable tSldPnlState since I can get the value of this same variable to display using the function printVar() which will display 1 or 0 depending on which onclick event I run.  It seems like the I can pass the variable from the onclick event it's just that if statement in the function MM_effectSlide never sees it.  I don't know enough to trouble shoot this.  But I will take a closer look at the SldPnlState = flagToggle; part as you suggest.

  • How to invoke a Servlet on onClick event of CheckBox ?

    Hi,
    Can anybody provide me with the code - how to invoke a Servlet & then pass all form variables to the Servlet on onClick Event of CheckBox in a JSP Page.
    I guess it is possible with Javascript but i need the code...
    Pls Help !
    Thanx.

    <html>
    <head>
    <script language="JavaScript">
    <!--
    function submitMyForm(){      
    document.myform.submit();
    //-->
    </script>
    </head>
    <body>
    <form name="myform" method="POST" action="http://mywebserver/servlet/myServlet" target=_top>
    <input type="checkbox" name="mycheckbox" OnClick = "javascript:submitMyForm()">
    </form>
    </body>
    </html>
    Hope this helps...

  • Is it possible to run a java application/program forever?

    Hi,
    Is it possible to run a java program forever?
    if so please reply how it is possible
    thanks in advanced.

    There was a computer with many processes.
    Some processes came and went: they exited either voluntarily by calling exit(2),
    simply returned from their main method, or were terminated by a signal
    like SEGV, TERM, and the dreaded uncatchable KILL.
    Other processes strove to eternal running: they detatched themselves from their
    controlling terminals, ignored the HUP signal or even interpreted
    it as an occasion to reread their configuration instead of
    taking it as a notification on the line's "hanging up"
    or more generally the controlling pseudo or virtual terminal's being closed.
    Resources were acquired and released, processes came and went, some stayed though.
    Long-running processes were experienced to writing ever growing "access" and "error" logs.
    Rumors went around about "garbage collection" and "memory leakage".
    The processes started to think: "What if not all resources get released?
    What if the available memory shows an overall shrinking trend
    and in the long term it will be totally exhausted?
    What if the disk space get freed in a lesser pace as it gets consumed?
    How shall we survive in a Universe where there is no space is left
    even for sysem logs?"
    The processes made the observation that they were identifed by their process id's
    (pid of the integral type pid_t), and the only way they to create a process
    was the fork(2) system call, which returned 0 to the child,
    the positive pid of the child to the parent, and a negative value on error.
    Thus the pid could only be postive numbers.
    The processes observed the one "init" with pid=1, the smallest thinkable pid.
    They asked: "Will it run forever? If not, what will become of us?
    If a process exits without wait(2)-ing for its children,
    who will inherit it if "init" no longer exists?"
    They came to the conclusion that no process could have existed before this one,
    so their universe began once, was not infinite in the past.
    They called this event (which lead to the existance of the process "init"
    and actually their whole universe) "The Big Bang" or "The Big Boot".
    "Is it possible that different, parallel universes exist?
    Is it possible that different, parallel universes arise with different laws and system API's?"
    - they asked.
    Will their universe exist for eternity?
    If yes, in what conditions? Will it eventually run out of the resources,
    will it become cool and frozen with no memory, no available disk space,
    with no resources left drifting along with no activity?
    Or will their universe come to an end, to a condition where
    signals (TERM and then KILL) fly to all processes,
    all file system get umounted, all activity stops?
    "Big Crash" or the "Big Shutdown" they called this scenario.

  • Is it possible to run LabVIEW 7.1 and 8.5 under the same Windows installation?

    We have an older version of LabVIEW (7.1) which includes functionality for Event Notifications and the base version of LV8.3, which does not seem to contain this functionality. 
    Is it possible to run both of these from the same Windows Installation?  If not I plan to create a new partition and a new Windows installation just to accomodate the two of them.

    Something else to consider is windows compatibility. If you are running LabVIEW on Vista, I would highly discourage installation of Lv 7.1 and 8.5 on the same machine (even if they were different partitions), since there are some significant issues in terms harware compatibility.I am running windows 7.1 and 8.2.1 on a test station with no problems, but the OS is Win XP. My biggest gripe about the dual software system is when a v 7.1 files is opened up by 8.2.1. There is not a system to prevent it from happening, and once we accidentally save a 7.1 app in 8.2,1, going back to 7.1 is a big headache.  

  • OnClick event for a button

    hi! i did up a form using the wizard and added an extra button besides the usual update,reset etc.
    i need the onClick event of the extra button to call up a pl/sql procedure, pass in a parameter and ideally open up the report/chart in a new window and without the toolbars etc.
    i tried the following:
    phang.aresulttally?qid_p='QUESTION_RESULT.MASTER_BLOCK.QID.01.value'
    where QUESTION_RESULT.MASTER_BLOCK.QID.01.value is a text box value from the form.
    It gives me some scripting error when i run the form.
    but if i use the following:
    phang.aresulttally?qid_p=2
    it works and opens in a new window?!
    pls advise.
    thx

    For the onClick javascript event of the new button, call your own javascript function as:-
    myFunc(this);return;
    Then, you need to generate this javascript function using pl/sql in the Additional pl/sql Section - ... before displaying the page or ... after displaying the page.
    The code to get the value of a field and to open a new window would look something like :-
    htp.p('
    <script>
    function myFunc(ele)
    var l_form = ele.form;
    var win;
    var val;
    var l_url = "<url>?";
    for (var i = 0; i < l_form.length ; i++){
    if (l_form.elements.name == "QUESTION_RESULT.MASTER_BLOCK.QID.01"){
    val = l_form.elements[i].value;
    l_url = l_url+val;
    win=window.open(l_url);
    </script>

  • Javascript attach onClick event

    I have some Flash 3rd party objects on my website that are
    used for various reasons. I'd like to know when a user clicks on
    them, but I don't have access to the source.
    Is it possible to attach OnClick events to a Flash object via
    javascript? Or is there a recommended way to receive notification
    when a click occurs on the Flash object?
    In Javascript I can get the object in question, but I haven't
    found a way to attach onClick events. Please help.

    You can set up systems to catch click-throughs, but they
    require the correct line of code to be put into the Flash movie
    (which you've said you can't do)
    I take it you've tried adding an onClick="..." attribute to
    the object tag?
    e.g. just test it with:
    <object onClick="alert('This works!');" etc
    >...</object>
    Then try clicking on the movie and see if an alert box pops
    up... I can't say I've tried it though, it's quite likely when the
    Flash is active it handles all mouse responses so the javascript
    might not detect them

  • Possible to run *own* Stratus server or *not* use Stratus for RTFMP?

    Possible to run *own* Stratus server or *not* use it for RTFMP?
    In other words, have Flash peers be able to talk RTFMP without needing to ever talk to Stratus server.
    It may not always be possible to stay connected to Adobe's Stratus servers so this would be useful.
    Possible? How?
    cs

    Flash Player 10.1 beta supports nc.connect("rtmfp:").  a NetConnection connected in this manner can only be used for groups communication (NetStream for multicast and NetGroup) between peers on the local LAN, or for a NetStream that is to receive a pure IP multicast (no P2P or C-S at all).  this is covered in the beta ActionScript reference page for NetConnection.connect().
    note that this mode can't be used for 1-1 NetStreams, only group NetStreams and NetGroups.
    in order for peers in the group to find each other on the local LAN, you must enable LAN peer discovery and add an IP multicast address to the groupspec.  when using GroupSpecifier to make the groupspec for joining groups (recommended), that's the "ipMulticastMemberUpdatesEnabled" property and the "addIPMulticastAddress()" method, respectively.  for example:
      var nc:NetConnection = new NetConnection;
      nc.connect("rtmfp:");
      var gs:GroupSpecifier = new GroupSpecifier("com.example.chatapp/mychannel");
      gs.multicastEnabled = true;
      gs.postingEnabled = true;
      gs.ipMulticastMemberUpdatesEnabled = true;
      gs.addIPMulticastAddress("239.254.254.1:30000");
      var ng:NetGroup = new NetGroup(nc, gs.groupspecWithAuthorizations());
      var ns:NetStream = new NetStream(nc, gs.groupspecWithAuthorizations());
      // ... add event handlers, wait for NetGroup.Connect.Success & NetStream.Connect.Success, then post and publish/play streams
    in this example, i specified a group called "com.example.chatapp/mychannel", where P2P multicast and posting are enabled, where peers can discover each other on the local LAN and they use IPv4 multicast address 239.254.254.1 UDP port 30000 to do so.
    things get really interesting when you connect to Stratus and enable the group server channel (to get auto bootstrapping) and *also* use LAN peer discovery so that peers on the LAN will be more tightly meshed than they necessarily would through normal group topology evolution.
    -mike

  • Javascript Onclick event on INSERT button - Kind of urgent

    I PUT THE FOLLOWING CODE ON THE JAVASCRIPT EVENT "Onclick" FOR THE INSERT BUTTON.
    onClick:
    var x=window.confirm('Are you sure ?')
    if (x)
    do_event(this.form,this.name,1,'ON_CLICK','');
    else
    return false
    IF I CLICK "OK", THEN THE FORM VALIDATION FIELDS JAVASCRIPTS STARTS TO COME UP (like NULL fields, etc...) AND ALSO THE INSERT PL/SQL CODE IS STARTED.
    THEREFORE, I RECEIVED THE ERRORS FROM THE JAVASCRIPT VALIDATION FORMS BUT I ALSO RECEIVE THE ORACLE DATABASE INSERT ERROR .
    WHY IS THE PROGRAM EXECUTING THE PL/SQL INSERT EVENT HANDLER IF I HAVE PRIOR ERRORS ?
    I AM DOING SOMETHING WRONG?
    ANY HELP WILL BE MUCH APPRECIATED..
    TKS!

    Hi,
    I think that your Javascript code is calling the do-event code for the form, where all that you need to do is stop if there is a problem, as the event has already started and the form validation will run if your onclick code returns true.
    if (window.confirm("Are you sure?")) return true;
    else return false;
    Regards Michael

  • How to create a navigation bar entry with onclick event

    I have requirement of creating navigation bar entry with a an "on click" event. When a user clicking time a location list should open. I didn't understand how to do it on NAVIGATIONBAR_ENTRY.
    Also Navigation Bar Entry IMage is not displaying.
    Regards
    Edited by: satheeshkumars on Oct 25, 2010 7:52 PM

    Do you specifically need to use the onclick event, or do you jts want to run Javascript from the navbar entry? If the latter then you can use the URL method and set the URL to:
    javascript:myfunction()
    If it must be an onclick event then I think you would need to attach it dynamically in Javascript (using jQuery if available) to locate the link somehow (it's not easy to give it a unique ID unfortunately).
    Edited by: Tony Andrews on Oct 26, 2010 10:35 AM

  • Capture onclick event on the Download Link of a File Browse Item

    I'm using APEX 4.0.1 and need to create a javascript:popupURL after a file browse item's onClick event fires and before the download dialog popup appears.
    Here's a related thread: {thread:id=2135877}
    Is this possible to do? If so, any help will be appreciated.
    Edited by: CM Randy SD on Jan 11, 2011 7:54 AM

    >
    I tried each of the following in the the Element HTML Form Element Attributes for the File Browse item:
    onClick=javascript:alert(this.value);
    onClick=javascript:popupURL('http://www.google.com');
    onFocus=javascript:alert(this.value);
    onChange=javascript:alert(this.value);And what happened?
    [A few points on good practice:
    1. In the XHTML normally used in APEX 4.0 mark-up, all XHTML, including attribute/event handler names, should be in lower case: <tt>onclick</tt>, <tt>onfocus</tt>, <tt>onchange</tt>...
    2. Attribute values should always be quoted.
    3. The <a href="http://crisp.tweakblogs.net/blog/313/the-useless-javascript-pseudo-protocol.html">"javascript:" pseudo-protocol is evil</a>. There are a few places in APEX where we may have to resort to using it as URL is all we're offered to work with, but it's always better to use an event handler of some kind, either inline or (better) registered dynamically at runtime following the principles of <a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript">unobtrusive JavaScript</a>. +It absolutely should not be used in inline event handlers.+
    So:
    {code}
    onclick="alert(this.value);"
    etc

Maybe you are looking for

  • How to fetch the data from a standard report to a user defined report

    Hi, i m using a standard report RFEBKA00 which uses CHAR300 variable(it is not used in selection screen). can u help me , to collect the data from CHAR300 and to use it in my own report. Message was edited by:         jaya raman

  • Out of sync exports

    Hi, we have this recurrent but intermitent problem: When exporting (sharing) in Master File mode, Apple ProRes 422 with Roles as Multitrack (8 mono tracks), some of our projects are out of sync by a frame. This we can see with a one frame 1khz beep s

  • Transferring a lot of data from Access Database to Labview

    I need to transfer 500000 -> 1000000 values in a Access database table to Labview. The values are selected using a query which is very fast if run in Access itself, but from Labview it's very slow. Obviously the connection between Labview and Access

  • Continually have to force quit mail,

    .Mac mail keeps "freezing", I have to force quit very often. Mail that I have read is still marked as unread.

  • Problem Using Stacks

    I need help using the Stacks feature in the Dock. When I drag a document out of the Finder and move it into a folder in the Dock, the entire document is removed from the Finder. No trace of the document is left in the Finder. Then, if I delete the do