15,127 Topics
| |
Hi guys I got a code from a website header menue from a website,It's a combination of JS, and CSS. Right now I have the following code: <script> $("#menu-images").Menu({ dataSource: [ { text: "Dashboard", imageUrl: "images/home.png", }, { text: "Catalog", imageUrl: "images/AdminCatalog.gif", items: [ { text: "View Products"}, { text: … | |
i have a xhtml page which has has login box . onload of the page, a scripts is called which hides the box , and on pressing login link one more scripts displays box (login box is in div tags). now the problem is when user enters the wrong login … | |
As part of studying how to use switch, I wrote this .js script that's supposed to obtain user input, evaluate whether the user input a number, a string or mixed output, and then return the appropriate output. The prompt() command works fine but the alert() commands produce empty output. I'm … | |
Just started learning JavaScript can someone please tell me what is wrong with this code <!DOCTYPE html> <html> <body> <h1>Password Requirement</h1> <p id="demo">Please enter your password</p> <input id="myInput" type="text" > <script> function myFunction() var a=document.getElementById("demo") var b=document.getElementById("myInput").value var c=document.getElementById("myBtn") if (b=="26a8f9e"(b)) { alert("Correct") } else { alert("Incorrect") } </script> <button … | |
Hi , I have table created by Json : function show(json) { var content = '<tbody>'; var counter; for(counter = 0; counter < json.length; counter++) { content += '<tr><td>' + json[counter]['id'] + '</td>' + '<td>' + json[counter]['time'] + '<td>' + json[counter]['fullname'] + '</td>' + '<td>' + json[counter]['message'] +'</td>' +'<td>' + … | |
hii this my code.the problem is i'm changing the background color for an header using on click function in javascript.but wen i did page refreshing the default background color is appearing.i want to dislay the changed background color of that header wen once on click function is done. please help … | |
Something similar to this code returns a variable undefined error: var firstVariable = ""; var secondVariable = ""; // later on... secondVariable = firstVariable.length alert("text text text " + secondVariable + " text text text.") I need secondVariable to be globally defined and accept string pushes for other purposes, so … | |
I want to **fade out** logo and **fade in** after **fade out** is completed $(".navlist li a").click(function() { $("#logo").fadeOut("slow").delay(850).fadeIn("slow"); }); This code is not working well. **fadeIn** occurs fastly I used values instead **"slow"** but it fade out correctly and fade in fastly | |
I'm just cutting my teeth on a few play projects in order to get better at javascript coding. Kindly have a glance at the following and comment on my general coding practices, as I want to get into the best habits right off the bat and break any bad habits … | |
I need to know what the different parts of this JavaScript code means.. var x=document.getElementById("demo").value; if(x==""||isNaN(x)) I know what the result of the code is but I need to know what things like; 'var', '(x==""||isNaN(x)) I know what the 'document.getElementById("demo").value;' means but the '(x==""||isNaN(x)) i don't understand | |
Hi there I'm making a project to show how some of algorithms work. Basically i needed to show some drawing pixel by pixel. I made the code below and tried to run it <script> function init() { var paper = Raphael(10, 50, 800, 600); var arr = []; var j … | |
i have never used ajax before so i want to make sure iam doing this right. this php code work fine. i didnt add it bc it was long code. but all it does it add one or sub one from database. <?php //if user hit like link add one … | |
Where am I going wrong in this code? // Eyetee's Third Toy V0.0. Copyright 2012 by Eyetee and not released. // Declare variables needed var string_to_be_examined = "This is a test string that can also be obtained from \ some other location." var substring_to_test_for var i = 0 var j … | |
I know the code, but not the tags to enclose it within. Current HTML: <!DOCTYPE html> <html> <head> <script language="JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#Reindeer').sortable(); }); </script> <script> if (window.XMLHttpRequest) { xmlHttp=new XMLHttpRequest(); } else { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlHttp.open("GET","xmlExample.xml",false); xmlHttp.send(); xmlDoc=xmlHttp.responseXML; function displayComments() { content=(x[i].getElementsByTagName("content")[0].childNodes[0].nodeValue); txt="Comment: … | |
As someone who is new to Javascript, I find it kind of odd that Javascript doesn't seem to have a != operator. Is there a rationale why the language was designed this way? | |
Hi guys, how would I translate the functionality of this anchor: <a style="font-size: small;" href="javascript:void(0)" onclick="document.getElementById('info').style.display='block';document.getElementById('fade').style.display='block';return false;">Blahblah</a> To an asp.net imagebutton control? This is what I have come up with: <asp:ImageButton ID="ImgBtn" runat="server" ImageUrl="~Images/Go.gif" OnClientClick="<script type='text/javascript'>document.getElementById('info').style.display='block';document.getElementById('fade').style.display='block';return false;</script>" /> But its not coming out the same way. Can anyone help me … | |
Grabbing this "loadcssfile" from http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml and added the check device. This is the best I have and I may just be entirly confused! I want to change the CSS file depending on the device before the rest of the page loads. function checkDevice(){ if(window.isiPad){ // do nothing } else { … | |
I've been learning Javascript on Codeacademy, but the site is so buggy and broken that the fact it's free of charge and breaks lessons down into small pieces isn't helping me. All I experience is frustration with the broken Run button and command parser, as well as the lazy and … | |
What is the html code to make horizontal boxes i need to make some boxes go from left to right but all i can find is on top of each other, you can see example here <a href="http://www.carinsurancequotesinformation.com">car insurance quotes</a> where the boxes are next to each other, and will … | |
As you can see from the title I am interested in making a shopping cart with javascript. What it should do is allow a client to add/remove products from the cart. Increase the quantity and have a visual overview of his cart. When he is finished he would go to … | |
I know there are many other threads on this but i can't seem to make heads or tails of them and make them work in my code. I have multiple dropdowns on a page with a yes/no answer each question has sub questions if yes is chosen.. I would like … | |
I'm having trouble getting my jQuery to work. The .js file is in the same folder as the homepage, and I'm trying to accordion a list using the effects plugin. Here's the jQuery code: $(document).ready(function(){ $('#accordion').accordion({collapsible:true, active: false}) }); Here's the homePage code: <!DOCTYPE html> <html> <head> <title>Santa's Workshop</title> <script … | |
Hello, Some one can help me to customize a classic dropdown select menu to this: [Click Here](http://i45.tinypic.com/x6bpnb.png) Thanks | |
Hi I am trying to use the code below more than once within a web page. I have tried changing the id's of the div, getElementid and outDiv, however only one of the scripts will work. Is the outDIV.innerHTML the problem. Inline Code Example Here <link rel="stylesheet" type="text/css"> <style> div … | |
I have 4 div's. **first div** is **Centre div**, 2nd div is **right** of **Centre div**, 3rd dis **left** of **Centre div** and 4th div is **above** of **Centre div** How to detect number of div's and create **Paginated bullet like map** showing position of each div. If number of … | |
I have the following `layout.jade` code !!! html head title= title link(rel='stylesheet', href='/vendor/bootstrap.min.css') link(rel='stylesheet', href='/css/style.css') script(type='text/javascript') (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); body!= body And the … | |
Is it possible to send data from a webpage but only certain parts of it? For example: Webpage from form: <html> <head> </head> <body> <div>Non-form data</div> <form method="post" action=""> <input type="text" id="field1" /> </form> <div>Other non-form data</div> <?php $field = mysql_real_escape_string($_POST["field1"]); // Database info echo $field . "is in the … | |
Hi guys, I have an ImageButton control in asp.net calling a javascript function to display it in block. The elements have their own css classes, but they do not appear in the context that I gave them. I am assuming this is a problem with my css because the javascript … | |
Hi, can i ask some help ,my problem is that how can i display in the dropdownlist using jquerry. for example that in my database i have 1 table and 2 columns with 10 records or rows. assume that i already querried all the colors in the database,but how to … | |
Hi, i have a html page with 3 frames(Index.html), and the preview is as in the screenshot. Here in Welcome.html i have a button named block. when i click this button i want left.html to be disabled(the frame in left side), i'm able to do it., but the form elements(the … |
The End.