15,121 Topics
| |
I want to create a contact manager in javascript. It will contain two initial contacts: John Smith and Jane Doe. Each contact should have a first and last name. Also user must be able to create a new contact. Contacts must be added in array. Program will be with switch … | |
<!DOCTYPE html> <head> <title>Traffic Light Sequence</title> </head> <body> <script> function Light(){ if (document.getElementById("Img").src ="Stop-Amber.png"){ then document.getElementById("Img").src = "Stop.png" } else if (document.getElementById("Img").src ="Go.png"){ then document.getElementById("Img").src = "Stop-Amber.png" } else if(document.getElementById("Img").src ="Amber.png"){ then document.getElementById("Img").src = "Go.png" } else if (document.getElementById("Img").src ="Stop.png") { then document.getElementById("Img").src = "Amber.png"}} </script> <button type="button" onclick="Light()"> Change … | |
Hello i made a search box and i want to make a link what will pass the search word that the user put in the search box. e.g. http://localhost/myproject/allSearches.php?searchword=aa **aa** is what the user put for search. Now i want to get that, sort it and return the data. I … | |
Hello all, I am facing some problem what i have now is there are images render in a div and and there anchor tag inside div when user clicks on image an overlay screen will open where i have to display pdf files i have used TouchPdf plugin now what … | |
https://www.daniweb.com/digital-media/ui-ux-design/threads/462158/how-to-play-multiple-video-using-html5 How is the back button done. I have tried a few videos like this (function prevButton() myVideo.pause(); myVideo.currentTime=0; index = index - 1; if(index==videoList.length) index = 0; alert(videoList[index]); myVideo.src = 'videos/'+videoList[index]; window.currentVideoName=videoList[index]; myVideo.play(); ) but the first video is "Undefined" when you click the button back. | |
I want to make a website showing the result of exams that are conducted in India. I want the user to enter his/her Roll Number in the form created at my website and as he/she press enter. His/her results should be displayed on the page. I have a several websites … | |
Hi guys I wonder if you can help me with this as it's driving me absolutely crazy. So, I have a div, in the first screenshot which looks pretty much like a scale and can be rotated right up to 45 degrees and left up to -45 degrees ![arm_0.jpg](/attachments/large/2/7fbaf6a4b6f6140020d69bcf00526f0c.jpg "align-center") … | |
Hi, Been looking for a way to get value of items within a handler object. From the below i would need to call the value of the image with console.log(this.image);. I doubt that is the way to do it. but I cannot find something that can point me in the … | |
I was installing some modules in Drupal 7. Suddenly, the helpful buttons across the top for admin mode disappeared. Can anyone tell me what happened and what I have to do? I am able to go to {website}/admin and essentially see the same buttons on the page that, I guess, … | |
i want to refresh multiple div value without refreshing the whole page using one function. <div class="live_update" id="a">33</div > <div class="live_update" id="b">34</div > <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script> function autoRefresh_div() { $('.live_update').load('Dashboard.php' + ' .live_update'); } setInterval('autoRefresh_div()', 1000); </script> | |
Flowchart in computing grades using switch case .. | |
I'm writing a small PHP system to register groups, the groups are of four category, namely men, women, youth and both(men and women) category, i'm not good in javascript but i have tried to write small javascript code which invoke a text box when a user choose men category. What … | |
I've attached a picture of how I'm coding the given problem, but i'm certain i'm doing it wrong. could anyone please guide me how to go ona bout the problem? thanks | |
Im trying to make two buttons a yes button and a no button and I want it to show how many time some one click on a button plz some one help | |
Hello i want to do a count from 1 to 30 (1,2,3,4,5,6,7,8,9 etc) with javascript I did this var i = 1; if(i<=30) { i++; } '<span>#'+i+'</span>' all good but the count starts from 0 not 1 as wanted | |
Hello i am getting an error TypeError: data is null i can't find the error. js <script> $(document).ready(function() { username='<?php echo $_GET['public_username']; ?>'; apiBaseUrl='<?php echo $base_url; ?>'; singleArtist(apiBaseUrl,username); }); function singleArtist(apiBaseUrl,username) { var html =''; var encodedata=JSON.stringify({"username":username}); var url=apiBaseUrl+'api/singleArtist'; ajaxPost(url,encodedata, function(data) { if(data.length) { $.each(data, function(i,data) { html += 'dddddd'; … | |
hi every body, i want to add row in my table html using javascript but i use methode append(), when i refresh my page, the row disappears and I want it to remain in the table. please help for me. thank | |
hi guys, I came across something rather interesting today. Basically at the moment I'm trying to add multiple spans with a background image to a horizontal div so that the final product looks something like a large ruler ( I use an image with a little black tick to simulate … | |
I was able to produce what I want using Adobe Animate. I want to reduce the amount of [code](http://codepen.io/Sheep/pen/VPPyOJ), as Animate inserts extra code that from my perspective seems useless ? | |
hi i have the following form where a member chooses how long they want to be be displayed on another page like example below <select name="hours"> <option value="1"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="1") { echo "selected"; } ?><?php }?>>1</option> <option value="3"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="3") { echo "selected"; } ?><?php }?>>3</option> <option value="6"<?php … | |
Here is my HTML Code: <div class="container"> <div class="row db-padding-btm db-attached"> <div class="col-xs-12 col-sm-3 col-md-3"> <div class="db-wrapper"> <div class="db-pricing-eleven db-bk-color-one"> <div class="price"> <sup>$</sup>99 <small>per quarter</small> </div> <div class="type"> BASIC PLAN </div> <ul> <li><i class="glyphicon glyphicon-print"></i>30+ Accounts </li> <li><i class="glyphicon glyphicon-time"></i>150+ Projects </li> <li><i class="glyphicon glyphicon-trash"></i>Lead Required</li> </ul> <div class="pricing-footer"> <a … | |
Hello. In my editor shows that there is a syxtax error in this function. Does anyone knows whats the syntax error? !function(i,t){var e=function(i,t,e){var s;return function(){function n(){e||i.apply(o,r),s=null}var o=this,r=arguments;s?clearTimeout(s):e&&i.apply(o,r),s=setTimeout(n,t||150)}};jQuery.fn[t]=function(i){return i?this.bind("resize",e(i)):this.trigger(t)}}(jQuery,"smartresize"),function(i){i.Gal=function(t,e){this.element=i(e),this._init(t)},i.Gal.settings={selector:".item",width:225,gutter:20,animate:!1,animationOptions:{speed:200,duration:300,effect:"fadeInOnAppear",queue:!0,complete:function(){}}},i.Gal.prototype={_init:function(t){var e=this;this.name=this._setName(5),this.gridArr=[],this.gridArrAppend=[],this.gridArrPrepend=[],this.setArr=!1,this.setGrid=!1,this.setOptions,this.cols=0,this.itemCount=0,this.prependCount=0,this.isPrepending=!1,this.appendCount=0,this.resetCount=!0,this.ifCallback=!0,this.box=this.element,this.options=i.extend(!0,{},i.Gal.settings,t),this.gridArr=i.makeArray(this.box.find(this.options.selector)),this.isResizing=!1,this.w=0,this.boxArr=[],this._setCols(),this._renderGrid("append"),i(this.box).addClass("gridalicious"),i(window).smartresize(function(){e.resize()})},_setName:function(i,t){return t=t?t:"",i?this._setName(--i,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(60*Math.random()))+t):t},_setCols:function(){this.cols=Math.floor(this.box.width()/this.options.width),this.cols<1&&(this.cols=1),diff=(this.box.width()-this.cols*this.options.width-this.options.gutter)/this.cols,w=(this.options.width+diff)/this.box.width()*100,this.w=w;for(var t=0;t<this.cols;t++){var e=i("<div></div>").addClass("galcolumn").attr("id","item"+t+this.name).css({width:w+"%",paddingLeft:this.options.gutter,paddingBottom:this.options.gutter,"float":"left","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","-o-box-sizing":"border-box","box-sizing":"border-box"});this.box.append(e)}this.box.find(i("#clear"+this.name)).remove();var s=i("<div></div>").css({clear:"both",height:"0",width:"0",display:"block"}).attr("id","clear"+this.name);this.box.append(s)},_renderGrid:function(t,e,s,n){var o=[],r=[],a=0,h=(this.prependCount,this.appendCount),d=this.options.gutter,p=this.cols,c=this.name;i(".galcolumn").width();e?(r=e,"append"==t&&(h+=s,a=this.appendCount),"prepend"==t&&(this.isPrepending=!0,a=Math.round(s%p),0>=a&&(a=p)),"renderAfterPrepend"==t&&(h+=s,a=s)):(r=this.gridArr,h=i(this.gridArr).size()),i.each(r,function(e,s){var n=i(s),r="100%";n.hasClass("not-responsive")&&(r="auto"),n.css({marginBottom:d,zoom:"1",filter:"alpha(opacity=0)",opacity:"0"}).find("img, object, embed, iframe").css({width:r,height:"auto",display:"block","margin-left":"auto","margin-right":"auto"}),"prepend"==t?(a--,i("#item"+a+c).prepend(n),o.push(n),0==a&&(a=p)):(i("#item"+a+c).append(n),o.push(n),a++,a>=p&&(a=0),h>=p&&(h-=p))}),this.appendCount=h,this.itemCount=a,"append"==t||"prepend"==t?("prepend"==t&&this._updateAfterPrepend(this.gridArr,r),this._renderItem(o),this.isPrepending=!1):this._renderItem(this.gridArr)},_collectItems:function(){var t=[];return i(this.box).find(this.options.selector).each(function(e){t.push(i(this))}),t},_renderItem:function(t){var e=this.options.animationOptions.speed,s=this.options.animationOptions.effect,n=this.options.animationOptions.duration,o=this.options.animationOptions.queue,r=this.options.animate,a=this.options.animationOptions.complete,h=0,d=0;r!==!0||this.isResizing?(i.each(t,function(t,e){i(e).css({opacity:"1",filter:"alpha(opacity=1)"})}),this.ifCallback&&a.call(t)):(o===!0&&"fadeInOnAppear"==s?(this.isPrepending&&t.reverse(),i.each(t,function(s,o){setTimeout(function(){i(o).animate({opacity:"1.0"},n),d++,d==t.length&&a.call(void 0,t)},h*e),h++})):o===!1&&"fadeInOnAppear"==s&&(this.isPrepending&&t.reverse(),i.each(t,function(e,s){i(s).animate({opacity:"1.0"},n),d++,d==t.length&&this.ifCallback&&a.call(void 0,t)})),o!==!0||s||i.each(t,function(e,s){i(s).css({opacity:"1",filter:"alpha(opacity=1)"}),d++,d==t.length&&this.ifCallback&&a.call(void 0,t)}))},_updateAfterPrepend:function(t,e){var s=this.gridArr;i.each(e,function(i,t){s.unshift(t)}),this.gridArr=s},resize:function(){this.box.find(i(".galcolumn")).remove(),this._setCols(),this.ifCallback=!1,this.isResizing=!0,this._renderGrid("append"),this.ifCallback=!0,this.isResizing=!1},append:function(t){var e=this.gridArr,s=this.gridArrPrepend;i.each(t,function(i,t){e.push(t),s.push(t)}),this._renderGrid("append",t,i(t).size())},prepend:function(t){this.ifCallback=!1,this._renderGrid("prepend",t,i(t).size()),this.ifCallback=!0}},i.fn.gridalicious=function(t,e){return"string"==typeof t?this.each(function(){var s=i.data(this,"gridalicious");s[t].apply(s,[e])}):this.each(function(){i.data(this,"gridalicious",new i.Gal(t,this))}),this}}(jQuery); | |
Hello every one i am having one doubt i have a set of links[url].Now there is pave ackages like 6 links,25 links package. if two user select 6 link each day and both will have same links[url] .now i when user log in then on adversitment page he visit each … | |
HI guys, I wonder if you can help me at all. I'm going to be involved in a "data visualization" project, meaning that I have to find a good way to visualize some data. What do you mean I hear you say? Well, we have some data and we have … | |
I have built a website for a client, which looks fine on my machine and in an emulator, but alas won't load for the client. They said it is fine on windows, but not on a mac, where they seam to be using chrome. Looking at the screenshots, it appears … | |
..... for (i = start_from; i < finish_by; i++) { var todayObj = new Date(); var current_hour = todayObj.getHours(); console.log(current_hour); var dateObj = new Date(date); if((dateObj.toDateString() == todayObj.toDateString()) && i<=current_hour){ /*no print*/ }else{ var time_in_12 = contvert_in_12_hours_time(i,(i+1)) content += '<div class="col-md-10 col-md-offset-1 avail_time">\n\ <input title="Book time slote" type="button" class="set_appoint_time unselected_time" … | |
I have a Shared Module which is imported in 2 Lazy Loaded Modules viz. Projects Module and Store Module app.routing.ts file has Root Routes declarations Contents of Menu Component: It contains app-wide links to major sections of app like projects, store... I want menu to be part of lazy loaded … | |
NOTE: Viewed and tested in MS Edge 25.10586.627.0 MS EdgeHTML 13.10586 https://jsfiddle.net/qgg86g7y/1/ As you can see in the fiddle, if 50 elements are displayed and calculated, a scroll bar will appear. 51 or more and the scrollbar will not appear, and scrolling is impossible. Is anyone else seeing this behavior? … | |
Sir I have these codes <input type="text" size="11" name="f_date1" id="datepicker-13" value="<?php echo date('d-m-Y', strtotime($f_date1));?>"/> <input type="text" size="11" name="t_date1" id="datepicker-133" value="<?php echo date('d-m-Y', strtotime($t_date1));?>"/> <script> var ja = jQuery.noConflict(); ja(document).ready(function() { ja("#datepicker-133").datepicker({dateFormat:'dd-mm-yy'}).on("change",function(){ var f_date1 = $("#datepicker-13").val(); var t_date1 =$("#datepicker-133").val(); var data = { ff_date1: f_date1, tt_date1: t_date1 } alert(data) $.ajax({ url: … | |
I am creating a web service to interact with a database and it is supposed to perform the CRUD operations. Right now it works fine with the read and post operation the WCF service supposed to have a method that is called from within jQuery whenever the page completes load … |
The End.