w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Navigate to page and click a button
You need to run c:program filesMicrosoftInternet Exploreriexplore.exe or whatever your browser path is and then pass the URL as an argument into the process.start function. For example Process.Start("IEXPLORE.EXE", "http://www.yandex.ru/");

Categories : C#

xaml: navigate external link in button click
NavigationService.Navigate, on Windows Phone, is used to navigate to another XAML page not a remote URI. If you want to launch the WebBrowser, you can either have a WebBrowser control or use the WebBrowserTask. private void like(object sender, EventArgs e) { WebBrowserTask wbt = new WebBrowserTask(); wbt.Uri = new Uri("http://m.facebook.com/myprofile", UriKind.Absolute); wbt.Show(); } (The UriKind should be Absolute in this case).

Categories : C#

Click a button and navigate inside an iframe of different browser
Wikipedia: Same origin policy: is an important security concept for a number of browser-side programming languages, such as JavaScript. The policy permits scripts running on pages originating from the same site – a combination of scheme, hostname, and port number – to access each other's methods and properties with no specific restrictions, but prevents access to most methods and properties across pages on different sites. Wikipedia: Cross-origin resource sharing (CORS) is a mechanism that allows Javascript on a web page to make XMLHttpRequests to another domain, not the domain the Javascript originated from. To allow cors requests, the shared content server must allow it through a combination of headers : Client (www.example.com) : ORIGIN: www.example.com Server (not www.example

Categories : Javascript

How to make panels to navigate left and right on click of button in Sencha ExtJs
I was just building a similar project, so here's an example snippet you could use. Notice that you can change the amount and order of panels and the code will still work. The click handler simply looks for the visible panel first, and then depending on the direction attempts to either go forward or backward. Ext.define('MyApp.view.MyViewport1', { extend: 'Ext.container.Viewport', id: 'switchPanels', initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'panel', height: 100, html: 'this is panel 1', title: 'My Panel A' }, { xtype: 'panel', height: 100,

Categories : Extjs

Navigate to Button Click Event in Lens Application for Windows Phone 8
you can add a parameter to the ViewfinderLaunch uri: return new Uri("/Views/MainPage.xaml?Viewfinder=1", UriKind.Relative); Next you have to override the "OnNavigatedTo" method of your MainPage to check if Viewfinder parameter is setted: if (NavigationContext.QueryString.ContainsKey("Viewfinder")) { newButton_Click(null, null); }

Categories : C#

Implementing Navigate Back and Navigate Forward button functionality for a WinForm TreeView control
Just an example. Not sure if that's what you need. Of course you can start on node 1 as well. You can also insert the new values at particular positions in the array and move other values up the array. static void Main(string[] args) { string[] myValues = new[] { "1", "2", "3", "4" }; Stack back = new Stack(); Stack forward = new Stack(); int maxPos = myValues.Length - 1; int minPos = 0; int currPos = myValues.Length - 1; Console.WriteLine("Initial Navigation Values {0}", string.Join(",", myValues)); Console.WriteLine("User <- or -> keys to navigate between the values"); Console.WriteLine("You are on Node 4"); var key = Console.ReadKey().Key; wh

Categories : C#

Click same button to refresh current page and navigate to a new page
You can use the following In the script <script> function clickEvent(){ refresh(); navigate to home(); } </script> in html <input type="button" value="Dont show this again! " onClick="clickEvent();" />

Categories : Javascript

Go to another viewcontroller after click on a pin mapkit
yes try the below example code. here i used to differentiate annotation (pin) with their titles. and used map view delegate methods - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { NSLog(@"accessory button tapped for annotation %@", [view.annotation title]); if([[view.annotation title] isEqualToString:@"one"]) { // Push to another view controller code here } }  

Categories : IOS

Show menu when i click on button and hide that when i click anywhere on the page or button
This has partly to do with something called event propagation. Put simply, this means that click events will register not only on the clicked element, but also on any parent or ancestor elements of that element. So if you click a DIV, the event will also be registered on the BODY, because the DIV is inside the BODY. Put abstractly, if a kitchen is the scene of a crime, then the apartment that houses that kitchen is also the scene of a crime. One is inside the other. This is prevented by preventing propagation - in jQuery, by running the stopPropagation() method of the evt object that is automatically passed to your event handler. In any case, your situation can be greatly simplified. var menu = $('#menu'), but = $('#menu_button'); $(document).on('click', '*', function(evt) { evt.st

Categories : Javascript

I want to navigate to a div using a button HTML
An onclick attribute should contain JavaScript, not a URL. However, since you are linking somewhere: use a link. You can apply CSS to make it look however you want. <a href="#navigateHere">Reply</a>

Categories : PHP

Using Python's Requests library to navigate webpages / Click buttons
The only solution to this I have found is Selenium. If it werent a javascript heavy website you could try mechanize but for this you need to render the javascript and then inject javascript...like Selenium does. Upside: You can record actions in Firefox (using selenium) then export those actions to python. The downside is that this code has to open a browser window to run.

Categories : Python

Backbone js after click event and navigate to new adress view is not changed
You forgot to pass trigger option: app.navigate("table/" + tableId + "/menus", true); // or app.navigate("table/" + tableId + "/menus", {trigger:true}); Of course if your app is an instance of Backbone.Router :)

Categories : Backbone Js

Collapse navbar on navigate (link click) in mobile mode
I have done like this. $(selector).click(function () { //for close, opened dropdown. if ($("nav").hasClass("in")) { $('[data-toggle="collapse"]').click(); } });

Categories : Twitter

Forward button to navigate to an activity
You could set android:launchMode="singleTop" in Result activity in Manifest file. So now, if you've created an activity (Result) once then sending another intent to it won't create a new activity but get previous one to the foreground See this for more info

Categories : Android

Angular.js Click on link to download is causing navigate to home page
That's because your router is likely redirecting you to the homepage. See Angularjs simple file download

Categories : Angularjs

Navigate through & display each database record in the 'textfield' using an AWT button
use Swing JComponents rather than AWT Components use JTable instead of sets of AWT TextFields search for ResultSetTableModel or TableFromDatabase for easy, stable and correct workaround ResultSetTableModel, TableFromDatabase or your idea has an issue with Event Dispatch Thread

Categories : Java

Navigate to activity by back button doesn't call onstart()
Back button is navigation to previous activity in activity stack, which is already created and thus its onResume method will be called. So you can do what you want inside onResume(). If it is must for your activity to create new instance do as follows: If you are on activity A and going B, call A.finish() so it discards A from activity stack, and on B override backPressed and create a new instance of A. @Override public void onBackPressed() { Intent i= new Intent(this, A.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); this.finish(); startActivity(i); }

Categories : Android

Why won't the navigation button show when I add the title to my viewController?
UINavigationBar displays a back button on the left and a title in the center,but it will be visible if your navigation controller stack contains more then one view controllers. Because there is no way of back button on navigationbar if there is only one viewcontroller in stack. Hope it helps you.

Categories : IOS

Adding and Removing Dynamic Buttons From one activity to another activity in android on click of button from previous activity button click
In the first activity's onClick send the data using Intent: intent = new Intent(this, PCode.class); intent.putExtra("EXTRA_BTN_NAME", editText.getText()); intent.putExtra("EXTRA_WHERE", where); startActivity(intent); In the new activity you should get the data with @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activty2); Intent intent = getIntent(); String btnName = intent.getStringExtra("EXTRA_BTN_NAME"); where= intent.getStringExtra("EXTRA_WHERE"); LinearLayout l1 = (LinearLayout) findViewById(R.id.layout); Intent intent1 = new Intent(context1,PCode.class); Button b = new Button(this); b.SetText(btnName); //TODO - use the "where" parameter l1.addView

Categories : Android

I just want to randomly click some button and then when I click Sum button it will show the sum
This line: unction buttonClicked(obj) { should be: function buttonClicked(obj) { As you are sending the value to the function, and not an object containing the value, this: mynum[i++] = obj.value; should be: mynum[i++] = obj; As you have numbers in the array, you shouldn't parse them. This: sumOfArray += parseInt(mynum[j++]); should be: sumOfArray += mynum[j++]; Side note: When you do use parseInt you should specify the base as the second parameter, otherwise it will parse numbers that start with a zero using base 8 instead of 10. You probably want to send a value to the function that corresponds to what the button shows, so this: button type="button" onclick="buttonClicked(2)">1</button> <button type="button" onclick="buttonClicked(3)">2</button

Categories : Javascript

in c#, how can you disable a button after the 1st click, and enable it again after you click another button?
This is pretty trivial private void ScanButtonClick(object sender, EventArgs e) { // do something (sender as Button).Enabled = false; } private void BrowseButtonClick(object sender, EventArgs e) { ScanButton.Enabled = true; }

Categories : C#

How can I reach the presentViewController method in my ViewController with this hierarchy? VC -> TableView -> Cell -> Button
I would suggest putting the button's action method in the controller that needs to do the presentation. Depending on your current design, this might be a bit of work right now to set up, but I think it will pay off in understandability and flexibility in the future.

Categories : Objective C

click on button in listItem does not respond on first click, but response on second click, how to set to response on first click?
Because you are setting your onClickListener() for your ImageViews within your ListView onItemClickListener(). So the user selects an item in your list, and only then does an onClickListener for your ImageViews get assigned. So the second time, the onclick listener of the ImageView gets successfully fired. To navigate around this issue, assign the individual ImageView onClickListeners within a custom adapter so they are assigned when they come into view as opposed to when a user clicks an item in list.

Categories : Android

Pass data from one viewcontroller to existing viewcontroller programmatically
crete two class methods in myAppDelegate for setting data and getting data from Appdelegate,you can access those methods by using APpdelegate class name. Setter method +(void)setGlobalString:(NSString *)stringgValue{ [[NSUserDefaults standardUserDefaults] setObject:stringgValue forKey:@"globalValue"]; // you can save string value here by using NSUserDefaults or any thing else } Getter method +(NSString *)getGlobalString{ return [[NSUserDefaults standardUserDefaults] forKey:@"globalValue"]; } you can call methods like [myAppDelegate setGlobalString:yourString]; NSString *str = [myAppDelegate getGlobalString];

Categories : IOS

In ViewController.m, how can I access a property declared in ViewController.h by a string?
You can iterate through all the buttons in self.view if they are added to the viewcontroller's view with the following for (UIButton *button in self.view.subviews) { // your code here }

Categories : Iphone

How to access a variable from one viewController's method body to another ViewController
if you want the numberOfImagesUploaded to be access into the secondViewController then there are several way : You can send that variable to the custom init method like: initWithnumberOfImagesUploaded:(int)num; You can use the appDelegate class . where you can declare that as a property and it will shared throughout the application but somewhere I have read that it is not the pure way . Probably the pure way is to use Sigleton class. then you can preserve the state of that variable through out your application .

Categories : Objective C

Sencha Touch button click slower than list item click?
I think is because of the pressedDelay config, which for Ext.Button default is 0 and for Ext.DataView is 100 ms. Aditionally, the button fires directly the handler function. And the dataView executes store.getAt(index) to find the record object and pass it to the itemTap callback what adds some ms.

Categories : Javascript

jQuery click on button will show the div and again click on any area of the page will hide the div?
add this to your script inside document.ready function. jQuery("body").click(function(e){ //or jQuery(document) if(e.target.className !== "profile") { jQuery('div.account-info-box').hide(); } }); final code.(updated) <script type="text/javascript"> jQuery(document).ready(function() { jQuery('div.account-info-box').hide(); jQuery('a.profile').click(function(event){ event.preventDefault(); jQuery('div.account-info-box').show(); }); jQuery("body").click(function(e){ //or jQuery(document) if(e.target.className !== "profile") { jQuery('div.account-info-box').hide(); } }); }); </script>

Categories : Jquery

ScriptManager.RegisterStartupScript On Button Click (within updatepanel) Does not fire on FIRST click
If you are working with AJAX UpdatePanel, following code should work for you. In my case, I was using update panel and none of the about worked except this one. ScriptManager.RegisterStartupScript(myUpdatePanelID, myUpdatePanelID.GetType(), "myFunction", "myFunction();", true);

Categories : C#

Script button click behaving not like user click
Could you please share how you tried to click the button using UiAutomator. Below code should work UiObject buttonToClick = new UiObject(new UiSelector ().text(Play).className("android.widget.Button")); buttonToClick.clickAndWaitForNewWindow();

Categories : Android

Functions at specific click with click counter at one div button
You've already got it doing what you want with this: $('#area1').click(function () { a1_Events[a1_c++ % a1_Events.length](); }); But then, as Bergi pointed out, some of your click handlers bind other click handlers. Once those are called, you'll have multiple functions being called with each click. Change those functions to not bind new click handlers, but just perform the action. For example, function3() should be: function function3() { $("#area1").hide(); $("#area2").show(); } Change function6() and function8() in the same way. Remove function4() as a click handler for #area1. It will never be called because it isn't set to be called until after function3(), which hides #area1, making it unclickable. Just bind the click event for #area2 directly in the document re

Categories : Javascript

Disable mouse click on button click and enabling it again
I want to disable mouse left click on button What about the space bar? Enter? Right mouse button for left-handed mouse? Your solution Y ("Disable left click") to problem X ("User may not 'click' button") is wrong, see XY Problem. You just want to set the button's Enabled property to false.

Categories : C#

jquery hide right click menu after click on button
You should add and event handler for click events on dropdown-menu panel buttons, like this: function showMenu(menuClass) { var menu = $(menuClass); $('#demo-container').bind("contextmenu", function (event) { event.preventDefault(); menu.appendTo("body").css({ top: event.pageY + "px", left: event.pageX + "px" }).show(); }) } $(document).ready(function(){ var page = $(this); page.on("click",'.dropdown-menu button', function (event){ var button = $(this); button.closest('.dropdown-menu').hide(); }); })

Categories : Jquery

How to pass NSURL object from one viewcontroller to another viewcontroller
I assume that you're performing a segue from one VC to another. If so, you can do this in your prepareForSegue:sender: method: if ([segue.identifier isEqualToString:@"segueToListViewController"]) { [(ListViewController *)segue.destinationViewController setURL:[NSURL URLWithString:@"http:// some url"]]; } You have to declare a property in your destination VC to handle the URL, and you will need an accessor method to set that property. EDIT As danypata suggested, if you're not using segues, try the following ListViewController *listViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ListViewControllerIdentifier"]; [listViewController setURL:[NSURL URLWithString:@"http:// some url"]]; [self presentViewController:listViewController animated:YES completion:nil]

Categories : IOS

How to instantiate a second ViewController and stop the methods of the first ViewController
Have a look at - (void)viewWillDisappear:(BOOL)animated and - (void)viewDidDisappear:(BOOL)animated You can implement these methods on your first view controller to stop/disable any activity or touch detection.

Categories : IOS

Button click event based on class isn't being fired on button that is dynamically created.
The existing buttons get their event handlers on page load, but the new button is added to the DOM afterwards. You would have to update your JavaScript code, like this: $(document).on('click', '.deleteButton', function(){ console.log("Delete Hit"); var successful = deleteEntry($(this).attr('id')); if(successful == true){ $(this).parent().parent().remove(); }else{ alert("Delete Unsuccessful."); } }); Find more info in the jQuery docs at http://api.jquery.com/on/#direct-and-delegated-events.

Categories : Javascript

button labeled based on ajax call; on click, button text to add to input box
First off, I can't imagine what this is for and it kinda makes me curious. I'm also not clear on where the failures are in the code you presented. What I would recommend is using input type="button" rather than buttons...this way you can easily grab the value....then make sure they all elements are getting assigned values properly (you can check in your browsers web developers tools / firebug)....then get something like this working (not 100% sure the best way to get the value...you might need to get it via an ID) function bindbuttons(c, d, e) { $("#R" + c + "L" + d + "butt").on("click", function() { alert(this.value); }); } then move on to inserting it into the input (which should be easy something like...) $("#R" + c + "anstext").val(this.value);

Categories : Jquery

How to click on a button webelement using css_selector with Selenium webdriver for identical button types
Use div.some-class > button.button as selector becasue find_element_by_css_selector return the first matched WebElement: driver.find_element_by_css_selector("div.some-class > button").click() If you want be explicit use :nth-child(1) or :first-child. UPDATE selector was wrong. Selector should be div.some-class > button[type=button] or simply div.some-class > button.

Categories : Python

Button inside listview, being opened in a dialog, not firing button click event
A jQuery ui dialog box is rendered outside the <form runat='server'></form> tags of an aspx page and hence does not trigger any server side events. You need to append the dialog box, when it opens, to the form element. If you are using jQuery ui version > 1.10.0, they have provided an appendTo option $( ".selector" ).dialog({ appendTo: "form" }); Otherwise, $('.selector').dialog({ open:function(){{ $(this).parent().appendTo($("form")); }} }); In the above code, form represents the appropriate selector for the <form></form> element on your aspx page.

Categories : Jquery

The Button in WinForms has a CLICK event. But who tells the Button object that it has been clicked?
A Button is, technically, a Window. It has a Window handle. That means that the Dispatcher will route keyboard and mouse events to the Button when appropriate. The Button has internal logic to determine when a MouseDown and a MouseUp event constitute a valid click and then it raises the Click event.

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.