hi ive done a piece of code for if select a region the postcodes pop up for that region all works on a seperate file but if i put on my working script it doesnt work any help would be much appreciated here is test code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/xhtml; charset=utf-8" /> <title>Dynamic Select Statements</title> <script type="text/javascript"> //<![CDATA[ // array of possible countries in the same order as they appear in the event_postalcode selection list var postcodeLists = new Array(4) postcodeLists["empty"] = ["Select a Region"]; postcodeLists["Channel Islands"] = …

Member Avatar
Member Avatar
+0 forum 4

I am starting a project that has been managed using a spreadsheet until now but needs to be converted to a mysql/php application. The amount of rows in the spreadsheet has exceeded something that can be easily sorted, filtered and edited. A particular field has a weak entity that is not worthy of its own field in the database. It concatenates data from other fields in the same database record plus some arbitrary text. I want to display this concatenation in a textarea for each record. The application will display anywhere from 1 to 10 rows on a screen page. …

Member Avatar
Member Avatar
+0 forum 11

Hello i have a problem. It seems that the value of this this input `<input type="hidden" id="uploadUid" value="<?php echo $sessionUid;?>" name="update_uid">` in here `formData.append('uploadUid', uploadUid.value);` When i put an alert `alert(uploadUid.value);` on Firefox it returns just fine but on Chrome returns undefined Any guess why?

Member Avatar
Member Avatar
+0 forum 5

Hey guys i'm a noob with javascript. I have two scripts that generally do the same thing but each do not properly work with my code. The first script will work with adding rows and allow me to delete them, however it will also delete the top row. This is an issue because if you delete the top row and try to add a row it will not allow you to add it. Also whatever value is in the first rows cell it copys to each row you add for the first cell. It works but kind of annoying! The …

Member Avatar
+0 forum 0

..... for (i = start_from; i < finish_by; i++) { var todayObj = new Date(); var current_hour = todayObj.getHours(); console.log(current_hour); var dateObj = new Date(date); if((dateObj.toDateString() == todayObj.toDateString()) && i<=current_hour){ /*no print*/ }else{ var time_in_12 = contvert_in_12_hours_time(i,(i+1)) content += '<div class="col-md-10 col-md-offset-1 avail_time">\n\ <input title="Book time slote" type="button" class="set_appoint_time unselected_time" value="'+time_in_12+'">\n\ <span class="start_from">'+i+'</span>\n\ <span class="finish_by">'+(i+1)+'</span>\n\ </div>'; } } .... function contvert_in_12_hours_time(start_from,finish_by){ if(finish_by>=12){/*for showing AM ,PM*/ if(finish_by==12){ var content = start_from+' AM to '+finish_by+' PM'; }else if(start_from<=12 && finish_by>12){/*for converting timing 12 hours*/ if(start_from<12){ var content = start_from+' AM to '+(finish_by-12)+' PM'; }else if(start_from==12){ var content = start_from+' PM to '+(finish_by-12)+' …

Member Avatar
+0 forum 0

hello all, i want to create dynamacially this thing and want to populate data alternatively on green,red,gray li and so on but i can't able to do it plz help i am weak in js :( <li class="green"> <div class="metro_tmtime" datetime="2013-04-10 18:30"> <span class="date">1/4/13</span> <span class="time">17:20</span> </div> <div class="metro_tmicon"> <i class="icon-bell"></i> </div> <div class="metro_tmlabel" id="data1"> </div> </li> <li class="purple"> <div class="metro_tmtime" datetime="2013-04-10 18:30"> <span class="date">1/4/13</span> <span class="time">17:20</span> </div> <div class="metro_tmicon"> <i class="icon-bell"></i> </div> <div class="metro_tmlabel" id="data2"> </div> </li> <li class="yellow"> <div class="metro_tmtime" datetime="2013-04-10 18:30"> <span class="date">1/4/13</span> <span class="time">17:20</span> </div> <div class="metro_tmicon"> <i class="icon-bell"></i> </div> <div class="metro_tmlabel" id="data3"> </div> </li> <li …

Member Avatar
Member Avatar
+0 forum 2

Hi all, Submitting forms to PHP is easy with Ajax. But what if I wanted to design my website to allow for JS-free web browsers? If I call a PHP file with Ajax, I might get an error message in return to dynamically add to the page, but if I POST data to a PHP form without Javascript, I need to get a whole page of HTML back. Therefore, to allow for both, i would need a way for the PHP code to detect whether a request was an AJAX request or not. How do I do this?

Member Avatar
Member Avatar
+0 forum 3

Hi Everyone, I created a script where rows gets cloned, then I created a script to check if a specific code exists in the database. This all works fine. My problem is my status message when a code exist, it shows on the first row but not the rest. I made the id of #status unique but I can't understand why it's not showing in the dynamically created row. Can someone please tell me what I'm doing wrong, or just lead me in the right direction? I added my code to [Jsfiddle](http://jsfiddle.net/2zW7B/2/)

Member Avatar
Member Avatar
+0 forum 2

Hi All, Relatively new to JS, but something strange is happening. I have one function: var commentContent = $('textarea.comment-box#comment'); commentContent.keydown(function(e){ if((e.keyCode || e.which) == 13 && !e.shiftKey && commentContent.is(":focus")) { e.preventDefault(); commentForm.submit(); } }); Which works absolutely fine. If the object is focused and I press Enter, the submit function is called. Going down the line, a completely unrelated function: var loadComments = $('.btn#load'); loadComments.click(function(e){ e.preventDefault(); $.ajax({ type: 'POST', url: '/comments/load', data: {'listing_id': listingID, 'comment': comment}, dataType: 'JSON' }); }); When I press this button, Chrome sends me this error: `Uncaught TypeError: Cannot read property 'keyCode' of undefined` and references …

Member Avatar
Member Avatar
+0 forum 1

Hi all, just a quick question. I believed that `$('#value')` was a jQuery function equivalent to `document.getElementById('value')` however, in the code below, only the second function gives the desired result. Can someone explain why this is? $('#value').value = "1"; document.getElementById("value").value = "1";

Member Avatar
Member Avatar
+0 forum 3

Hi all, I have two square <div> containers one under the other. When I click a button, I would like the second <div> to fade on top. Because the top <div> is transparent, the bottom <div> needs to be hidden first. I have given the second div a Z-index of 2 and the first div has a z-index of 1. Here is the problem, when I call the fadeIn function, the bottom <div> SNAPS to the front, then dissapears before fading in as you would expect. So far I have: $("#registration-form").hide(); $("#register").click(function() { $("#registration-form").fadeIn(); }); Is there some way to …

Member Avatar
Member Avatar
+0 forum 2

i have an echo statement. which am looping columns. and i want to use this onerror command <img src="http://subinsb.com/to-an-image" onerror="this.src='img/delogo.jpg';"/> but not working. how do i do this. thanks echo ' <div class="col-lg-5 col-md-5 col-xs-12"> <h4 class="font_head_check">' . $title . '<span class="box_type_unik">For Sale</span></h4> <p class="font_check">' . $town . '</p> <span class="label label-info">GH¢ ' . ($currency == 2 ? number_format($price * $ratio) : number_format($price)) . '</span> <span class="label label-default"></span> <p class="agent_det_unika"><br/>' . substr($description, 0, 400) . '</p> </div> <div class="vertical-line" style=""></div> <div class="col-lg-2 col-md-2 col-xs-12 col_comp_img"> "<img src="'.$logo.'" class="img-responsive result_comp_logo" onerror="this.src='img/delogo.jpg';"> <br/> <p class="font_unik_comp" style="display:none;">Sunda Estates</p> <p class="num_unika_size">' . $phone . …

Member Avatar
Member Avatar
+0 forum 3

Hi guys, please help me out with this. I'm seriously considering suicide. I have three buttons that load numbers into divs. The problem I'm having is that the buttons only seem to work once. Any idea as to why this is happening? You help will go a long way. [CODE] <html> <head> <script type="text/javascript"> var easyGame = { easy: [1,2,3], s: 1, easyLoad: function(){ for(i=0;i<=this.easy.length;i++){ document.getElementById(this.s).innerHTML=this.easy[i]; this.s++; } }//end of easyLoad function }//end of easy game var normalGame = { normal: [4,5,6], s: 1, normalLoad: function(){ for(i=0;i<=this.normal.length;i++){ document.getElementById(this.s).innerHTML=this.normal[i]; this.s++; } }//end of normalLoad function }//end of normal game var hardGame …

Member Avatar
Member Avatar
+0 forum 6

I've had a nightmare over the past couple of weeks wondering why my code wasn't working in ie. I've finally realised that it was because I was using textcontent which works fine in firefox. I tried using innertext and it worked fine in ie but stopped working with firefox. Chrome seems to support both. I switched and used innerHTML and it works fine across all three browsers. My question is what is the different between innerHTML and the other two and is it safe to use?

Member Avatar
Member Avatar
+0 forum 3

hello! i am working on a Asp.net project using C#, now i want to connect mssql server 2008 using JS or AJAX , i am very new with JS so i have no idea where to start .can anyone help me in this . Regards M.Waqas Aslam

Member Avatar
Member Avatar
+0 forum 1

can any one help me wright the code for any simple java games, choose one from the selection below plsss (using jav -Base Conversions -Lotto 649 -Mastermind -Hangman -Deal or no -Deal -Who Wants to be a Millionaire -Card Games -Theatre Seating -Morse Code Instant/Fortune Teller -Pay Stubs -Educational Game -Trivia Quiz -Other by teacher approval

Member Avatar
Member Avatar
-1 forum 4

What is closure in javascript and why we used clousers in javascript.

Member Avatar
Member Avatar
+0 forum 1

I have this progrom which is compiling and running.Only Iam tryin to understand how to change the action listener Next en previous such that,If i have 5 employees in record it when you reach the last employee in record the Next and previous buttons should be disabled.please advise here is the action listener part of the code. [CODE]public Employee1(EmployeeDataSet employees) { this.numberOfEmployees = employees.getEmployeeCount(); this.employees = employees; } public void loadEmployeeInGUI(Employee e) { // set text field with name Q1Field.setText(e.getName()); // set text field with title Q2Field.setText(e.getName()); // set textfield with salary Q3Field.setText(String.valueOf(e.getSalary())); } public void actionPerformed(ActionEvent x) { if …

Member Avatar
Member Avatar
+0 forum 4

Hello, I want to design chat application in my web site how can I developed the chat application window in my web site is their any plugin or any javascrit code pls help me thank you!

Member Avatar
Member Avatar
+0 forum 1

how to automatically redirect to a fullscreen page? i googled it but everything ifound don't work for me.. don't know why. all of those codes just open a popup with half a page width and height. And i need it compelety like when u click F11. no any other detail. and i need it to work on Chrome. thanx...

Member Avatar
Member Avatar
+0 forum 3

I describe my problem with following simple example. here when i click the test button it will create a new test button inside div tag. But after that if i clicked new generated test button document.getElementById("test" ).onclick = function() is not working. how can i add functions to new dynamically created fields? Can anyone help me? [CODE] <div id="a" > </div> <input type="button" value="Test" id="test" class="form-submit"/> <script language="JavaScript" type="text/javascript" > document.getElementById("test" ).onclick = function(){ document.getElementById("a").innerHTML="<input type='button' value='Test' id='test' name='test' class='form-submit' />"; alert("test is clicked"); } </script> [/CODE]

Member Avatar
Member Avatar
+0 forum 4

hello , Iam trying to add google map fuctionality in website dynamicallly. Iam sucessfull in but noe i want my map to be opened in lightbox .i have googled and found various results but of no use .any kind of help appreciated thanks

Member Avatar
Member Avatar
+0 forum 9

hello, I have build an code for opening a map in thick box but i have problem closing it ,i have to click outside a thickbox please help

Member Avatar
Member Avatar
+0 forum 2

Hi there all, just joined today loved this site already. My Question is that. i am trying to create 6 Menus for my Web. like Eg { home, about us, service ..... } and i want the images to change whenever the users mouse hovers the menu's. I got the scrip actually from online souce. But it was an example for one image Here are the codes: [CODE]function roll_over(img_name, img_src) { document[img_name].src = img_src; }[/CODE] And for the body [CODE]<A HREF="some.html" onmouseover="roll_over('but1', 'icon2.gif')" onmouseout="roll_over('but1', 'icon1.gif')"> <IMG SRC="icon1.gif" WIDTH="100" HEIGHT="50" NAME="but1" BORDER="0"> </A>[/CODE] Now i tried to multiply these five times, …

Member Avatar
Member Avatar
+0 forum 2

Hi, I want to insert a array variable in a another variable. I know how to get it done in php but not in JavaScript. Please advice how should I code the syntax for variable statement ? [CODE] var name[0][0]="tom"; name[0][1]=12; statement="My name is".name[0][0]."and my age is".name[0][1]"; [/CODE] I searched the net and found articles on strings but could not find anything which just shows how to do this. Any help will be appreciated. Cheers, Vishal

Member Avatar
Member Avatar
+0 forum 7

The End.