14,054 Topics

Member Avatar for
Member Avatar for samertaha

see this [html page](http://jsfiddle.net/samertaha/hRTw6/) cant understand why they populated the anchor with text this way : `a.appendChild(document.createTextNode('Hide details'));` why not this way with the innerHTML method ?? `a.innerHTML = 'View details';` thanks

Member Avatar for ryantroop
0
89
Member Avatar for samertaha

http://jsfiddle.net/samertaha/Y2ULV/ kindly see the visibility sample up here , in the first rows of the javascript , they declared some variables , but i couldnt understand why they declared a variable named toggle with no value or type. thanks. // Get references to page elements and create a link dynamically …

Member Avatar for ryantroop
0
162
Member Avatar for nouth
Member Avatar for nouth
0
155
Member Avatar for Siberian

function ty(pcheck) { document.write("I want "+pcheck); } var pcash = 500; ty(pcheck); Can the outside variable have a different name and the function still call it ? I read it can, so when I attempt it, it doesn't work ! function hu () { var one = "today"; var two …

Member Avatar for Siberian
0
161
Member Avatar for Priti_P

Hello, I want to creat array/s in javascripts. But array/s numbers (how many to arrays to be created) is depend on dropdown div length. I have calculated length of dropdown list using `$("#skill_type_name option").length)` But how to create arrays in javascripts in foor loop. array names can be array1[] array2[] …

Member Avatar for diafol
0
224
Member Avatar for kshahnazari

I wanted to start learning to scrap data from web and someone told me to use [htmlunit](http://htmlunit.sourceforge.net/gettingStarted.html) if you go the the website the first page is using java to run the htmlunit and there is no example about how to add the htmlunit jar files to javascript and how …

Member Avatar for pritaeas
0
98
Member Avatar for Siberian

Why won't this object, loop won't write ? function lw (bat,bat2,bat3) { this.bat = bat; this.bat2 = bat2; this.bat3 = bat3; } var what = new lw ("one","two","three"); for (var apple in what) { write(what[apple]+"<br/>"); }

Member Avatar for Siberian
0
129
Member Avatar for gotboots

Hi all, I have recently made a ajax script that works completely. It updates the database as required on click of the FU anchor. In the middle of the form I also have a yes | no option that copies the billing address to the shipping address, which also works. …

Member Avatar for Ralf_1
0
16K
Member Avatar for castajiz_2

I m new to javascript and I m little bit confused on how does a webpage read the actual script. let's say I have the folowing code: <script> vrijeme = document.getElementById("Label7").innerText; minute = vrijeme.substring(0, 2); sekunde = vrijeme.substring(3, vrijeme.length); alert("fuck you"); var start_time=setInterval(secondFunction, 1000); function secondFunction() { sekunde = sekunde …

Member Avatar for [NOPE]FOREVER
0
307
Member Avatar for RobotFX

So I'm trying to use a free service to get the visitor's location and redirect them to the proper page. The problem is that these free services don't always work; freegeoip has a limit of 10000 requests per day and I'm not sure about telize. What I want to do …

Member Avatar for [NOPE]FOREVER
0
580
Member Avatar for sussy123

I am baffled at this webform on my responsive site which works perfectly fine in all iOSdevices and android tablets. However on android smartphones, specifically samsung s3/s4 -when the text box is clicked- the keyboard appears for less than a second then suddenly disappears. Should a set focus rule be …

Member Avatar for [NOPE]FOREVER
0
3K
Member Avatar for Priti_P

I have formatted a string date into date format by using <script type="text/javascript"> var st = "26-04-2013"; var pattern = /(\d{2})\-(\d{2})-(\d{4})/; var dt = new Date(st.replace(pattern,'$3-$2-$1')); alert(dt); </script> and it's output is `Fri Apr 26 2013 05:30:00 GMT+0530 (IST)` but I want out put as `2013-04-26` how can i do …

Member Avatar for Priti_P
0
244
Member Avatar for Christian Joy

i am making an online quiz that has a countdown timer plugin: https://code.google.com/p/jquery-countdown/source/browse/trunk/js/jquery.countdown.js?r=3 everything is fine but if the user log out or close the browser then the timer will reset back to the default given time. i would like to know how to get the value of the timer …

0
113
Member Avatar for Affable zaki

I am using upload services and i have to use a request over http due to which IE gives me "Mixed Content" popup. My client do not want this. Is there any way to hide or handle it through java script or in Jquerry or C#? Additional Info: Web Application …

Member Avatar for cgeier
0
156
Member Avatar for rahulroshan

Hi I want to rename Image in this script after downloading ,now it downloads as default Want to rename it to x.png Any help appreciated Saw a way via PHPserver,but Im using JAVA App <html> <head> <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> function getImgData(chartContainer) { var chartArea = chartContainer.getElementsByTagName('svg')[0].parentNode; …

0
186
Member Avatar for nadiam

maybe i need to be more specific in where i post my questions coz i posted one in web development. so ill reiterate im trying out this cloning and toggling thing to see if they could work together. ive got a table like so: <table class="StateTable" rules="all" cellpadding="0" cellspacing="0"> <thead> …

Member Avatar for minitauros
0
3K
Member Avatar for Priti_P

Hi There, I had a multidimentional array with values. I wanted to convert it into JSON I tried it with : `json=JSON.stringify(skill_array);` But it gave me output as below: [["Language","C++","0","1","May 2014","ascasc"],["DataBase","C++","0","1","May 2014","ascasc"],["Language","C++","0","1","May 2014","ascasc"]] SO how can i convert it into JSON? in Javascript

Member Avatar for Priti_P
0
118
Member Avatar for nadiam

what i want to do is show form based on the value of a dropdown list. like if value 2 then what appears is two forms of the same form. example: <div> How many? <select name="options"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> </div> <div id="test"> </div> <form id="form1"> <table> …

Member Avatar for nadiam
0
365
Member Avatar for Priti_P

Hello There, Basically I want to print table from javascript. I have a multidimenational array global_arrayLength is lenght of that array In form I have defined an table with below code <div class='box1' id='show_this' name='show_this'> <div id='information-table'><table id='myTable'><tr bgcolor=#ff9966 id='0'> <td>Skill</td> <td>Skill Type</td> <td>Total Experience Year</td> <td>Total Experience months</td> <td>Last …

Member Avatar for Priti_P
0
219
Member Avatar for Priti_P

i have table with id myTable first tr is like: <tr bgcolor=#ff9966 id='0'> <td>Skill</td> <td>Skill Type</td> <td>Total Experience Year</td> <td>Total Experience months</td> <td>Last Used In</td> <td>Description</td> <td>Modify</td> </tr> when I am inserting values of one array into this table using for loop with below code: var html=""; var tr_id=/* I …

Member Avatar for Priti_P
0
414
Member Avatar for dhani09

I have a drop-down list, which contains a list of over 150 schools. Each school in this drop-down list is located in one of 30 states. What i'm trying to implement is this: If a user chooses a school from the "select" list, the text box below it would automatically …

Member Avatar for nadiam
0
273
Member Avatar for ownedbynothing_1

I have this particular snippet.. newcell.innerHTML = table.rows[0].cells[i].innerHTML; //alert(newcell.childNodes); switch(newcell.childNodes[0].type) { case "text": newcell.childNodes[0].value = ""; break; case "checkbox": newcell.childNodes[0].checked = false; break; case "select-one": newcell.childNodes[0].selectedIndex = 0; break; case "number": newcell.childNodes[0].value = ''; break; } the switch above makes the newly added rows to reset the value from the …

Member Avatar for ownedbynothing_1
0
278
Member Avatar for Jamie_4

I'm trying to get the text "Student 1, " to display in a text box but also have it as a link back to the student's page. This code displays only the url I want but not as a link and doesn't display "Student 1 " function getFavourite() { var …

Member Avatar for taersious
0
1K
Member Avatar for Priti_P

I have <div id='name' onchange='load_div()'> <b>Car Name : </b> <select name="carlist" form="carform"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option> </select> </div> <div id='name2' onchange='load_div()'> <b>second Car Name : </b> <select name="carlist" form="carform"> <option value="volvo2">Volvo</option> <option value="saab2">Saab</option> <option value="opel2">Opel</option> <option value="audi2">Audi</option> </select> </div> Here I have a link called "Add" …

Member Avatar for diafol
0
179
Member Avatar for mikeandike22

Ok so im using hubspot for inbound marketing and the have a thing called page grader that finds errors in your page. The most common warning is page has images without alt text. Since im dealing with a really big drupal site and dont want to go through every image …

Member Avatar for marta.johnsson
0
5K
Member Avatar for confstu

0 down vote favorite I want to ask all of you for some help since i'm still new to web programming. So basically i have html table like this, <table width='200' border='1'> <TH>Year 1 Spring</TH> <TR> <TD> <div id="y1f_0">one</div> <div id="y1f_1">one</div> </TD> <TD> <div id="y1s_0">two</div> <div id="y1s_1">two</div> </TD> </TR> </table> …

Member Avatar for dnyaneshk2
0
2K
Member Avatar for dhani09

I have an HTML dropdown list which i'm populating from a database. My question is how can i retrieve the value of a selected item from this dropdown list using AJAX? Thanks in advance.

Member Avatar for dnyaneshk2
0
6K
Member Avatar for nadiam

hey guys. im trying to show a dropdown list and hide input text when an option in another drop down list is selected. dropdown <select name="table-type" id="select-t"> <option value="" disabled selected>Types of Tables</option> <option value="Round Table" id="rt">Round Table</option> <option value="Banquet Table" id="bt">Banquet Table</option> <option value="Square Table" id="st">Square Table</option> </select><br> No. …

Member Avatar for nadiam
0
259
Member Avatar for Priti_P
Member Avatar for Priti_P

Hello, I have a form in which , I have DIV1. Selecting option from DIV1 another DIV2 gets open and form is filled. But I want after filling DIV2, its values should get refreshed to default ones. How can I do this in JS?

Member Avatar for JorgeM
0
125

The End.