Refresh Applet On Button Click
Hello everyone, I wanted to know what would be the easiest way to "reload" an Applet on a button click. I have a reset button in an actionPerformed method and I wanted to just run the constructor again for the applet if the reset button was pressed, or anther method. How can I run anther actionPerformed from within an actionPerformed?
Sorry a bit confused about this.
If your applet is named "MyApplet" (via the <applet name=....> tag), from within Javascript, you can call
document.MyApplet.init() ;
Similar Messages
-
Problem in refreshing JTree inside Jscrollpane on Button click
hi sir,
i have problem in refreshing JTree on Button click inside JscrollPane
Actually I am removing scrollPane from panel and then again creating tree inside scrollpane and adding it to Jpanel but the tree is not shown inside scrollpane. here is the dummy code.
please help me.
import javax.swing.*;
import java.awt.*;
import javax.swing.tree.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class Test
public static void main(String[] args)
JFrame jf=new TestTreeRefresh();
jf.addWindowListener( new
WindowAdapter()
public void windowClosing(WindowEvent e )
System.exit(0);
jf.setVisible(true);
class TestTreeRefresh extends JFrame
DefaultMutableTreeNode top;
JTree tree;
JScrollPane treeView;
JPanel jp=new JPanel();
JButton jb= new JButton("Refresh");
TestTreeRefresh()
setTitle("TestTree");
setSize(500,500);
getContentPane().setLayout(null);
jp.setBounds(new Rectangle(1,1,490,490));
jp.setLayout(null);
top =new DefaultMutableTreeNode("The Java Series");
createNodes(top);
tree = new JTree(top);
treeView = new JScrollPane(tree);
treeView.setBounds(new Rectangle(50,50,200,200));
jb.setBounds(new Rectangle(50,300,100,50));
jb.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
jp.remove(treeView);
top =new DefaultMutableTreeNode("The Java ");
createNodes(top);
tree = new JTree(top);
treeView = new JScrollPane(tree);
treeView.setBounds(new Rectangle(50,50,200,200));
jp.add(treeView);
jp.repaint();
jp.add(jb);
jp.add(treeView);
getContentPane().add(jp);
private void createNodes(DefaultMutableTreeNode top) {
DefaultMutableTreeNode category = null;
DefaultMutableTreeNode book = null;
category = new DefaultMutableTreeNode("Books for Java Programmers");
top.add(category);
book = new DefaultMutableTreeNode("The Java Tutorial: A Short Course on the Basics");
category.add(book);
book = new DefaultMutableTreeNode("The Java Tutorial Continued: The Rest of the JDK");
category.add(book);
book = new DefaultMutableTreeNode("The JFC Swing Tutorial: A Guide to Constructing GUIs");
category.add(book);
book = new DefaultMutableTreeNode("Effective Java Programming Language Guide");
category.add(book);
book = new DefaultMutableTreeNode("The Java Programming Language");
category.add(book);
book = new DefaultMutableTreeNode("The Java Developers Almanac");
category.add(book);
category = new DefaultMutableTreeNode("Books for Java Implementers");
top.add(category);
book = new DefaultMutableTreeNode("The Java Virtual Machine Specification");
category.add(book);
book = new DefaultMutableTreeNode("The Java Language Specification");
category.add(book);
}hi sir ,
thaks for u'r suggession.Its working fine but the
properties of the previous tree were not working
after setModel() property .like action at leaf node
is not working,I'm sorry but I don't understand. I think you are saying that the problem is solved but I can read it to mean that you still have a problem.
If you still have a problem then please post some code (using the [code] tags of course). -
Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh
I have developed a Visual Webpart to create a list in SP using vs2010 and the button click event I have written the list create method. If I click the button list is created successfully. And I refresh the page again list is creating(Again button
click event is triggering).please help me to solve the issue.
protected void Button1_Click(object sender,
EventArgs e)
SPWeb web
= SPContext.Current.Web;
//SPList list=web.Lists["Auto"];
SPList list
= web.Lists[DropDownList2.SelectedItem.Text];
if
(string.IsNullOrEmpty(TextBox1.Text)
|| string.IsNullOrEmpty(DropDownList1.Text))
Label4.Text =
"Fields Are Empty";
else
if (DropDownList1.SelectedItem.Text
== "Single line of Text")
list.Fields.Add(TextBox1.Text,
SPFieldType.Text,
true);
SPView viewname = list.Views["All Items"];
viewname.ViewFields.Add(TextBox1.Text);
//viewname.Update();
list.Update();
Label4.Text =
"Field Created Successfully";
TextBox1.Text =
string.Empty;
// Label4.Text = string.Empty;Hi,
This is because the request is sent to the server when you refresh the page.
A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
redirect to the page after that, with Response.Redirect)
so that page is requested by the browser (with GET method, default with hyperlinks)”.
More information:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
Thanks
Patrick Liang
TechNet Community Support -
Prevent an 'iframe' in a JSF page to refresh when a button is clicked
I have a JSF Page. On this page I have a
1)Iframe that ponts to another JSF page that contains a JSF tree
2)A button named 'ADD'
3)A listbox
When I select a node in the tree it gets stored in the session and when I click the ADD button the selected value is populated into the listbox.
Building the tree is a very costly(time consuming) operation. So whenever I click the ADD button it's action event in the backing bean runs and populates the listbox with the selected value.
The problem whenever the I click the ADD button a postback happens and so the whole page is reloaded including the iframe and the tree with in the firame. How can I prevent the tree in the iframe refreshing each time I click the ADD button.
Any workarounds/ help greatly appreciated.
Thanks.
-Rolla
Message was edited by:
RollaTomasiI do't think Virtual forms solve this problem as clicking anything(firing action events) on the main page would force the page and all the componets to refresh and the as the ui:iframe points to another JSF page on which the tree is; that page is also being refreshed .
I also have added logic in the init method of the second page inwhich the tree is tocheck for postbacks. But I observed that :
A postback on the main page is not a post back to the second page
Thanks for your reply. -
Is there method to refresh applet?
I was wondering if theres a method to refresh an applet or refresh a panel in an applet. My problem is that at the click of a button i set a new content panel, but it appears as if nothing has happened, and i need to minimize and then restore the applet viewer and it changes.
do you want to refresh component like button, label etc
like
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class applet_component_refresh extends Applet implements ActionListener {
Button[] button;
Button changeButton;
String[] buttonString= {"Normal Text ", "Changed Text"};
int number = 260;
int count;
public void init()
setBackground(new Color(225,225, 255));
button = new Button[number];
for (int i=0; i<number; i++)
button[i] = new Button(buttonString[count%2]);
add(button);
changeButton = new Button("Change buttons label");
changeButton.setBackground(new Color(150, 255, 150));
add(changeButton);
changeButton.addActionListener(this);
public void actionPerformed(ActionEvent ae)
if (ae.getSource() == changeButton)
count++;
for (int i=0; i<number; i++) button[i].setLabel(buttonString[count%2]);
invalidate();
validate();
} // END OF Class component_refresh
you cant use location.reload method of javascript to do this.... -
How do you fire a button click event on apex page from fancybox iframe that was created by page
I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
A couple of points:
I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
The click dynamic action on the button is calling the plugin to replace the html in the div.
The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
Can anyone help. Here is the fancybox code:
function customProcessOnReadyState4(){
for (var i=0;i<11;i++){
$( "#tabs"+i ).tabs();
$("#createNewExerciseLink"+i).fancybox({
''width'' : ''60%'',
''height'' : ''70%'',
''autoScale'' : true,
''transitionIn'' : 200,
''transitionOut'' : 200,
''type'' : ''iframe'',
''onClosed'' : function() {
window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
Here are the dynamic actions assigned to the button:
5 - Execute JavaScript Code
alert("Starting refresh");
10 - Execute PL/SQL Code and Return Content [Plug-in]
begin
SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
end;user setActionListener...
<af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
<af:inputText value="#{bindings.Email.inputValue}"
label="#{bindings.Email.hints.label}"
binding="#{backingBeanScope.backing_ShuttlePage.it2}"
id="it2">
<f:validator binding="#{bindings.Email.validator}"/>
</af:inputText>
<af:commandButton text="commandButton 2"
binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
id="cb2" action="passing">
<af:setActionListener from="#{bindings.Email.inputValue}"
to="#{processScope.detail}"/>
</af:commandButton>next jsf page:
<af:outputText value="#{processScope.detail}"
binding="#{backingBeanScope.backing_ProcessScope.ot1}"
id="ot1"/>setPropertyListener also should work
<af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/> -
Opening new window on button click from pdf without loosing session
Hi,
In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
For opening new window from pdf button click we are using
var dynamicUrl3 = myappurl;
app.launchURL(dynamicUrl, true);
How can i open new window with the same sesion from the pdf button.
Please help for the same.
Thanks,
Abhijit Mohite.Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
Its working fine now without JavaScript.
Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
Is this possible? Please give me an idea to do this.
Thanks. -
ALV: Right Button Click and Context Menu
Hi Experts,
I have to implement an ALV which should act on a right button click and show a context menu.
Is this possible? I found only events for "on_double_click" or "on_link_click" and is it possible to show a context menu?
Thanks in advanced.
Best regards,
MarkusHello Markus
The relevant events are:
CONTEXT_MENU_REQUEST
USER_COMMAND
Have a look at my sample report ZUS_SDN_ALV_CONTEXT_MENU_1.
*& Report ZUS_SDN_ALV_CONTEXT_MENU_1
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="910750"></a>
*& Thread: ALV: Right Button Click and Context Menu
*& Flow logic of screen 100 (no screen elements; ok_code = GD_OKCODE)
*& PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*& PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
REPORT zus_sdn_alv_context_menu_1.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender,
handle_context_menu_request FOR EVENT context_menu_request
OF cl_gui_alv_grid
IMPORTING
e_object
sender,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
ENDMETHOD. "handle_double_click
METHOD handle_context_menu_request.
* define local data
DATA: lt_fcodes TYPE ui_funcattr,
ls_fcode TYPE uiattentry,
ls_func TYPE ui_func,
lt_func TYPE ui_functions.
" Inactivate all standard functions
CALL METHOD e_object->get_functions
IMPORTING
fcodes = lt_fcodes.
LOOP AT lt_fcodes INTO ls_fcode.
ls_func = ls_fcode-fcode.
APPEND ls_func TO lt_func.
ENDLOOP.
e_object->disable_functions( lt_func ).
" Add new functions
e_object->add_separator( ).
CALL METHOD e_object->add_function
EXPORTING
fcode = 'XD03'
text = 'Call Transaction'.
CALL METHOD e_object->add_function
EXPORTING
fcode = 'DETAILS'
text = 'Display Details'.
ENDMETHOD. "handle_context_menu_request
METHOD handle_user_command.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_row TYPE lvc_s_row,
ls_col TYPE lvc_s_col.
" NOTE: in case of CL_GUI_ALV_GRID the functions of a context menu
" are handled in method USER_COMMAND.
CHECK ( e_ucomm = 'XD03' OR
e_ucomm = 'DETAILS' ).
CALL METHOD sender->get_current_cell
IMPORTING
es_row_id = ls_row
es_col_id = ls_col.
CASE e_ucomm.
WHEN 'XD03'.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ls_row-index.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'DETAILS'.
" NOTE: only for the sake of simplicity the event handler method
" is called
CALL METHOD lcl_eventhandler=>handle_double_click
EXPORTING
e_row = ls_row
sender = go_grid1.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "handle_user_command
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = '1000'.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid1,
lcl_eventhandler=>handle_context_menu_request FOR go_grid1,
lcl_eventhandler=>handle_user_command FOR go_grid1.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
is_layout = gs_layout
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
PERFORM entry_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM knvv INTO TABLE gt_knvv
WHERE kunnr = ls_knb1-kunnr.
ENDFORM. " ENTRY_SHOW_DETAILS
Regards
Uwe -
Disable button on button click to prevent multiple inserts!!
Hi everyone, ok here is the situation.
I have a Submit button (HTML Button) on page 2. When user clicks this button, I have a branch to page 10. In my branch, I set the value of items on page 10. On page 10, I have an "On Load" process that runs some insert statements.
Everything works fine, but I have just realized that if user clicks the "Submit" button more than once (for example 5 times), the insert statement in the "page load" proces in page 10 happens 5 times. This is very bad. I cannot allow that. I would probably have to disable the button?? how can I do that??
Please note that I have not created this button using HTML in html header, I have created this button using the wizard.
I have looked at some threads but I have been unable to find a slution,
I will appreciate your suggestions
ThanksHave your button URL point to javascript:submitanddisable(this); and then use the following code:
<script type="text/javascript">
function submitanddisable(b) {
b.disabled=true;
doSubmit();
</script>If you disable the button and submit the page, the page should refresh and the button will not be disabled anymore. You can obviously pass in a value to your custom script to use as the request parameter in doSubmit(). -
Trigger ics:catalogmanager on button click
Is it possible to render/execute ics:CatalogManager on button click function using JavaScript?
Currently on click we call Cs-element in which we execute ics:catalogmanager tag, But this on run-time causes the entire page to refresh. Which we don't want it to be like.
Kindly provide the solution a.s.a.p.Kinjal,
Instead of posting/submitting to the CSElement, calll the CSElement using Ajax call. -
Performance Point Service Filter Reset on button click?
Hi.
Is it possible to reset the PPS filter on button click (Common "Reset" button).
Is it possible to do by using Javascript?
I need some work around to achieve it.
Thanks & Regards
Poomani SankaranHi,
According to your post, my understanding is that you want to reset Performance Point Service Filter on button click.
You can follow the article
SharePoint Dashboard with Common Filters using PerformancePoint Services 2010 to create a dashboard with common filters using SharePoint PerformacePoint services 2010 and SQL Server Analysis Services (SSAS) Data Source.
Then you will see the filters on top of your dashboard. You can change the filters and see that both the reports are rendering the data as per your filter choice.
If you'd like to default the filter to a particular value on page load, you might want to try a JavaScript based approach:
Define the function 'NotifyBrowserOfAsyncUpdate(elem)', which PPS will call after any PPS render request completes (i.e., when your filter renders).
Within the function, check that elem.control exists and then check that elem.control.webPartTitle equals your filter's title.
If it does, search elem (the filter web part's main container DIV) for the actual filter control and change the value. If you're using a dropdown, this is pretty simple - just remember to call the 'onchange' method on the select as well so that connected
PPS objects refresh.
Here is a similar thread for your reference:
http://sharepoint.stackexchange.com/questions/61939/default-pps-filter-for-pps-dashboard-in-sharepoint-2010-not-showing
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Option button click on IE is not working
I am trying to play around with Excel VBA code to select an option button on a webpage. For some reason the option button is not getting selected even though there is no errors when executing the code. Please share your thoughts.
Excel VBA code block given below.
Sub Voting()
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
Dim x As Object
MyURL = "https://www.surveymonkey.com/r/?sm=%2bZAmxFYpsYG1R61ELcYA6g%3d%3d"
Set MyBrowser = New InternetExplorer
With MyBrowser
.Silent = True
.navigate MyURL
.Visible = True
Do
Loop Until .readyState = READYSTATE_COMPLETE
Do Until Not x Is Nothing
Set x = .document.getElementById("ID of one of the option button")
Loop
Set x = Nothing
.document.getElementById("ID of one of the option button").Click
Set HTMLDoc = .document
For Each MyHTML_Element In HTMLDoc.getElementsByTagName("button")
If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For
Next
Set HTMLDoc = Nothing
End With
MyBrowser.Quit
Set MyBrowser = Nothing
End SubYou must not be hitting the button. Please see this example.
http://vbadud.blogspot.com/2009/08/how-to-login-to-website-using-vba.html
Also, to dump everything from the site to Excel, try this.
Sub DumpData()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "http://finance.yahoo.com/q?s=sbux&ql=1"
'Wait for site to fully load
IE.Navigate2 URL
Do While IE.Busy = True
DoEvents
Loop
RowCount = 1
With Sheets("Sheet1")
.Cells.ClearContents
RowCount = 1
For Each itm In IE.document.all
.Range("A" & RowCount) = itm.tagname
.Range("B" & RowCount) = itm.ID
.Range("C" & RowCount) = itm.classname
.Range("D" & RowCount) = Left(itm.innertext, 1024)
RowCount = RowCount + 1
Next itm
End With
End Sub
Joel, who frequents these forums, gave me that a long time ago. It's server me well for many projects.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
How to capture Button Click in OAF
Hi All,
I have created a button "TestButton" using personalization. On the click of this button, a new page "TestPG" opens. But i have to pass a few parameters from the old page to the new page. How do i capture this button click event in the CO so that i can use the pageContext.forwardImmediately method to pass the parameters?
Also, what is the difference between a Button and a SubmitButton?
Regards,
ShreyasI never tried this... But can suggest you something.....
Create a Upload type of item in your region, which will allow you to browse your Image file.
Attach a VO attribute which will be based on EO. VO attibute will be based on Databse column of BLOB type, which will store the image in DB.
If you want to transfer this file to application server's any directory, you can do that also.
But above is solution to your problem.. -
How to redirect to home page on "Cancel" button click
Hi,
I have created a web part for office 365 developed using sandbox solution on Sharepoint foundation 2013.
On "Cancel" button click i want to redirect user to another page(Home page) using C# only.
i used some methods like
Context.Response.Redirect(SPContext.Current.Web.Url.ToString() + "/Home.aspx");
but its not working. No methods which includes context or HttpContext is not working.
Please, tell me how can i redirect user to site home page.Hi,
you can try this
var button
= new Button();
button.Attributes.Add("OnClick"
, "javascript:{window.location='your
page url';return
false;}");
this.Controls.Add(button);
Hope it helps!
Avni Bhatt -
Programmatically Open and close panel accordion on button click
Hi All,
Im using JDev 11.1.1.4 and adf faces application.
My requirement is to open/close panel accordion on button click programmatically.Kindly have a look at below figured one
Panel accordion Open Button
| ShowDetail1 //Consider first one is open inside close button is there to close this pane..
|
|
|
Close Button
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Show detail2 open button
Show details3 open button
Any idea...
Thanks,Thanks Mr.frank...
But disclosed property is to make the showdetail to disclose or not.. but requirement is to open panel accordion on button click
By default using panel accordion have arrow icon in left to open in a same way if i open the second one, first will get close automatically...
Actually is there any way to do the default process (open/close) programmatically...
Maybe you are looking for
-
How can I import my old Itunes folder into a new PC.
My PC crashed but my Itunes library (all music, playlists apps) was saved since I keep the itunes folder on a external Hard drive. My question is how can i put it back on the new PS where I already installed the Itunes. I thought I only had to tell t
-
Hi, just recently when I attemted synced my ipod touch 5th generation, i got a message saying "Itunes could not load data from sync services reconnect or try again later I am running the latest version on itunes (not quiet sure which specific one) I
-
PDF's in Mail and Preview not displaying correctly
Ever since upgrading to Yosemite PDF's are not displaying correctly. Every time i generate a PDF of a sales quote it seems to lose a lot of information. But the strange thing is..... Preview and Mail both show PDF with missing text. When I open using
-
Open PDF Adobe form from workitem in UWL
Hi, We have a requirement in which a workitem is gettng generated from workflows, And it comes in UWL, So when we execute that workitem it should open a adobe form for notificaton so that approver can reject or approve that notificaton in PDF, But it
-
Portlet Discoverer List of Worksheets OAS 10.1.2 ???
Hi! After we upgreded OAS 9..0.4 to 10.1.2 Portlet "Discoverer List of Worksheets" did't work. On page portal make "Edit defaults" for portlet.. On first step "Database connect" is successfully. Next step show "Discoverer List of Worksheets", but I c