FAQ Database Discussion Community
javascript,jquery,ajax,onclick
I am trying to pass a variable to the onClick function using a previously stored value. I have a database setup that searches for store locations when provided with a ZIP code. For example, the following link is generated using an ajax call after a user searches for a Zip...
android,listview,onclick,cursor,adapter
So I have been looking around for about 4 hours now and maybe I just don't know how to word my search, but I am not finding out what I need. I am using a custom adapter to setup my listview from items I have stored into an sqlite database....
java,android,listview,button,onclick
I have a fragment where when an item of the list is clicked, you can determine which position using onListItemClick. Now I have a button on each list item (a delete button) and I want to know which position was clicked when it is pressed. How can I do this?...
javascript,jquery,html5,javascript-events,onclick
I have a code in which should only be executed after an onclick event. On mobile devices its fine because I use touchstart and touchend. Is there an event similar to touchend for use on a computer? My code currently looks similar to.. document.getElementById('trigger-box').addEventListener(function(e) { // the event will be...
html,css,onclick,hide,show
I have four 200px*200px div tags and when I click one I would like to change the one I clicked to 800px*800px and hide the other three div tags. I would like to be able to do this to each of them, so say when I click one it will...
jquery,html,onclick,section508
This is a fairly simple accessibility question. Say we have a toggle link/button which, when clicked, toggles the mobile menu. Which is the more accessible format for such a button? We have 4 total options, separated by button tag vs. a tag, and onclick attribute vs. $("#showMenu").on("click", function() { showMenu()...
javascript,jquery,html,onclick
I am trying to repeat the clickfunction but it will only repeat twice. After that the counter disappears. I don't know what the cause of this is. H var divClone = $("#target").clone(); var divClone = $("#output").clone(); var clickCount = 0; $('#target').click(function() { if ( clickCount < 6){ clickCount++; $('#output').html(function(i, val)...
angularjs,onclick,ng-class,onhover
I have 3 variations of 1 image. I need to swap the image based on its Event State For Example: 'current' 'onClick' 'onHover'. Want to use standard Windows Events. Can I use Angular's 'ng-class' with IMAGES and add in onClick & onCover as my Javascript test expression? Precisely testing for...
android,onclick,media-player,android-mediaplayer,onpause
I am a noob programer and I encountered a problem, I have a mediaplayer.start() inside an onClick method, if i call mediaplayer.stop(); mediaplayer.reset(); mediaplayer.release(); it will crash and get the error: Attempt to invoke virtual method 'void android.media.MediaPlayer.stop()' on a null object reference ". I tried How to stop the...
javascript,svg,path,onclick
I am trying to display multiple SVG paths after clicking on a SVG polygon. I was able to get and individual path to appear onclick by using document.getElementById(id).style.display = "block"; getElementById() on works for one path though. How can I get the onlclick to work for multiple paths? I tried...
javascript,jquery,jquery-plugins,onclick
I'm creating a jQuery plugin that listens to click events on multiple elements that have the same ID name. // On click listener base.$el.click(function (event) { event.preventDefault(); alert("clicked!"); }); The click event works only on the first of multiple HTML elements. How I'm initializing the plugin: $('#test-button').scrollTo(); How can I...
javascript,jquery,onclick,area,imagemap
I would like to put an onclick event on an area element. Here is my setup: <img id="image" src="wheel.png" width="2795" height="2795" usemap="#Map" > <map name="Map"> <area class="blue" onclick="myFunction()" shape="poly" coords="2318,480,1510,1284" href="#"> </map> I have tried 2 different ways to have an onclick event. Firstly i tried this: $(".blue").click( function(event){ alert('test');...
javascript,drop-down-menu,onclick,focus,onmousedown
I try to get a drop down menu to work as most drop down menus seem to work, i.e. as soon as the mouse button is pressed on the trigger the drop menu shows up. Seems rather easy with some css and javascript but it turns out to be a...
javascript,onclick,lazy-loading,primefaces-mobile
I want to run a javascript function when I click on a commandButton on signin.xhtml, but when I click on it, a redirection occur to dev.xhtml. I don't want this redirection, I want to stay on signin.xhtml. Actually it's not really a redirection because it's the same index.xhtml page but...
javascript,foreach,onclick
<? foreach($words as $word): ?> <li> <button onClick="reply_click()">Show</button> <h4><?php echo $word['Word']['en_words'] ?></h4> </li> <? endforeach; ?> <script> function reply_click() { $("h4").toggle("slow"); } </script> When I click 'button' - shows all, in every foreach, but must show in only one. Where I must used 'this' that this script work? ...
javascript,jquery,wordpress,onclick
I am using this script in Wordpress hence the $=jQuery. This currently adds .current class to all .col-xs-4.col-sm-4.feature_thumb divs. How do I change this to only add the class to its parent's div? jQuery(document).ready(function(){ jQuery(".feature_thumb a").click(function(){ jQuery(".col-xs-4.col-sm-4.feature_thumb").addClass("current"); }); }); Can someone help me with this? This is my html <div...
javascript,angularjs,onclick,angularjs-ng-repeat,onsen-ui
i want to make my Onsen UI splitView app to set the main page with a certain page based on a variable it got from the clicked item in a list. the list is generated by ng-repeat. i have searched about ng-repeat and ng-click, but none give what i am...
javascript,class,onclick,click
This question already has an answer here: How do you assign an event handler to multiple elements in JavaScript? 1 answer I am trying to run a function when user clicks on a class. Here is a fiddle with a similar setup. Except that I am not using buttons...
javascript,html,events,onclick
I need help on my game, in this chase I need help for On-click event. I have a image that for each time I click on it I get 1 score point. I need help to create this quite basic event or someone who be kind enough to write a...
javascript,image,onclick
I have searched and tried out various functions including 'if' and 'else' functions, but I can't get them to work.. The intention is to change various images onclick of just one image. Here is the HTML for that image I'm currently using: <div id="apDiv2"><a href="#" onclick="changeImg();"><img src="images/AJP-TAG-W.jpg" width="207" height="138" /></a></div>...
javascript,onclick
i am new in javascript, I am quite confuse to the following problem: Before i click the button, keypress can be detected and result in alert However, after i click the button, the page keeps loading and no longer detect my keypress anymore, I would like to ask why will...
javascript,jquery,function,variables,onclick
i need function which assign selected value or variable to new variable and forward to input field. Anyone can help me? :> <script> function myFunction(){ //function } </script> <input id="price-postfix1" onclick="myFunction()" name="price-postfix" type="radio" value="$option1"/>Option1<br> <input id="price-postfix2" onclick="myFunction()" name="price-postfix" type="radio" value="$option2"/>Option1<br> <input id="price-postfix3" onclick="myFunction()" name="price-postfix" type="radio"...
javascript,jquery,html,onclick
I am working on a click event, which intially is pretty standard. on.click: Remove the active class from all list items, then add active to the clicked list item. ie var li = $('.child-item'); li.click(function(){ li.removeClass('active'); li.addClass('active'); }); Works as expected. However, I also need a condition that if the...
javascript,php,onclick,syntax-error
When clicking on the "Print Ticket" button Javascript is throwing an syntax error in firebug indicating "Expected expression, got end of script" However this is a straight forward bit of php/javascript code so i'm at a loss for the syntax problem. This button is not addressed by any Jquery function...
jquery,onclick,click,append
I'm trying to use the JQuery .click on a div that i append, but the click doesn't work at all. here is the code, i already tried the help from the other Tutorials i could find on the internet but it didn't work. here is the jquery (very simple version)...
javascript,html,onclick,buttonclick
I realize the title doesn't make a lot of sense, but I'm not sure how else to express the question I have. I am trying to learn about adding events to buttons in JavaScript, and I have run into a bug that I cannot figure out. Here are the two...
android,webview,onclick,spinner
I have an app that sends a user input to a website's search URL, like so: To do this, I was wondering: How do I store the last webpage visited on each site to cache? How should I add the website names to the spinner? How would I write the...
android,onclick,position,recyclerview
I have a recylcerview in a navigation drawer and I wish to find what position was clicked by the user in the recyclerview in a different activity. The way I have written the code currently always return 0 as the position. Can anyone help me out. Thanks in advance! Recyclerview...
jquery,onclick
I'm trying to work out how I can put a toggle inside an onclick of an img tag. i.e. <img src="..." onclick="IWANTITHERE" /> not using an event handler like so... $('img').toggle(function() {$(this).animate({width: '400px'}, 'slow');}, function() {$(this).animate({width: '120px'}, 'slow'); }); The following has some funky side effects like performing the animation...
android,listview,onclick,icons,navigation-drawer
I have got a simple navigation drawer with a header (see picture). What I want to do now is whenever the header (listview-item with position 0) is clicked to either change the down-arrow-icon (bottom right corner of header) to an up-arrow-icon or to rotate it so the arrow points up....
javascript,php,scroll,onclick
I've tried overwriting the scroll-to-id-event with a js-function I found online (Smoothly scroll to an element). For unknown reasons it wont fire up. Js itself is correctly implemented, as I managed to output some text with document.print('test'); Im really really not into Js, so please be patient with me. Index.php:...
android,button,onclick,drawable
I have a button with a drawable XML Background android:background="@drawable/greenbut" and i want to change the Background to my @drawable/yellowbut by make an onclick on my button. I tried it with this code, but it seems to be completely wrong. I cannot use the setBackground Function. Can you please help..?...
javascript,html,audio,onclick
I am trying to get some buttons to work with sound to no success. For the page I am using I have it set up as such: // javascript file for gun tutorial// window.onload=function() { var extraAmmo = 210; var maxAmmo = 30; var currentAmmo = maxAmmo; var extraAmmoHud =...
java,android,xml,listview,onclick
This is the listview. It only shows 3 type of info(i.e. job post name, location, salary) in each item : Job post name 1 Location 1 Salary 1 For example, the above 3 info is item 1 in the listview. If I click item 1, it is supposed to show...
javascript,html,css,onclick
I am just working on my new webspace and I have a small problem. I know have to input tags with an onclick function <script> function mark( el ) { el.style.borderBottom= "3px solid white"; } </script> When I click on the first input the border appears as I want but...
javascript,jquery,ajax,scroll,onclick
I want to use : $("...").animate() with loading an onClick JavaScript Ajax . But there are some issues with that: I try using jQuery like this : function Ajaxrequest(){ var xmlHttp;try{xmlHttp=new XMLHttpRequest();return xmlHttp;} catch (e){ try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); return xmlHttp; } catch (e){ try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); return xmlHttp;} catch (e){ alert("Browser Not...
css,onclick,hover
i want to keep the hover effect of my div when i click on it how can i do it ? There is my code: i actually want my div with the red background stay in the hover place when i click on the "work" button #work_btn{ position:absolute; top:60%; left:60px;...
javascript,jquery,onclick,bootstrap,popupwindow
I need to implement a pop up window on clicking one link. My HTML Code snippet: <head> <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="/stylesheets/script.js"></script> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script...
javascript,html,function,onclick
At first I want to apologize for my bad English. I am making tic tac toe in JavaScript, but the reloading of the game isn't working for me. I have made a button like this: <button onclick="restart()"> Opnieuw! </button> My script looks like this: function Canvas(){ /* other functions */...
jquery,html,onclick,click
I'm trying to fadeIn 1000 when add class by Click function. I have tried this: http://jsfiddle.net/rf7mudL5/ HTML <span class="date-outer">Text will Red on fadeIn</span> <button class="more-recent-button"></button> JS $(".more-recent-button").click(function(){ $(".date-outer").fadeIn("1000").addClass("more-date-outer"); }); So how to opacity fadeIn when Class will add by click button? Is possible this: when click button, content will fadeIn...
javascript,jquery,onclick
I've a common function : function initialize(){ selectedAttachment(); } which is first called on ajax success and then after onclick event Ajax call : $.ajax({ url: HTTP_LANYARDS + 'orders/lyPrices', dataType: 'json', type: 'get', beforeSend: function(){ $('.overlay').show(); }, complete: function(){ $('.overlay').hide(); }, success: function(json){ ajaxData = json; initialize(); if(typeof(editOrder)==='function'){ editOrder(); }//calling...
javascript,html,onclick
so when a user clicks on a link a specific element should be shown and when the user clicks that link again the element should hide.I m trying do it but there's a problem with my code.It occurs just once.I want to occur for infinite times.Can anyone help? <html> <head>...
android,listview,onclick
I have an error when i click on item in activity they all show me the same string which his name: "name_0" the activity which is open when we click: public void handle() { TextView var3 = (TextView) this.findViewById(R.id.name); TextView var2 = (TextView) this.findViewById(R.id.meaning); TextView var5 = (TextView) this.findViewById(R.id.proof); Intent...
javascript,javascript-events,onclick
The following code creates two objects, one statically defined in html, with an event that works, and one defined in javascript that does not. Obviously this can be done in javascript, so what is wrong? <!DOCTYPE html> <html> <head> <script> function build() { var img = document.createElement("img"); img.src = "cat.jpg";...
javascript,html,onclick,document-body
I'm learning Javascript. <input type="button" onclick="addP();"> This line works fine.Can I add click event to the body like this? <body onclick="addP();"> When I click ,I got nothing shows up.But if I add width and height to body, it worked! But just in the limited scope. If you add a background...
javascript,onclick,bootstrap
I have a problem, when i try to retrieve the value I have typed in the text input, and I try to print it in alert , it shows nothing, the variable is empty here is the code: I have here the input textfield 'Montant', i would like to retrieve...
javascript,jquery,if-statement,onclick
I need some help with some If statement. I have this div <div id="features-dots"> <ul> <a href="#"><li class="one"></li></a> <a href="#"><li class="two"></li></a> <a href="#"><li class="three"></li></a> </ul> </div> and <div class="feature_thumb"> <a class="feature_thumb" id="one" onclick="return false;"></a> </div> <div class="feature_thumb"> <a class="feature_thumb" id="two" onclick="return...
android,onclick,recyclerview
I have a RecyclerView in my app that displays a row containing pictures and photographs downloaded from the internet. There is a photo and a button on screen. When the user clicks a button, I want to make another view visible on top of the on screen photo. I have...
javascript,arrays,loops,onclick
I would like to display one of arrays after clicking matching array: for example image 1 after clicking will display array 1 image 2 after click will display array 2: var DetailArray = new Array( "number 1", "number 2", "number 3" ); function ShowNumber(number) { document.getElementById("number").value= ; } img src...
android,for-loop,onclick,onclicklistener,imagebutton
I am making an android application that allows users to click either a plus or minus image button to change the number displayed in a text view. There are 18 of the text views and a plus and minus image button for each text view. The activity crashes when i...
twitter,android-listview,onclick,android-adapter,fabric-twitter
I am creating a Twitter client using Fabric but I can not create a custom onClick. I created this custom adapter and tried to create a OnClickListener but not working. Always open in browser tweet. public class TweetAdapter extends TweetTimelineListAdapter { public ArrayList<Long> tweetIds=new ArrayList<Long>(); public TweetAdapter(Context context, Timeline<Tweet> timeline)...
javascript,html,function,onclick
I apologize if the title sounds a little confusing, essentially, I am trying to figure out how to get a span to appear and/or swap depending on a random generator. in one of my classes involving riddles, I was able to get the text to disappear and reappear upon clicking...
jquery,html,css,text,onclick
I am new to Jquery and Javascript and been having some trouble changing the "like" button to "liked" when it has been clicked. I have managed to change the color of the button and contents on click, but when I would add an if/else statement to have it change the...
jquery,twitter-bootstrap-3,onclick,font-awesome,toggleclass
I'm using Bootstrap 3 Panel's and have appended the Font Awesome Plus and Minus icons to the panel items. I'm looking for a way using Jquery to change the plus to a minus "onClick", then when another panel item is clicked I want that minus icon to change back to...
jquery,triggers,onclick,click
Is there a simplier way to do this in jQuery? $('button').click(function() { // do something }).trigger('click').trigger('click').trigger('click'); ...
javascript,web,onclick,reactjs
I started this component with all the <th> hard coded in, but realized it would save me some time putting them in an array and calling it before render. But now the onClick event isn't firing. I added in the <th id="category" onClick={this.handleClick}>test cat</th> to show that this still works....
java,android,onclick,libgdx,onclicklistener
I want to combine the following two buttons (button1 & button2) into one clicked() method which is similar to Android using v.getId(). In LibGDX: button1.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y){ button1.setText("It was the first button."); } }); button2.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float...
html5,button,onclick,readonly,required
I'm creating an HTML5 web form. One of the inputs is for geolocation and it is filled by clicking on a button (it inserts gps coordinates). Since this input has to be required and has to be read-only (i do not want that users write custom data inside), how to...
javascript,jquery,onclick
I have a group of images with thumb class. In the click event, I want to know which image the user clicked from the thumbs array of images. Basically, I want the index of (this) image in thumbs array. HTML <img class="thumb" src="#" /> <img class="thumb" src="#" /> <img class="thumb"...
android,onclick,onclicklistener,recyclerview,android-recyclerview
I am implementing a Navigation Drawer with a RecyclerView, using this tutorial, but I don't want to apply the whole tutorial, I just want to handle the user's click. I've implemented the onClickListener inside the ViewHolder of my MyAdapter class: public static class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener{ int...
android,onclick,imageview
I'm making a simple Whack a mole game, and when a user taps on a mole, I want it to turn into a poof before it disappears. To do this, I'm trying to call setImageResource() from inside the onClick(), but onClick gets passed a View, which doesn't define setImageResource(). Casting...
javascript,html,onclick
I have a simple function that works when it is hard coded, but when I try to pass a second parameter into it, it doesn't work. I am calling the function with the onclick and using the id => thumbnail to get the value. Any suggestions? Hard Coded Example (Works)...
javascript,javascript-events,onclick
Given the following example code I want to set the onclick event to a function which I declare in the same method (no function in global scope): <HTML> <HEAD> <Title>Title</Title> </HEAD> <body> <img id="img" class="std" src="http://www.free-animated-pictures.com/bug_crawls_on_screen.gif"/> <script type='text/javascript'> var i = document.getElementById("img"); var func = function(){ var i = document.getElementById("img");...
javascript,html,onclick
When ever I try to click on the image, the image changes but the next image in the array is not displayed <!doctype html> <html> <head> <title> slides </title> <script type="text/javascript"> function nextslide(){ var images = new Array() images[0]= "home.jpg" images[1]= "left.jpg" images[2]= "right.jpg" var currentpic=0 var lastpic= images.lenth-1; if...
php,html,twitter-bootstrap,onclick,anchor
I am currently using Bootstrap Timeline (example here). Since this will be a long timeline I want at the top of it to have some symbols (each with a date and a unique ID), which will represent certain event. When clicking a certain symbol I want to be redirect to...
java,php,android,listview,onclick
There is a listview showing all products. It is supposed that a new activity page which allows me to edit product(either save or delete)will be shown after I click the item on the listview. However, when I click the item, the app stopped with error message: Unfortunately, XXX(my app name)...
html5,onclick,html5-audio
So, I have an audio track autoplay when opening the website <audio class="topper" autoplay loop id="minuscolo"> <source src="media/minuscolo.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> and I have an image that I would like to use to control the music <img class="hvr-shrink square" alt="Pause" src="media/gogh.png" onclick="document.getElementById('minuscolo').pause()"> I...
javascript,jquery,scroll,onclick
I've got a downArrow and upArrow buttons on my page to control scrolling. When scrolled to the bottom of the page, the down arrow disappears; and the up arrow disappears when scrolled to the top. Everything works perfectly. Question: How do I bind the mouse wheel scroll to my on...
javascript,onclick,innerhtml
I am having trouble using .innerHTML within a javascript function called by clicking a button. For a brief flickering second I can see that the function is called, and the text changed, but then the text reverts. <html> <head> </head> <body> <form> <input type="submit" value="Change the Text" onClick="change()"> </form> <div...
android,onclick,imageview,flags
I have to change the image dsiplayed in the ImageView, when user click on it. And when he clicks it again, I want to show the original image. How to do this with the flags? Supposably: imageView1, R.drawable.pic_one, R.drawable.pic_two. ...
jquery,function,onclick,hover,mouseover
I have this script to change main image on click to a link with .feature_thumb class. I want to make it so that it's both click and hover. $(".feature_thumb").click(function(){ var main_href = $(this).attr('href'); change_image(main_href ); }); Can someone help me with this? I tried this but it didn't work... $(".feature_thumb").on('click...
jquery,html,css,css3,onclick
i've been practicing some expand/shrink on click html/css/jquery, but some reason, it isnt working. I know there are some out there but i've tried them out, none is working with my code. PS: for now im trying to expand one My objective: Using 4 div squares, all are clickable (like...
javascript,forms,onclick
I am creating a form from javascript. I have to put the onclick on the a tag to call a method when clicked. I am doing like this, but it is not appearing the onclick. function remPass() { var log = document.getElementById("login"); var form = document.createElement('form'); form.method = "post"; form.action...
dojo,onclick,menuitem
I'm studying Dojo 1.10.4, my problem is that the onClick event does not work on dijit/MenuItem. I tried it on other item widgets like dijit/CheckedMenuItem and dijit/RadioMenuItem, none of their click events work, and the API docs didn't give any tips about it. At last, I found it only works...
android,onclick,smartface.io,editbox
How can I add a data to a local table from editbox. I have done many changes to my code onButton click. I have added this code Data.execute("insert into Sample_Table values('Name')",Pages.Page1.EditBox1.text); alert(Pages.Page1.EditBox1.text); But my data is not added in Sample_Table. How can I add data to it if anybody can...
javascript,onclick,mouseevent
When I was trying to disable the right click, it is not working. I tried with below code. document.onclick = function(e) { console.log(e.button); if(e.button == 2){ e.preventDefault(); return false; } } Based on below link only I tried. Disable Right Click in website I tested this code in Chrome and...
java,android,methods,onclick,onclicklistener
I'm trying to make Android onClick() method easier to read, so I wrap it like this public void click(Button bt) { bt.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {} }); } When I try to run it like this button = (Button) findViewById(R.id.btn1); click(button) { @Override public void onClick(View v)...
java,android,button,onclick,main-activity
I have 3 android projects, which they have different functions. Each project has its own mainActivity class. Now I want to merge the 3 projects into one. I can think of 2 ways to do it. First way: open one of the 3 projects, then create new java class and...
javascript,image,dom,onclick,imagesource
I'm new to JavaScript, and I'm trying to alternate an image every click from 1st to 2nd and from 2nd to 1st(indefinitely). I tried this: function change() { var imgId = document.getElementById("image"); var ubuntu = imgId.src="ubuntu.jpg"; var debian = imgId.src="debian.jpg" if(imgId.src="ubuntu.jpg") { return debian; } else if(debian) { return ubuntu;...
javascript,jquery,html,onclick
Have got an button in nav, which on click event is supposed to display:block an ul which is initially set to display:none HTML - <a href=""><i class="mdi-navigation-menu small right" id="lines3"></i></a> </nav> <ul class="collection center" id="drop-navv" style="display:none"> <li class="collection-item">Alvin</li> <li class="collection-item">Alvin</li> <li class="collection-item">Alvin</li> <li class="collection-item">Alvin</li> </ul> Js -...
javascript,arrays,button,random,onclick
I've been trying to create a button that will take a random name from an array, and display it on an html page. Been trying for a long while to get this to work, with no results. What gives? As well, if you know the answer, how could I create...
javascript,onclick,handler,addeventlistener
Right now, I have an event listener that listens to a click on the screen. There is also a button on the screen. When I click on the button the event listener will execute before the onclick. Is there a way I can make onclick have higher priority? <script> document.body.addEventListener('click',function(){alert('1');},...
javascript,jquery,onclick,document-ready
I have a website with some 25-30 different pages (pagetypes / templates, really, you probably get the idea). For each of these, I hook up stuff on $(document).ready(function() ...); and I simply wonder if all of these functions can be put in the same .js file which implies that many...
android,listview,button,onclick,position
I have a listView with an adapter. Every item has two buttons, and i need to detect from which listItem the button was pressed. Here is my code: List<String> mList = new ArrayList<>(Arrays.asList(mNames)); ArrayAdapter<String> mAdapter = new ArrayAdapter<String>( getActivity(), R.layout.list_item_friends_new, R.id.friends_new_name, mList ){ @Override public View getView(int position, View convertView,...
php,mysql,loops,onclick
I'm struggling with this problem and can't figure it out. Here's what I've done: Form: <form method="POST" action="search.php" name="form" id="form"> <input type="text" name="search" id="search" placeholder="Introduza a sua Localização"> <input type="submit" name="Submit" value="Pesquisar"> </form> php looping: <?php if (mysql_num_rows($tournaments) !=0){ do { ?> <div id="rightDetails"> <i class="fa fa-gamepad"></i> <a href="games.php?id_game=<?php echo...
android,view,onclick,android-softkeyboard,android-dialogfragment
Fragment.java file: .... public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.skyfrag_layout, container, false); getDialog().setTitle("Delete skycard"); Button btnCancel = (Button) rootView.findViewById(R.id.btnCancel); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { getDialog().cancel(); } }); ... I tried each of the below in the onClick function but neither...
excel,vba,onclick,copy,prompt
I am fairly certain I know how to select data from a different workbook / sheet but I'm a little clueless as to how I would go about generating a VBA question box that would prompt the user on click to input the relevant workbook / sheet. For example: Workbook...
c#,winforms,batch-file,onclick
How can i click a button on my c# winform and make it save the contents of my textbox to a new batch file on my pc must save as a .bat and be able to open in windows8 as a .bat I have tried many solutions but none work...
javascript,php,printing,onclick
I'm having problems with writing an onclick method in php print in code below: <?php print "<p><small> <a href='#' onclick='ajaxMenu('comments.php?news=".$fileContent['id']."');>".$number. " ".$text." </small> </a> </p>"; ?> Given code doesn't work. I believe it's because of combination of single and double quotes in it. Can anyone help me to solve this?...
php,forms,search,onclick,submit
Ok guys already search for it but no results at all, and cant figured it out how to do this, so my problem is: I have this form: <form method="POST" action="search.php" name="form" id="form"> <input type="text" name="search" id="search" placeholder="Introduza a sua Localização"> <input type="submit" name="Submit" value="Pesquisar"> </form> And what i would...
jquery,html,onclick
I have been struggling with this matter for a while. I am quite new to HTML and Jquery. The idea is to switch images after multiple clicks. All I need is some advice and tips! The solution was the IF statement! var change = 1; $('.checkOpdracht1').click(function(){ if (change++ % 6...
winforms,charts,onclick,position,coordinates
I have a problem with the following sample: When I click at the place marked as '1' on my screenshot, I can get position in pixels by MouseClick event in a pretty easy way: private: System::Void chart1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { Point chartLocationOnForm = chart1->FindForm()->PointToClient(chart1->Parent->PointToScreen(chart1->Location)); cursorPosX = e->X - chartLocationOnForm.X;...
c#,asp.net,onclick,master-pages
I'm working with Bootstrap. I created a master page and the general purpose is to store the input from user in the contact form (name, email, message,...), captcha used also: <!-- Omitted --> <asp:TextBox ID="txtName" runat="server" CssClass="form-control" placeholder="Name*" required data-validation-required-message="Please enter your name." /> <!-- CAPTCHA --> <asp:TextBox ID="txtCaptcha" runat="server"...
javascript,onclick,event-handling,reactjs
Sup. The following alerts on render, but not onClick: render: function(){ return ( <div onClick={alert('I alert on render, but not onClick.')} /> ); } Same for the following: foo : function(text) { alert(text) }, render: function(){ return ( <div onClick={this.foo('I also alert on render, but not onClick.')} /> ); }...
javascript,jquery,html,onclick,click
I'm trying to select tab elements by next/previous buttons instead of number buttons, means go to next tab by click. Default Buttons Fiddle: http://jsfiddle.net/LLdy3gd2/ HTML: Default Number Buttons <p> <button class="select-tab" value="0">1</button> <button class="select-tab" value="1">2</button> <button class="select-tab" value="2">3</button> </p> JS: Default $(document).ready(function () { $('#horizontalTab').responsiveTabs({ rotate: false, startCollapsed: 'accordion', collapsible:...
javascript,html,onclick
I have written and tested all my code in NetBeans and it works fine in the IDE. When I try to integrate it into my webpage, my button onClick event does not execute. I have this in my header: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script src="http://www.afanalytics.com/files/theme/2015.05.23_boilerUpgrade.js"></script> I have uploaded the js file...
python,onclick,pyobjc
I try to display the current windows for each click on the system. I do this code : from AppKit import NSWorkspace def getwindows(): activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName'] print activeAppName return def main(): getwindows() main() But only the current windows when i setup the script is displayed. How can i bind...
jquery,mobile,menu,onclick,slicknav
I'm using Slicknav: http://slicknav.com/ I almost have all the behavior right but not quite. I want the menu to close whenever someone clicks outside of it, which I got, except that now that I enforced that, the menu closes when I try to open a submenu. I need to get...
javascript,html,onclick
I have the following code which creates new spans with some input fields: function add_course() { var newspan = document.createElement('span'); newspan.innerHTML = 'Degree: <input type="text" name = "degree[]"> Course: <input type="text" name = "course[]">'; document.getElementById('degree_course').appendChild(newspan); } function add_skill() { var newspan = document.createElement('span'); newspan.innerHTML = 'Skill: <input type="text" name =...
javascript,html,replace,onclick
My code <!DOCTYPE html> <html> <body> <input type="text" id="text" value=""><br> <button onclick="myFunction()">Submit</button> <script> function myFunction() { var str = document.getElementById("text"); var res = str.replace("1", "2"); document.getElementById("text") = res; } </script> in input field i am taking some input from user on (click) submit i want to replace all 1 with...