15,120 Topics
| |
Hi all, I have taken from net drop down menu script my web page is medistyle.az. It works perfectly but when i look up code i cannot understand one thing there below is code (js. file) var menu=function(){ var t=15,z=50,s=6,a; function dd(n){this.n=n; this.h=[]; this.c=[]} dd.prototype.init=function(p,c){ a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, … | |
Hello, I want to click the skip ad buttom when the buttom appears, can someone please explain me how this can be done using jquery? Here is the Code <!DOCTYPE html> <html> <body style="margin:0px;padding:0px;"> <iframe src="http://bc.vc/7VsNj6" style="width:100%; height:100%; border:none;" id="frame"> <p>Your browser does not support iframes.</p> </iframe> </body> </html> Thanks … | |
I'm trying to build a [quiz](http://www.fedtech.com/Cutting-Quiz) that takes the answers given and when you hit submit, it totals the number of items in each category and sends you to a specified page... It's basically perfect except one thing... it doesnt take you to a page when the totals are added … | |
For the sake of learning, I'm just curious how I can simplify these functions? Open to any suggestions... Please forgive all the over-commenting. $(document).ready(function() { // code for random backgorund image on page load $("#full-size-background").css("background-image", "url(images/backgrounds/" + Math.floor(Math.random()*3) + ".jpg)"); // starting point fade when "menu" clicked $("#starting_point_link").on("click", function(){ $('#starting_point, … | |
How to change the following code for javascript to php code plz help me. <form> <select onChange="updatecalendar(this.options)"> <script type="text/javascript"> var themonths=['January','February','March','April','May','June', 'July','August','September','October','November','December'] var todaydate=new Date() var curmonth=todaydate.getMonth()+1 //get current month (1-12) var curyear=todaydate.getFullYear() //get current year function updatecalendar(theselection){ var themonth=parseInt(theselection[theselection.selectedIndex].value)+1 var calendarstr=buildCal(themonth, curyear, "main", "month", "daysofweek", "days", 0) if (document.getElementById) … | |
I am having problems accessing what for me is a complex JSON object. I successfully interrogated the Open Weather API and received a good response. What I am not accessing, and don’t know how to, is the individual items of the weather portion of the list group while in a … | |
html <div class="example2"> <p>This is some text This is some textThis is some textThis is some textThis is some text This is some textThis is some textThis is some textThis is some textThis is some text</p> </div> Css .button{ -moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; -moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 1px rgba(0, … | |
Hello, there is a function which saves and sends post request: save_car: function(e) { if (e.keyCode != 13) return; if (!this.brand.val()) return; Cars.create({brand: this.brand.val(), color: this.color.val(), max_speed: this.max_speed.val() }); this.brand.val(''); this.color.val(''); this.max_speed.val(''); }, Request URL:http://localhost/backbone/car_list/backend/index.php/welcome/index Request Method:POST Status Code:200 OK Request Headersview source Accept:application/json, text/javascript, */*; q=0.01 Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en,lt;q=0.8,en-US;q=0.6,ru;q=0.4,pl;q=0.2 … | |
I've gotten this far on setting up popstate() - a totally new thing for me. I have loaded content for each click of the navigation, and pushstate() changes the url. But it doesn't load anything when the back button is pressed. Only when I've pressed the back button enough, that … | |
I am currently stuck with problem of set the dll file location path in my javascript object, in the classid i currently do this: "classid="http:RFID_AUCMS.dll#RFID_AUCMS.Main" This work fine if i put the dll file in same folder with the project module file( aspx). However I actually needs to put the … | |
Hi, I have a scenario where in I had to sort an array, find duplicates and increment one or the other by 1. So, Eg: An array has 22, 23, 21, 21, 24 within it then, an array should be able to find 21 and increment it by 1 i.e. … | |
Hi... I have a simple function for loading php pages into the index.php file. I'm wanting to incorporate pushstate() so I can start making the page crawlable. But not sure how. Here's my starting point (which just gives me "http://www.site.com/undefined" // function for navigation clicks $("#top_nav li a, #footer_info").on("click", function(e){ … | |
Hello I have this similar code: var SomeVar = Class.create({ one: null, two: null, three: null, initialize: function(one, two) { this.one = one; this.two = two; }, startListeners: function() { $j('#somediv1').mousedown(function(e) { this.three=3; three="hi" }.bind(this)); $j('#somediv2').mousedown(function(e) { console.log(this.three); console.log(three); }.bind(this)); }, }); As you see there are more can one … | |
Hello, Whilst writing this I actually fixed the issue but I thought I'd post anyway as this technique might be useful to others... I have a javascript class I wrote (alas I can't post the whole code as the IP technically belongs to the company I work for) which presents … | |
Hi: i have contact form that i thought the validation (.js + php) worked fine because i received emails that were only submitted w/ all fields correctly filled in. i added submission to mysql database, then found out that empty fields were being submitted to database -- but not email.. … | |
Can anyone pls help me with how to create a Progress Bar by using JavaScript methods like setInterval() ? | |
Hello you wonderful people you. I am getting most upset with a pathetically unimportant bit of code. I have an iFrame. This iFrame loads a php script, the php script is not however html, it is a pdf document generated on the fly with FPDF. I have a second iFrame, … | |
Hi anyone can help, am having this error on line 10: uncaught TypeError: Cannot read property '0' of null. I have use the same code other places, same array but never got this error. I dont know why am having this error here. this.addEventListener("message",function(e){ importScripts('test.js'); var object=e.data; object=JSON.parse(object); mArray=object.array; var … | |
Hi: i have site contact form that validates required fields w/ .js And php. if browser has javascript turned on, the req'd info error message will show next to the field boxes .. if javascript is turned off, then user will see the same thing but coming from php instead... … | |
I have a carousel that works fine on it's own, but something's killing it when I load its page into my main page. Not sure what would cause it? i'm using "Caroufredsel". Here's the main page, with script to load page based on which navigation selected. If the user selects … | |
For a script that needs to be run on multiple pages with different coding etiquettes, I need to be able to figure out when there is some dynamic change occuring in the DOM. MutationObservers cater for Chrome and Firefox but I'm having problems with IE so onpropertychange event is something … | |
Hello This is one of those stupid questions but you gotta ask to be sure What is var h=0; h += 5; var l=0; l -= 5; Is it the same as: var h=0; h = h+ 5; var l=0; l = l- 5; Thanks and sorry for the stupidity | |
I want to show popup on item selected in dropdown control. I tried popup script on this but doesn't works. my code is as below <select> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1994</option> </select> now if I have select option i.e 1992 popup window should display the … | |
I am having trouble animating a div on the same page as the div that is not animating. Here is my code: Page 2 <?php mysql_connect('127.0.0.1', 'root', ''); mysql_select_db('table'); $query = mysql_query("SELECT * FROM `blog`"); ?> <script> $('.post').click(function() { var value = $(this).attr('rel'); $('.load_post').html('Loading...').load('load_post.php?value='+value); $('.load_post').animate({"left": "-=1500px"}, "slow"); $(".posts").animate({"left": "-=1500px"}, "slow"); … | |
Not sure if I can do this but I'm reading through JavaScript: The Definitive Guide, and I'm going to be posting practice scripts that work. They may not make sense, but they work. I'd also like responses on how these simple snippets could be used and how they can be … | |
We recently had our account suspended (without warning - thanks 1&1) due to exceeding server load. The reason this happened was there were quite a few divs that were refreshing (via Ajax) every 9 seconds to give a 'live update' on the site (it is a sports site so this … | |
<head runat="server"> <title>Untitled Page</title> <script type="text/javascipt"> function startDownload() { var url='E:files\\sample.pdf'; window.open(url,'Download'); } </script> </head> <body> <form id="form1" runat="server"> <script type="text/javascript"> function openPopup() { popupwindow=window.open("Form.aspx",'WinName','width=900,height=500,left=200,top=200'); } s=alert("show"); s1=setTimeout("startDownload()",10000); </script> <div> <a href="" onclick="openPopup();return false" target="_blank">Click here to view Brochure</a> </div> </form> </body> | |
I am making a google chrome extension which pops out a div when you click on the comment box on a post in facebook and everything seems to be working perfectly. Except it only works for the posts that are first loaded with the site and not the ones which … | |
Hi I have an event listener attached to something which will fire a lot based on some user action that has occured on the page or some javscript change. Unfortunately it will be something like 5 or 6 fires in the space of 250ms and I am only interested in … | |
Dear Friends, I've generated Image Slider using WOWSlider. Now I wants to add tooltip to that Image Slider. It's mean, when user hover mouse on the each slider each tooltip should be displayed. How can I do it?? Please help me friends. |
The End.