Search Results

Search found 3844 results on 154 pages for 'clicked'.

Page 9/154 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Why is my jQuery event not being triggered when the button is clicked?

    - by Ankur
    I am trying to call the .ajax() method when a button with id=go is clicked. This button is displayed when another jQuery event is triggered, namely that a button with a class called predicate is clicked. The button with id=go is displayed without any problems but on clicking it, there is no call to the alert() or getResults() method which are supposed to occur. Howver if I hard code the button with id=go into the page and don't have it generated by jQuery then the thing works fine. Why does the generated code cause a problem. $(document).ready( function() { $(".predicate").click( function() { makeQuery(this.id); //alert(this.id); }); $(".object").click( function() { //alert(this.id); }); var variables = 0; var queryString = ""; var noOfResults; var formValues=""; var goBegin = ""; var goEnd = "<br/><input name='go' id='go' type='button' value='go'/>"; function makeQuery(value) { queryString = queryString + "val" + variables + "=" + value + "&"; formValues=formValues+"<input type='hidden' name='val"+variables+"' value='"+value+"' />"; variables = variables + 1; $("#resultCount").html(goBegin+formValues+queryString+goEnd); } function getResults(){ $.ajax( { type : "GET", url : "ObjectCount", data : queryString + "count=" + variables, success : function(results) { noOfResults = results; $("#resultCount").html(results - 1 + " results"); } }); } $("#go").click( function() { alert("We have been alerted"); getResults(); }); });

    Read the article

  • Setting a cookie based on the name of the link that is clicked.

    - by Ozaki
    TLDR When clicking on a link I want to assign a cookie with a name of instrument and a value of the text on the link clicked. Using Jquery.1.4.2.min.js, Jquery.cookie.1.0.js I am trying to create a cookie when a link is clicked (will always link to "page.html"). name of instrument value of the TEXT So far I am trying to use: Link1: <a href="page.html">link1</a> Link2: <a href="page.html">link2</a> Script: $('a[href=page.html]').click(function() { var name = 'instrument'; var value = $(this).text(); $.cookie(name, value, { expires: 365 }); }); When I click the link it just loads the link and no cookie is set. Debugging with firebug, firecookie, firequery. No cookie for instrument or anything along the lines is found. Onload I'll hit the "<a href="page.html">projects</a>" but not the "$.cookie(name, value, { expires: 365 });" at all.

    Read the article

  • Winforms ComboBox does not expand when clicked, any ideas?

    - by peter p
    Hi everybody, A ComboBox within a Form (modal dialog) does not open when clicked, however an item can be selected by using the up/down arrow keys. After clicking on another window and the back on the dialog, the ComboBox works as expected, i.e. expands on click. Weird... any ideas what could be causing this behavior? Thanks a lot in advance, Peter

    Read the article

  • how can i get notified on every control clicked in another application?

    - by Dizzy
    Hi all, Im writing an application that needs to get notified when a control in another application is clicked\invoked. How can i catch the click from my application? Here are some more related questions : Is UIAutomation can be a solution? is it working on unmanaged applications also? Is the Spy++ solution works also on managed applications? i'll be happy with any help.

    Read the article

  • KeyDown Event is not responding till any user control is clicked or setFocus implicitly ?

    - by Subhen
    KeyDown Event is not responding till any user control is clicked or setFocus implicitly . I want to fire the key event after the page loads , anytime. I tried like : private void Page_KeyDown(object sender, KeyEventArgs e) { if (e.Key.ToString() == "Escape") { string uri = "/Views/Music/ArtistbyAlbum"; this.NavigationService.Navigate(new Uri(uri, UriKind.Relative)); } } void LayoutRoot_KeyDown(object sender, KeyEventArgs e) { MessageBox.Show("hi"); } Please help. Thanks, Subhen

    Read the article

  • iPhone SDK: Know when tab on Tab Bar is clicked?

    - by Nic Hubbard
    I have a tab bar which displays different views when clicked. When you click a tab for the first time, it calls the viewDidLoad method. But, it only calls that the first time. Is there a method that is called when a user clicks back to that tab, since the viewDidLoad won't be called that second time? (I need to do this to update a UITableView when the user clicks back to a tab)

    Read the article

  • How to make a link button visible after another button has been clicked in asp.net(vb) in button_c

    - by Parth
    How to make a link button visible after another button has been clicked in asp.net(vb) in button_click() it says error as "Object reference not set to an instance of an object." i've done this in my code Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim receipt As LinkButton = FormView1.FindControl("LinkButton1") ' receipt.Enabled = "true" ' receipt.EnableTheming = "true" ' receipt.EnableViewState = "true" receipt.Visible = "true" End Sub

    Read the article

  • In an array of buttons, how can you tell which button was clicked?

    - by Michael Seltenreich
    If I have an array of buttons, how can I tell which button was clicked? example below var i=0 CreateButton = new function () { savebutton[i]=NewButton() i++ } every time a user runs the function a new button is generated. the first button is savebutton[0] the second is savebutton[1] and so on potentially infinity times. when later the user presses the button I want the screen to alert it's index number (or 'i'). is there any way to make this work in arrays?

    Read the article

  • How can I display the clicked products by user on a list in another view?

    - by Avar
    I am using MVC3 Viewmodel pattern with Entity Framework on my webbapplication. My Index View is list of products with image, price and description and etc. Products with the information I mentioned above is in div boxes with a button that says "buy". I will be working with 2 views one that is the Index View that will display all the products and the other view that will display the products that got clicked by the buy button. What I am trying to achieve is when a user click on buy button the products should get stored in the other view that is cart view and be displayed. I have problems on how to begin the coding for that part. The index View with products is done and now its the buy button function left to do but I have no idea how to start. This is my IndexController: private readonly HomeRepository repository = new HomeRepository(); public ActionResult Index() { var Productlist = repository.GetAllProducts(); var model = new HomeIndexViewModel() { Productlist = new List<ProductsViewModel>() }; foreach (var Product in Productlist) { FillProductToModel(model, Product); } return View(model); } private void FillProductToModel(HomeIndexViewModel model, ProductImages productimage) { var productViewModel = new ProductsViewModel { Description = productimage.Products.Description, ProductId = productimage.Products.Id, price = productimage.Products.Price, Name = productimage.Products.Name, Image = productimage.ImageUrl, }; model.Productlist.Add(productViewModel); } In my ActionResult Index I am using my repository to get the products and then I am binding the data from the products to my ViewModel so I can use the ViewModel inside my view. Thats how I am displaying all the products in my View. This is my Index View: @model Avan.ViewModels.HomeIndexViewModel @foreach (var item in Model.Productlist) { <div id="productholder@(item.ProductId)" class="productholder"> <img src="@Html.DisplayFor(modelItem => item.Image)" alt="" /> <div class="productinfo"> <h2>@Html.DisplayFor(modelItem => item.Name)</h2> <p>@Html.DisplayFor(modelItem => item.Description)</p> @Html.Hidden("ProductId", item.ProductId, new { @id = "ProductId" }) </div> <div class="productprice"> <h2>@Html.DisplayFor(modelItem => item.price)</h2> <input type="button" value="Läs mer" class="button" id="button@(item.ProductId)"> @Html.ActionLink("x", "Cart", new { id = item.ProductId }) // <- temp its going to be a button </div> </div> } Since I can get the product ID per product I can use the ID in my controller to get the data from the database. But I still I have no idea how I can do that so when somebody click on the buy button I store the ID where? and how do I use it so I can achieve what I want to do? Right now I have been trying to do following thing in my IndexController: public ActionResult cart(int id) { var SelectedProducts = repository.GetProductByID(id); return View(); } What I did here is that I get the product by the id. So when someone press on the temp "x" Actionlink I will recieve the product. All I know is that something like that is needed to achieve what im trying to do but after that I have no idea what to do and in what kind of structure I should do it. Any kind of help is appreciated alot! Short Scenario: looking at the Index I see 5 products, I choose to buy 3 products so I click on three "Buy" buttons. Now I click on the "Cart" that is located on the nav menu. New View pops up and I see the three products that I clicked to buy.

    Read the article

  • How to get the row and column of button clicked, in the grid event handler?

    - by younevertell
    Once the added button in grid is clicked, how to find which row and column the button is located in the grid event handler, like click event or some other events? Not the button click event handler #region Grid event handler setup myGrid.MouseEnter += new MouseEventHandler(myGrid_MouseEnter); myGrid.MouseLeave += new MouseEventHandler(myGrid_MouseLeave); myGrid.MouseDown += new MouseButtonEventHandler(myGrid_MouseDown); myGrid.MouseUp += new MouseButtonEventHandler(myGrid_MouseUp); #endregion Thanks I notice that Boyan has some solution for the button click event handler case http://stackoverflow.com/questions/363100/in-wpf-how-can-i-determine-what-column-row-in-a-grid-a-control-is In the Click event handler for the button you say: int row; Button btn = sender as Button; if (btn != null) { row = Grid.GetRow(btn); // And you have the row number... } else { // A nasty error occurred... }

    Read the article

  • I need to know what link is clicked, how do i get these variables with cherrypy?

    - by user291071
    Lets say I display 3 links, I want to accomplish 2 things, know which link is clicked, and record this choice in a list/pickle or txt file but also capture this variable in cherrypy so I can perform another action. How do I do this? Its been suggested that I use a query string which makes sense but I can't get the querystring variable to cherrypy to use for further actions. So would anyone have a simple code of cherrypy with lets say 2 pages and have one page display 2 links with a querystring in each and the second page able to get that value?

    Read the article

  • How can I get the text that was clicked on in Javascript?

    - by Jake
    Does anyone know if it is possible with javascript to to tell the position of a mouse click in some text? I know it's easy to get the x,y coordinates, but I'm wanting the position in the text. For example if I clicked inside <p>foo bar</p> I want to be able to tell that the click was on/after the 5th character. Or that foo b is before the click and ar is after it. By the way, I'm using jQuery too, I'm happy with pure JS and solutions that use jQ. Thanks in advance.

    Read the article

  • in c# a label that displays info, then when clicked it opens firefox and searches for the info displ

    - by NightsEVil
    hey i have a label that displays graphics card name and make and stuff and i'm working on having it so that when its clicked, it opens Firefox and searches Google for the info found by "name" i tried using let met Google that for you but it searches for like each work individually well this is what iv tried so far and it kinda works but there's something wrong private void label13_Click(object sender, EventArgs e) { ManagementObjectSearcher Vquery = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController"); ManagementObjectCollection Vcoll = Vquery.Get(); foreach (ManagementObject mo in Vcoll) { System.Diagnostics.Process CcleanerA = System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Mozilla Firefox\firefox.exe", "http://google.com/?q="+(mo["name"].ToString())); } }

    Read the article

  • Detect what is selected (highlighted) or clicked within an element on a page?

    - by Fog Cook
    How would one go about detecting what has been selected on a page in a browser? Example: Click, hold, select 3 words and 1 image on a page, release. Sub-question: How to detect what letter someone clicked on? Without using: A span injector breaking everything up OR a WYSIWYG plugin I'm hoping this isn't just a type of browser interaction you can't detect. There could be many uses, but my goal is a simple 'live' page editor, or at least a way to know what someone is clicking on/selecting aside from just the id of an element.

    Read the article

  • Not able to click on all the links in Selenium Webdriver.Only the first link gets clicked

    - by Kiran
    .i want to go to a frame in which some links are there....Once I come in to a fram.i want to click all the links one by one..using webdriver...below is the code i have written.plz suggest me public static void main(String[] args) { // TODO Auto-generated method stub WebDriver driver=new FirefoxDriver(); driver.get("http://timesofindia.indiatimes.com/home"); WebDriverWait wait= new WebDriverWait(driver,200); wait.until(ExpectedConditions.presenceOfElementLocated(By.id("riShop"))); driver.switchTo().frame("riShop"); List<WebElement> lst=driver.findElements(By.tagName("a")); for(inti=0;i<lst.size();i++){ lst.get(i).click(); driver.navigate().back(); } } } } In the above code....only the first link gets clicked and then i get exception like..unable to locate the next element.....NoSuchException plz suggest me something about it...

    Read the article

  • C# Why is a treeview node clicked when canceled is set to true?

    - by Martijn
    In my winform application I have a treeview. To give the idea that a node is disabled I set the node's forecolor and I when the BeforeSelect fires I set e.cancel to true. However when a node's tag meets some criteria a node may be selected. So that's why I have a NodeMouseClick. But when a node may not be clicked I set the e.cancel to true in the BeforeSelect event. The problem now is, the NodeMousClick event is always fired and all the code is ececuted, even when I set e.cancel to true in the BeforeSelect event. Why is that?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >