Posts

html - jQuery click on button will show the div and again click on any area of the page will hide the div? -

i have markup this. button click. <div class="logout-wrap"> <div class="account-info"> <a href="../profile.php">admin admin</a> </div><!--.account-info--> <div class="account-info-icon"> <ul> <li><a href="" class="account-sprited notice"><span>5</span></a></li> <li><a href="" class="account-sprited profile profiletest"></a></li> </ul> </div> </div> it area default hide , when click on button show div contents. <div class="account-info-box" style="display: block;"> <div class="top-info"> <div class="profile-img"> <img alt="" src="../images/profile.png"> </div><!--.profile-img--> <div class="profile-text"> <span class=...

Adding options in JavaScript functions that could use later -

i developing small javascript framework, need know how add options function, user can set own settings particular method. this sample function method have created $.prototype = { setcenter: function() { this.e.style.position = 'absolute'; this.e.style.top = '50%'; this.e.style.left = '50%'; this.e.style.marginleft = '-50px'; this.e.style.margintop = '-50px'; return this; } }; i expecting developed handle below options sets. *i not using jquery, need pure javascript solution this. example code, maybe not real thing , idea. $('samplediv').setcenter({ animate:true, fade:true }); help me solve problem, appreciate tries answer this. thank ! you implement main function way : this.dosomething = function() { var getdefault = function(args, property, otherwise) { return args[property] !== undefined ? args[property] : o...

android - How to highlight a button when is pressed? -

i'm making andorid quiz , want highlight button when it's clicked when user lets go of button turns in original colour. see i've set background of button buttons can rounded. i've set in drawable. <button android:id="@+id/btn1" android:background="@drawable/roundedbutton" android:textcolor="#ffffff" android:textstyle="italic" android:layout_width="225sp" android:layout_margintop="23sp" android:layout_height="38sp" android:layout_alignleft="@+id/btn2" android:layout_below="@+id/textview1" android:text="button" /> roundedbutton.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <solid android:color="#848482"/> <!-- 1 ths color o...

android - Updating Marker in google map -

i using google map in app. storing lat-long , test type in database. retrieving value database , showing marker on google map. using 2 different image test type. if test type manual using red image if test type auto using blue image. here code retrieve value , showing on google map public void setpinonmap(){ try{ cursor pinrecordcursor = mtestpinrecordhandler.getpinfromdatabase(); mpinmarkerlist = new arraylist<testpinmarker>(); if(pinrecordcursor != null && pinrecordcursor.movetofirst()) { {//string testname, string testtype, string latitude, string longitude testpinmarker markers = new testpinmarker(pinrecordcursor.getstring(1),pinrecordcursor.getstring(2), pinrecordcursor.getstring(3),pinrecordcursor.getstring(4)); mpinmarkerlist.add(markers); }while(pinrecordcursor.movetonext()); ...

javascript - Show data after query - Google Charts -

i have data-table (in google chart) , want send url connecting data-table , sending query , after show data in page web, javascript. how can it? here code. <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title> google visualization api sample </title> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1.0', {packages: ['corechart']}); </script> <script type="text/javascript"> function sendquery(yyy) { var query = new google.visualization.query('http://localhost:8080/xxx-da...

sql - How to convert yyyymmdd to dd-mm-yyyy in Oracle? -

i have column contains dates in varchar2 varying formats such 19.02.2013, 29-03-2013, 30/12/2013 , on. annoying of 20130713 (which july 13, 2013) , want convert dd-mm-yyyy or dd-mon-yyyy. if column contains various formats, you'll need deal each one. assuming question includes all known formats, have couple of options. you can use to_char/to_date. dangerous because you'll sql error if source data not valid date (of course, getting error might preferable presenting bad data). or can rearrange characters in string based on format. little simpler implement, , doesn't care delimiters are. method 1: case when substr(tempdt,3,1)='.' to_char(to_date(tempdt,'dd.mm.yyyy'),'dd-mm-yyyy') when substr(tempdt,3,1)='-' tempdt when length(tempdt)=8 to_char(to_date(tempdt,'yyyymmdd'),'dd-mm-yyyy') when substr(tempdt,3,1)='/' to_char(to_date(tempdt,'...

unwanted navigation bar resizing issue (CSS and HTML) -

i have built navigation bar using html , css , functions perfectly. issue when either of 2 gallery pages selected, positioning of navigation bar moves upward. im not sure issue lies (it seems quite specific since cant find similar issue here nor on google). note: gallery html page has css content written in because if content included using php's include statment (as on other pages), gallery slideshow images distorted/streched reason. either way though, navigation bar issue present. html services page (a non-gallery pager): <?php //if browser ie, displays ie specific navbar if(strpos($_server['http_user_agent'], 'msie') !== false) {include('navbarie.php');} //if browser else, include original navbar file else include('navbar.php'); ?> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang=...