One Event two actions
Hi,
I would like to know which JavaScript-Code has to be placed where in my document to achieve the following:
When the visitor moves his mouse over (event onmouseover) one of six possible buttons 2 actions should be execited:(defined in container navBar) another image has to be shown for the related button
1. The image for the related button should be changed
2. A particluar swf should start playing automatically (without the need for the visitor to trigger playing by clicking a button or anything else) in a particular div (swfBox).
The swap image action works fine. The necessary JavaScript functions (MM_preloadImages, MM_swapImgRestore, MM_findObj, MM_swapImage) have been generated by dreamweaver CS4..
I'd really would be glad if some crack could help me solving this problem. Maybe SWFObject 2.x is a keyword?
Thank you very much in advance
The swap image behavior is achieved using css:
Normal state
a, a:link {
background-image: url(<link to image here>);
Hover state
a:hover {
background-image: url(<link to image here>);
You can also place the behavior in these items, But I would not recommend having sound playing without giving your users the option to turn it on or off.
PZ
Similar Messages
-
I would like to be able to click on a button one time and
have it open and play a movie. This movie would be overlayed on the
layer that the button is on with the button still visible. Then
after that movie has played, I would like to click on the same
button again to close the movie so that it no longer appears. Can
anyone offer any help on how to do that?:
-
Calendar help: how do I get One event to show up on two calendars
Calendar help: how do I get One event to show up on two calendars? For example I want to enter vacation only once but I wanted to show up on the calendar that I share with my husband and the calendar I have with my assistant.
The signature should show up with each account. Usually the complaint is not having an option for multiple signatures or not being able to have a different signature for each account.
-
Can we perform two actions with one button with two clicks one after other?
Sir,
can we perform two actions with one button with two clicks one after other?
I want that when I click an Add Button first time it add data to the database and when I click again this button it clear the form data to empty fields.
Regards
TanvirIn code it should be easy.
The following code adds a button called butman with a text "ADD".
It then registers a listener that will be called if the button is clicked.
This listener then calls the runAddData method if you clicked on butman while it contained the "ADD" text and it will call the runClearData method otherwise.
Therefore it will swap the button's functionality between ADD and CLEAR on every click.
final Button butman = new Button("ADD");
butman.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
if (butman.getText().equals("ADD")) {
butman.setText("CLEAR");
runAddData();
} else {
butman.setText("ADD");
runClearData();
} // END IF-THEN
}});I hope this is what you wanted.
Some extra food for thought.
You might want to run the ADD and CLEAR methods in their own threads so that it can run in the back ground, without slowing down your user interface.
I also like to rather reuse one button for multiple functionality in stead of making an application with hundreds of nodes only used rarely with masses of code to show and hide them if needed. -
Want to assign one event to two different JSliders
Can somebody explain how to assign one event handler to two different Jsliders?
Jamaal wrote:
I found some code on the Sun example index but it very vague and seems like something is missing. I've been through the Sun JSlider tutorials and examples. I'd call them anything but vague or incomplete; not to be insulting, but it's probable that your understanding of them is as yet incomplete, and you just need to study them some more. If you have specific questions about a part of the tutorial, please ask.
I don't think that the source code even shows how they make the sliders change at the same time.Have you looked at the Converter program source code or run it?
http://java.sun.com/docs/books/tutorial/uiswing/examples/components/index.html#Converter -
I want to use two actions in one form in struts,and without using javascript,is it possible?
I want to use two submit:
one is for adding message;
another is for editing message.
they must be in one form,but i dont know how to use
two actions in one formHi,
Hope this helps.
cheers,
jeric
<html>
<head>
<title>decision</title>
</head>
<body>
<br><br><br>
<center><h3><u>Two submits, one form</u></h3></center>
<%
String userChoice = request.getParameter("decision");
if( userChoice != null && userChoice.equals("add") == true)
// forward to addMessage.jsp, for example, or whatever
else
if( userChoice != null && userChoice.equals("edit") == true)
// forward to EditMessage.jsp, for example, or whatever
out.println( "<br><center> the value of userChoice after selection is ... " + userChoice + "</center><br>");
%>
<center>
<form method="post" action ="decision.jsp"> <!-- name of this page -->
<table width = "50%" align="center">
<tr><td width = "100%"><hr color ="red" ></td></tr>
<tr><td height = "10"></td></tr>
<tr><td align = "center">Do you want to <b>add</b> a message or <b>edit</b> a message?</td></tr>
<tr><td height = "10"></td></tr>
<tr><td align = "center">
<input name = "decision" type = "radio" value = add checked>?add a message??
<input name = "decision" type = "radio" value = edit>?edit a message?
</td></tr>
</table>
<br>
<input type="submit" value = " make your selection " >
</form>
<hr color ="red" width = "50%">
</center>
</body>
</html> -
TreeSelectionListener() - one click two events!
Hi, I am working with a JTree, when I click a leaf node it fires two events and so the code handling the event runs twice (this is not a double click just clicking on the leaf node). Obviously this not what I want and I do not want to have to build a 'memory' into the associated classes as this seems a bit messy. I am still working to resolve this issue for myself and have 'googled it'. If I resolve the issue I will post back but any help gratefully received......
Trevor
The associated code I am using is shown below:
//instantiation of the Tree:
jTreeSubjects = new javax.swing.JTree(rootNode);
jTreeSubjects.setEditable(true);
//setting selection model and attatching the listener:
jTreeSubjects.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
jTreeSubjects.setShowsRootHandles(true);
jTreeSubjects.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
jTreeSubjectsValueChanged(e);
//Handeling the events
private void jTreeSubjectsValueChanged(javax.swing.event.TreeSelectionEvent evt) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) jTreeSubjects.getLastSelectedPathComponent();
if (node == null){
return;
RegionTreeNode nodeInfo = (RegionTreeNode) node.getUserObject();
if (node.isLeaf()){
RegionTreeNode RegionTreeNodeSelected = nodeInfo;
System.err.println(RegionTreeNodeSelected.file.getAbsoluteFile());
} else {
return;
}Just to explain
I added the code shown using the post creation code feature in netbeans, Prior to this I had added a handler for event valuechanged (jTreeSubjectsValueChanged). Hence one component two listners. -
ICal splits one event into two, how do I fix this?
I have one weekly repeating event entered. For the first two weeks it shows up like normal, as one event. But two weeks later it splits that one event into two different side-by-side bubbles. I did not alter the event. Does any one else have this problem? How can I fix this?
That is because you are sharing an Apple ID.
On both phones go to:
Settings > Facetime > turn off iPhone Cellular Calls
I would also suggest you check here to make sure your husbands number is not checked on your phone or yours on his:
Settings > Messages > Send & Receive
Settings > Facetime
Otherwise you will get each others Messages and FaceTime calls.
I recommend that you each get your own Apple IDs if for nothing else than iCloud, iMessage & FaceTime. -
Two input ports to BAPI submit on one event
Hi colleagues!
I'm trying to setup incoming invoice creation in Visual Composer.
I use standard BAPI (BAPI_INCOMINGINVOICE_CREATE).
This BAPI expects one input form (headerdata) and, as far as I understood, one table (itemdata) as mandatory input.
So I put bapi on storyboard, flipped port ITEMDATA from output to input. Created input form from HEADERDATA and input table from ITEMDATA. Also I created output form with Invoice Number.
I created custom event SUBMITPO on both input form and table. Upon that event data, entered into form and table, should be submitted to BAPI, and Invoice should be created.
But when I deploy and run iView, it throws two errors (see Link: [screenshot|http://www.dennisk.org/tmp/inv_screeenshot.jpg]).
I think it's because uppon event two data streams are triggered, and BAPI deals with them independently. How can I avoid that?
More broad question. How to create invoice in VC, preferably using standard function modules?
Here's Link: [model|http://www.dennisk.org/tmp/IncomingInvoiceTest19052008.gml] itself.
Thanks in advance for help and assistance!
Regards,
DKDear dk ,
I think ur question is even u have one mandatory field in ur first screen even u dont fill in mandatory field the data is populating in table at mean time an error is returing from back end right . is ur exact requirement means send me reply we will do this .
or
brief about ur problem
Regards ,
venkat -
Since upgrade to Yosemite my iphoto 6000+ pics are in chaos. 2011 mixed in with 2014 some in blocks, then many just random one or two pics. Event absolutely all over the place, over 5 years. Can anyone help please?
Hello!
See if you can solve this via the View-menu: -
In my Ical i have multiple google calendars, from multiple accounts. I've got one calendar for my girlfriend (a Home account), so she can see my schedule and where i am. That brings a minor problem. In my Ical i have the same event now multiple times (one for my "home" account and one for my other account). So a lot of duplicate events. Is it possible to have one event, but put it into multipleaccounts? Anyone some tips or tricks?
wayne,
Sales order has one credit control area, check VBAK-KKBER
Therefore order should be checked against this CCA.
TW -
Can we link two products to one event in BTE?
Hello friends,
iam working with BTE. in BERE tcode, there is already one event PM000010 which is linked to product ZNOTUPD with one func. modle let us say A
Now i want to link event PM000010 with antoher product ZABC with antoher func.moduel let us say B.
I DID ALL configurations in one client (100)....after this iam doing client copy (SCC1)
but the first customization request has tranported....and second one not transported...
useful reply will be awarded
regards
srikanthHi,
Yes u can link 2 FM's to one event...Even i did it, but at tht time i got a prob..
When i tried to add in FIBF my new FM it was showing some primary key violation..wht i did is i put country key also in the event in 2nd cloumn...
And in ur case u r specifying abt product ..is it refers to application in FIBF transaction..if yes then very well it will get added..if no then u have to go for country key ....
Please try it out and kindly let me know wht's the status
Rewards if useful
Regards,
ABAPer 007 -
How do you pass vi references from one event to another
I have a vi which gets vi references (thereby loading the vi's into memory) for all the vi's in a given directory when a user clicks a button on the front panel. To do this I use an event structure. My question is whether it is possible to have another event (user button on the front panel) which unloads the vi's from memory. I have tried passing the vi references that are initially generated to the close reference function but whenever I do I get a 'vi reference invalid' error. Does this have to do with trying to pass the vi references between one event and another? If I use a local variable simply pass a reference to another indicator and then probe it, the originally-generated refnum and the local vari
able refnum match up. However once I try to wire that same indicator to the close reference function I get the 'vi reference invalid' error. Is there a different/better way to unload the vi's from memory based on a user button click? Any suggestions would be welcome.
Jason
Attachments:
Load_Directory_of_vi's.vi 57 KBSeveral problems with your code:
1... Bad idea to use lights as buttons. Yes it can be done, but it's not "natural".
2... If you've gotta do that, set their mechanical action to "LATCH WHEN RELEASED"
3... Because of #2, you are getting TWO copies of every array when you click the LOAD VIs light (er... button).
4... No need for the conversion from path to string and back - use BUILD PATH to append each file name to he folder path.
5... Set the BROWSE OPTIONS on your PATH control to EXISTING DIRECTORY to allow browsing of directories, not files.
6... Your code doesn't care whether the file is a .VI file, or a .ZIP file, or a .TXT file, or what. Use the PATTERN input on the LIST function to discriminate.
7... Your code is only storing the latest refer
ence, not the array of references.
8... An ERROR DIALOG on the OPEN REFERENCE function will tell you that you're getting an error. Why? You are asking to prepare a non-reentrant VI for reentrant execution (why use options = 8?)
9... Because of #8, the latest VI reference is invalid.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks -
Can a Method listen to more than one event in ABAP OO ?
Hi,
is it possible to prepare/register a handler method for e.g two events of two different classes ?
Or can a method generally listen to only one event ?
It seems that the syntax allows only one event ?
methods event_handler for event my_event of my_class.
Thanks for help in advance
OlafAn event can refer to more than one object but you have to instantiate the objects
for example I have 2 grids and want to handle events depending on which grid
the user is selecting / requesting actions on. (I've just posted the relevant bits coded here as data extraction etc you can code normally).
FORM instantiate_grid
* Create Grid container
* Instantiate Grid class
* Instantiate Event Handler class
* Display the Grid
USING grid_container TYPE REF TO cl_gui_custom_container
class_object TYPE REF TO cl_gui_alv_grid
container_name TYPE scrfname.
* create the container
CREATE OBJECT grid_container
EXPORTING container_name = container_name.
* Create the ALV grid object using
* container just created
CREATE OBJECT class_object
EXPORTING
i_parent = grid_container.
* Exclude the SUM function from the GRID toolbar
ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
APPEND ls_exclude TO lt_exclude.
* Instantiate our handler class
* lcl_event_handler
CALL METHOD class_object->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
CREATE OBJECT g_handler.
SET HANDLER g_handler->handle_double_click FOR class_object.
SET HANDLER g_handler->handle_hotspot_click FOR class_object.
SET HANDLER g_handler->handle_toolbar FOR class_object.
SET HANDLER g_handler->handle_user_command FOR class_object.
SET HANDLER g_handler->handle_data_changed FOR class_object.
SET HANDLER g_handler->handle_data_changed_finished FOR class_object.
ENDFORM. "instantiate_grid
MODULE status_0100 OUTPUT.
IF grid_container IS INITIAL.
PERFORM instantiate_grid
USING grid_container
grid1
'CCONTAINER1'.
* Grid title Primary Grid
struct_grid_lset-grid_title = 'Delimit Old org Units - Selection'.
struct_grid_lset-edit = 'X'.
struct_grid_lset-sel_mode = 'D'.
PERFORM display_grid
USING
grid1
<dyn_table>
it_fldcat.
ENDIF.
SET PF-STATUS '001'.
SET TITLEBAR '000' WITH 'Delimit Old Org Units'.
ENDMODULE. "status_0100 OUTPUT
* PAI module
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANC'.
LEAVE PROGRAM.
WHEN 'RETURN'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. "user_command_0100 INPUT
MODULE status_0200 OUTPUT.
IF grid_container1 IS INITIAL.
PERFORM instantiate_grid
USING grid_container1
grid2
'CCONTAINER2'.
* Grid title secondary grid
struct_grid_lset-grid_title = 'Delimited Objects'.
struct_grid_lset-edit = ' '.
PERFORM display_grid
USING
grid2
<dyn_table1>
it_fldcat1.
SET PF-STATUS '001'.
SET TITLEBAR '000' WITH 'Org Units Delimited'.
endif.
ENDMODULE. "status_0200 OUTPUT
In your local event handling class use the variable SENDER to determine which grid / object triggered the event
for example
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id es_row_no,
**Double Click Handler
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column es_row_no
sender,
** Toolbar handler.
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive
sender,
* button press
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm
sender,
* data changed
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed,
*data changed finished
handle_data_changed_finished
FOR EVENT data_changed OF cl_gui_alv_grid,
download_to_excel.
ENDCLASS. "lcl_event_handler DEFINITION
* Implementation methods for lcl_event_handler
CLASS lcl_event_handler IMPLEMENTATION.
*Handle Hotspot Click
* When a "hotspotted"cell is double clicked
* Hotspot indicatore needs to be set in
* the field catalog.
* Not required for this application.
METHOD handle_hotspot_click .
PERFORM mouse_click
USING e_row_id
e_column_id.
CALL METHOD grid1->get_current_cell
IMPORTING
e_row = ls_row
e_value = ls_value
e_col = ls_col
es_row_id = ls_row_id
es_col_id = ls_col_id
es_row_no = es_row_no.
CALL METHOD grid1->refresh_table_display.
CALL METHOD grid1->set_current_cell_via_id
EXPORTING
is_column_id = e_column_id
is_row_no = es_row_no.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD handle_double_click.
CASE sender.
WHEN grid1.
* returns cell double clicked FROM GRID 1
* Ignore any event from GRID 2
PERFORM double_click
USING e_row
e_column.
ENDCASE.
ENDMETHOD. "handle_double_click
* Add our buttons to standard toolbar
METHOD handle_toolbar.
CASE sender.
* Only add functionality to PRIMARY GRID (GRID 1)
WHEN grid1.
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
* Delimit Org
CLEAR ls_toolbar.
MOVE 'PROC' TO ls_toolbar-function.
MOVE icon_railway TO ls_toolbar-icon.
MOVE 'DELIMIT' TO ls_toolbar-quickinfo.
MOVE 'DELIMIT ORG UNIT' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
* Select All Rows
MOVE 'SELE' TO ls_toolbar-function.
MOVE icon_select_all TO ls_toolbar-icon.
MOVE 'ALL CELLS' TO ls_toolbar-quickinfo.
MOVE 'ALL CELLS' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
* Deselect all Rows.
MOVE 'DSEL' TO ls_toolbar-function.
MOVE icon_deselect_all TO ls_toolbar-icon.
MOVE 'DESELECT ALL' TO ls_toolbar-quickinfo.
MOVE 'DESELECT ALL' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDCASE.
move 0 to ls_toolbar-butn_type.
move 'EXCEL' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move icon_xxl to ls_toolbar-icon.
move 'Excel' to ls_toolbar-quickinfo.
move 'EXCEL' to ls_toolbar-text.
append ls_toolbar to e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
METHOD handle_user_command.
* Entered when a user presses a Grid toolbar
* standard toolbar functions processed
* normally
g_sender = sender.
CASE e_ucomm.
WHEN 'PROC'. "Process selected data
PERFORM get_selected_rows.
WHEN 'SELE'.
PERFORM select_all_rows.
WHEN 'DSEL'.
PERFORM deselect_all_rows.
WHEN 'EXCEL'.
call method me->download_to_excel.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "handle_user_command
METHOD handle_data_changed.
* only entered on data change Not req for ths app.
PERFORM data_changed USING er_data_changed.
ENDMETHOD. "data_changed
METHOD handle_data_changed_finished.
* only entered on data change finished Not req for ths app.
PERFORM data_changed_finished.
ENDMETHOD. "data_changed_finished
* Interactive download to excel
method download_to_excel.
field-symbols:
<qs0> type standard table,
<qs1> type standard table.
data: G_OUTTAB1 type ref to data,
g_fldcat1 type ref to data,
LS_LAYOUT type KKBLO_LAYOUT,
LT_FIELDCAT type KKBLO_T_FIELDCAT,
LT_FIELDCAT_WA type KKBLO_FIELDCAT,
L_TABNAME type SLIS_TABNAME.
case g_sender.
when grid1.
get reference of <dyn_table> into g_outtab1.
get reference of it_fldcat into g_fldcat1.
when grid2.
get reference of <dyn_table1> into g_outtab1.
get reference of it_fldcat1 into g_fldcat1.
endcase.
assign g_outtab1->* to <qs0>.
assign g_fldcat1->* to <qs1>.
call function 'LVC_TRANSFER_TO_KKBLO'
exporting
it_fieldcat_lvc = <qs1>
* is_layout_lvc = m_cl_variant->ms_layout
is_tech_complete = ' '
importing
es_layout_kkblo = ls_layout
et_fieldcat_kkblo = lt_fieldcat.
loop at lt_fieldcat into lt_fieldcat_wa.
clear lt_fieldcat_wa-tech_complete.
if lt_fieldcat_wa-tabname is initial.
lt_fieldcat_wa-tabname = '1'.
modify lt_fieldcat from lt_fieldcat_wa.
endif.
l_tabname = lt_fieldcat_wa-tabname.
endloop.
call function 'ALV_XXL_CALL'
exporting
i_tabname = l_tabname
is_layout = ls_layout
it_fieldcat = lt_fieldcat
i_title = sy-title
tables
it_outtab = <qs0>
exceptions
fatal_error = 1
no_display_possible = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type 'S' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endmethod.
ENDCLASS. "lcl_event_handler IMPLEMENTATION
The sender instance is a variable such as g_sender type ref to cl_gui_alv_grid. "Sender instance.
The above example is for OO ALV grids but should work for other interactive cases where a User presses a key or does a mouse action.
Cheers
jimbo -
How do I set up multiple alerts for one event?
So, I'm currently using MS Exchange to sync my google calendar with my iphone5, and almost everything's working pretty nicely, events would get pushed to my phone right away as I put it on my computer. But the thing is, my phone will only alert me for the earliest alert if I had multiple alerts set up for one event on google calendar. How can I fix it? Any advice would be appreciated!
I have a similar issue with a slight twist.
I have 'My Card' setup properly, however, I do have 5 email addresses that I use and these are listed on 'My Card'. When I select the option to add an email alert on a calendar event, the app is picking up two addresses from the set of 5 and makes me pick one.
I would like to select one of the other addresses to be the default for sending out the alerts. Is there a way to do that. If it is helpful, the app is picking up 2 of the 'Work' email addresses. I don't know if the home vs work designation would make a difference.
Note: I am looking for a solution to pick one a specific address from the contact card to send out the alert email. I am NOT looking to have a discussion as to why I have 5 addresses.
Thanks
Maybe you are looking for
-
Resetting of FI document number during the same year
Hi, Our permit for a computerized books of accounts using SAP has been issued by our Tax agency effective March 01, 2009. Relative to this, we need to reset FI document number effective March 01, 2009. Our problem is we already used up document numb
-
My computer is a Windows Vista and I have the iPhone 4. And before anyone says "Restart your computer, reinstall all Apple products like iTunes blah blah" yes I have already done these at least 5 times. I am looking for an actual solution. Ok so I to
-
Further to my previous problem with my TV player not playing a PE9 made BD disk, I examined the disk with Imgburm and it reports that the disk status is 'incomplete'. The M2ts file plays through to the last fadeout on my computer and in a Panasonic T
-
To my knowledge this feature does not exist. That being said, here's what I want. I want the ability to print photos using Bridge, whereas currently, I have to open either Photoshop, Illustrator, or whatever to print. It shouldn't be that hard to int
-
I am trying to connect my Canon MG5220 and its not connecting to my macbook running lion?
i am trying to connect my Canon MG5220 and its not connect to my macbook running lion? i updated the drivers to 10.7 lion and i reconnected the printer to my wifi which both devices are connected to. when reinstalling the drivers, it will not connect