14,390 Topics

Member Avatar for
Member Avatar for pooran.c

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 …

Member Avatar for lambing
0
219
Member Avatar for Eyeteeorg

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 …

Member Avatar for Eyeteeorg
0
217
Member Avatar for Kullercode

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 …

Member Avatar for amrita111
0
302
Member Avatar for newbiecoder

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>' + …

Member Avatar for radhakrishna.p
0
1K
Member Avatar for varma51

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 …

Member Avatar for diafol
0
227
Member Avatar for Eyeteeorg

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 …

Member Avatar for urtrivedi
0
81
Member Avatar for vizz

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

Member Avatar for vizz
0
118
Member Avatar for Eyeteeorg

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 …

Member Avatar for Eyeteeorg
0
193
Member Avatar for Kullercode

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

Member Avatar for GliderPilot
0
135
Member Avatar for rem2

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 …

Member Avatar for rem2
0
212
Member Avatar for hwoarang69

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 …

Member Avatar for hwoarang69
0
130
Member Avatar for Eyeteeorg

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 …

Member Avatar for Eyeteeorg
0
237
Member Avatar for chris99

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: …

Member Avatar for chris99
0
235
Member Avatar for Eyeteeorg

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?

Member Avatar for Eyeteeorg
0
192
Member Avatar for wolfgangcs

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 { …

Member Avatar for wolfgangcs
0
226
Member Avatar for runlevel3nut

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 …

Member Avatar for wolfgangcs
0
280
Member Avatar for ajitdas57

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&quot;>car insurance quotes</a> where the boxes are next to each other, and will …

Member Avatar for Taywin
0
100
Member Avatar for Martin C++

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 …

Member Avatar for AleMonteiro
0
141
Member Avatar for rpgowned

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 …

Member Avatar for AleMonteiro
0
170
Member Avatar for chris99

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 …

Member Avatar for EvolutionFallen
0
160
Member Avatar for giovannitao

Hello, Some one can help me to customize a classic dropdown select menu to this: [Click Here](http://i45.tinypic.com/x6bpnb.png) Thanks

Member Avatar for AleMonteiro
0
63
Member Avatar for mattsearle

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 …

Member Avatar for mattsearle
0
173
Member Avatar for vizz

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 …

Member Avatar for vizz
0
289
Member Avatar for germainelol1

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 …

Member Avatar for LastMitch
0
381
Member Avatar for secretply

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 …

Member Avatar for AleMonteiro
0
134
Member Avatar for jemz

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 …

Member Avatar for stbuchok
0
101
Member Avatar for dany12

My code is for wordpress in noconflict mode This code works only on double click not on a single click,any advice or guideness is welcomed. I want to make it work on a single click. Thank you in advance $j=jQuery.noConflict(); $j(document).ready(function() { $j("#icomenu").toggle(function(){ $j("#menu").animate({left:"0px"}); }, function(){ $j("#menu").animate({left:"-280px"}); }) }) ;

Member Avatar for dany12
0
237
Member Avatar for varma51

<form method="post" action="#"> <table> <tr> <td></td> <td><input name=cars type=radio value=a>Volkeswagon</td> <td><input name=cars type=radio value=b>Ford</td> <td><input name=cars type=radio value=c>Honda City</td> <td><input name=cars type=radio value=d>Renault</td> </tr> <tr><td> <input type="submit" value="submit"></td></tr> </form> > Quoted Text Here so when i did page refreshing after the radiobutton selection.the radiobutton can display as unchecked. can u …

Member Avatar for gon1387
0
797
Member Avatar for jonsan32

Is there any way to get this to work in Internet Explorer? It shows/hides multiple rows in every other browser, but will only show one class's row in IE. Any help would be great. Here's the code. Thanks! <style type="text/css"> li.merk { list-style:none; display: block; width: 925px; padding:8px; margin-top:-20px; } …

Member Avatar for Airshow
0
707
Member Avatar for karlcunanan

Good day Geniuses! I am a beginner and would like to ask for your assistance regarding my Javascript not working ONLY in IE :( I dont know where to start debugging since I only use Chrome and Firefox for testing. Hope someone can help me on this. Javascript <script type='text/javascript'> …

Member Avatar for gon1387
0
1K

The End.