15,127 Topics
| |
My site is www.jeremyspence.net78.net. As you scroll down I want to make the main menu dissapear(the one menu you see now) and another smaller menu (kinda like the apple menu from apple.com) appear on the top that is fixed, I was thinking about making a sticky menu, but I want … | |
As an exercise to help learn JS, I wrote a short bit of code that defines an array of random integers and then randomly logs one of them. Here's the code: var turkey = true var crud = [] for (i=0;i<10;i++) { j = abs(Math.random()* 10); crud.push[j]; } while (turkey) … | |
Hi again everyone.. Happy New Year. Hope yours was as good as mine. Would anyone know if Javascript can be used to create complex search queries. I see that you can bring up a Java Console in web browsers such as Chrome and Firefix and I was thinking that with … | |
i have made three drop downs month year day{1,2,3...} i want only valid day gets displayed in the drop down. i.e if jan is selected 31 is the upper limit if feb is selected 28 or 29 depending upon the year (leap or not) var monthselected,yearselected,mtype=0,visited=0; function reassembleDate(){ if(monthselected==4||monthselected==6||monthselected==9||monthselected==11) {mtype=30;} … | |
Have a look at this snippet: var changeNumber = function(number) { return number + 5; }; var newNumber = 4; changeNumber(newNumber); alert(newNumber); I've been taught that the function should reassign whatever value it returns to the global variable NewNumber, so that newNumber should change from 4 to 9. This doesn't, … | |
hello i want to write the given css code in javascript but it is not working i have the div with id one. below is the css code that is working fine ` <style> #one { width:96px; height:0px; left:204px; top:65px; z-index:2; position:absolute; background-color:#FFF; animation:myfirst 2s; -moz-animation:myfirst 2s; /* Firefox */ … | |
Hi, I have ajax call in my script which calls php file. I need to extract its response in two parts to add it on my page to different components each. For example, say I have these two echo statements in my php: echo "<option> add to list1 </option>"; echo … | |
I have some functions that I frequently use in a file called customLib.js. When I want to use one of the functions I copy its definition to the script where I want to use it. Could I upload it somewhere, like dropbox, and use a dropbox url as the src … | |
Hi, I am trying to disable the 'start' button after i click on 'start' button. Its not working. Please help. <html> <SCRIPT language="JavaScript"> <!--hide function newtext() { document.myform.mytext.disabled = true; setTimeout("moretext()",9000); } function moretext() { document.myform.one.disabled = true; } //--> </SCRIPT> </HEAD> <BODY> <FORM name="myform" method="post" action="sessionS1.php"> <table width='600' cellpadding='5' … | |
Hi, I click 'start' button, then start button is disabled as expected. Once I click start button, i want to see the values of f1 and f2 on first row , values of f3 and f1 on the second row. First row is working just fine. but the second row … | |
I have two immediate problems with the code I am working with. I have an area when I hover over it makes visible prompts to social media sites. But I don’t know how to keep the prompts visible while you choose the site that you want to visit. Secondly as … | |
Hi, Would you please help me how to store a value from java script into php variable? <SCRIPT language="JavaScript"> var q1=Math.floor(Math.random()*11) <? php $q1v = q1 ; ?> </SCRIPT> echo $q1v | |
Hi, I am trying to create a way where Javascript can do a loop between two Unix Timestamps to print out the dates and some html. I have created a way for this method to work in PHP. However, I need this same method to work in Javascript. Working PHP: … | |
Hi am using Ocanvas Javascript Library, i need to blur an image. how can i do this? | |
I have a basketball league with over 100 teams, and I'm trying to organize the look and feel of the schedule, standings, and gym locations for the coaches, players, and parents to view on my website. I'm wondering how I could apply something like the code I posetd below, but … | |
Hi.. I have a group of checkboxes and I want to apply a style to checked checkbox and remove the style of all other boxes.Here only one checkbox should be cheked at a time. The code I used as follows <script type="text/javascript" src="jquery-1.7.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".item").click(function(e) { //$(".item").each( … | |
$('#div').load('/controller/_partialview); <div id="div">"partial view"</div> does not work (does not load the partial view) in IE9 It works perfrectly on firefox and chrome What is the solution? thanks in advance | |
Hello everyone happy new year to all. i want get length of only fractional part of number in java script function. example if number is 4.321 then length of fractional part is 3. please help me. thank you | |
Hello all, newbie here with a, hopfully, easy question. I'm creating a simple site for personal use for family photos and things and I am having troable with my onclick only working once. I've searched the web bu found no answer that has solved my issue. I've stripped my code … | |
The variables in javascript are represented internally in which form..i mean wether ASCII or unicode or any other format..?? And what is the difference between unicode and UTF8 if there is any..?? | |
Hi there I have the following code. <script language="text/javascript"> banner1 = new Banner('banner1'); <?php $con = mysql_connect("localhost:3306","User","Pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("barndata", $con); $today = date("Y-m-d"); $result = mysql_query("SELECT * FROM event where Date >= '$today' ORDER BY Date ASC LIMIT 0, 7") ; … | |
This is a sample code i have <script type="text/javascript"><!-- google_ad_client = "ca-pub-1234567778889"; /* Firest add */ google_ad_slot = "4634587934"; google_ad_width = 574; google_ad_height = 50; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> When I paste this code in ad section it is being changed as given below <!-- google_ad_client = "ca-pub-1234567778889"; … | |
Hi, I am having trouble getting a video player to work using Javascript. I copied this from a page a developer at my company did, but he is away right now so I can't ask him for help. Here is the HTML: <div class="feature" style="width:485px; height:273px"> <div class="video-placeholder"> <img src="../../assets/images/figures/tro-video-placeholder.jpg" … | |
Dear All, I have one php based application now i want to make interactive application of the same . i started work on flex for php . but now the problem is menu . in current application i have javascript file for menu with few php code i want add … | |
If I enter same date for startdate and enddate fields(ex: startdate is 2012/12/29 and enddate is also 2012/12/29) then the following if condition executes and return false in javascript. var strtdate = document.getElementById("x_START_DATE").value; //getting task startdate var enddate = document.getElementById("x_END_DATE").value; //getting task enddate var task_StartDate = new Date(strtdate); var task_EndDate … | |
I have a script in which I would like new code to appear based on the response to a question. I am using 'onChange' to trigger the event. The difficulties I am having are that: 1) The format of the form changes after the event. I would like the new … | |
<!DOCTYPE HTML> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> <!---<script src="sisyphus.min.js"></script>---> <script type="text/javascript" src="https://raw.github.com/simsalabim/sisyphus/master/sisyphus.min.js"></script> <script> $(document).ready(function(){ $('#formElem').sisyphus(); }); </script> <script> $('#formElem').submit(function() { localStorage.clear(); }); </script> <script> function my() { var x= document.getElementById("q1").value; if( x!='NULL') { document.getElementById('d1').style.background='green'; } } function my2() { var y= document.getElementById("q2").value; if( y!='NULL') { document.getElementById('d2').style.background='green'; } } </script> … | |
I found a tutorial on how to build a php events calendar and this tutorial uses a mixture of php, Ajax and Javascript to form the calendar, everything works properly and displays well, up to the point of actually pulling up and displaying the events details which are pulled from … | |
Please tell me the best way to learn ajax.I want to do crud oprations in database using ajax wihout refreshing the page. thank you in advance. | |
Hi there I'm working on bresenham ellipse drawing and i have few problems <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Rasteryzacja Elipsy</title> <link rel="stylesheet" href="app.css" type="text/css" /> <script type="text/javascript" src="http://canvg.googlecode.com/svn/trunk/rgbcolor.js"></script> <script type="text/javascript" src="http://canvg.googlecode.com/svn/trunk/canvg.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="raphael.js"></script> <script src="svgfix-0.2.js"></script> <script> function toImg(){ var svg = $("#svg_drawing").html(); svg=svgfix(svg); … |
The End.