15,694 Topics

Member Avatar for
Member Avatar for Koh_1

Dear all, May I know what is the problem for my source code. I let the user to choose the Quarter and Subdept. But when the user choose one of the Subdept, it will show this error Expected '}' at line (var rows = eval('(' + xmlhttp.responseText + ')');) May …

Member Avatar for Koh_1
0
212
Member Avatar for Adam_16

I am new to programming and I have learned the language javascript and jquery but I can't actually make things work. In other words I know all the parts of the language, but I can't turn ideas into code. Does anybody have ideas on how to learn to code ideas?

Member Avatar for Adam_16
0
90
Member Avatar for jelly46

I have managed to put together a [responsive menu](http://jsfiddle.net/c2webdev/Pb8Ts/1/) with the help from the internet. I've need it to sit in the footer as well, but to be controlled sepratley, I have copied it and placed it in the footer but I can't seem to get it right. Can you …

Member Avatar for jelly46
0
152
Member Avatar for nikk8a

Hi Friends, Working with communication between a child javascript window and parent jsp function, I am trying to access a function defined in the parent jsp from its child window which is a separate js file. This logic works fine in IE, but breaks in Chrome. * Parent function: multiCreateCallback() …

Member Avatar for nikk8a
0
1K
Member Avatar for david.roun.7

Hi all. I'm writing my first javascript game. It's a role playing game where the user fights an Ogre, and not elaborate at all. I'd like the game to end when the Ogre's life is at zero OR the users life is at zero. I can't figure out how to …

Member Avatar for david.roun.7
0
292
Member Avatar for divyakrishnan

Hi.. I want to open an existing popup and append the content to the pop up. I have used the following 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script> function disimage() { var WindowObject = window.open('p1.html', "PrintWindow", "width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes"); …

Member Avatar for divyakrishnan
0
207
Member Avatar for SimonIoa

Does anybody sees a fault in this? both codes are in the same file. It seems it doesnt gets in the javascript/ajax script because the alert doesnt work but i cant figure out why? <form method="post" enctype="text/plain"> <textarea name="update_press" id="update_press"></textarea> <input type="submit" name="press_button" class="press_button" id="press_button" value="Submit"> </form> <SCRIPT> $(".press_button").click(function() { …

Member Avatar for iamthwee
0
300
Member Avatar for jamojo

Hi Everyone, I have a javascript function below: function submitUserInfo() { if (myForm.validator.validate()) { var data = $('get-user-info').serialize(true); var params = data; var url = 'http://www.mysite/engine/'; var request = new Ajax.Request(url, { method: 'post', parameters: params, onSuccess: function (transport) { //alert(transport.responseText); $('paywall-img').innerHTML = ''; $('paywall-img').insert(transport.responseText); $('paywall-img').insert('<button class="button close-pw"><span>Cancel</span></button>'); }.bind(this), onFailure: …

Member Avatar for AleMonteiro
0
256
Member Avatar for IWDesigns

hi, i have a site built in CI and i have integrated a js/jq image slider into the index page. i linked all the files to the correct places but for some reason the js isnt working? some of the fonts in the slider are controled by js files, and …

Member Avatar for Raj Kumar_1
0
706
Member Avatar for Siberian

The following code, use to work, now it's not ? $("<selector>").animate({bottom:'-1200'}), -1300, 'easeOutBounce'); });

Member Avatar for Siberian
0
257
Member Avatar for weeraa

I'm tring to move html element on run time. (1) Call function from code behind. (Button1_Click1 event) ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "myfunction", "testFunc(100,200);", true); (2) It redirect to JS function. (This function is used to change the location of html attribute) function testFunc(x,y) { document.getElementById('draggable').style.top = x; document.getElementById('draggable').style.left = y; } in …

Member Avatar for AleMonteiro
0
287
Member Avatar for munchlaxxx

This is what I was trying to do: The user enters an address, which is autocompleted by Google. Then when they press the submit button, an alert box pops up, telling them whether the address entered is within 5 miles of (42.352487, -71.079290). Then a confirm box pops up asking …

Member Avatar for AleMonteiro
0
1K
Member Avatar for deva89

I am developing a project on PHP and MySQL. My problem is "I am unable to show a uniqueID in a textbox like 'GHY00001, GHY00002, etc' auto-incremented everytime i load the page and insert it into the database". I already tried some php tutorials but didn't find usuable to my …

Member Avatar for AndrisP
0
479
Member Avatar for sandy4a0

Hi i am facing error in below code not able to add rows could anyone help please <html> <head> <title>Row Added</title> </head> <script> function sample(){ var table='<table width="100" id="+sample+">'; table=table.concat("<tr>"); table=table.concat("<td>Add rows</td>"); table=table.concat("<td><input type="button" name="Add" value="Add"</td>"); table=table.concat("<td><input type="button" name="Delete" value="Delete"</td>"); table=table.concat("</tr>"); table=table.concat("</table>"); document.getElementById("sample").innerHTML+=table; } </script> <body> <table> <tr> <td>Enter the …

Member Avatar for AleMonteiro
0
292
Member Avatar for ravi142

Hello Everyone, Can you suggest me for Any Script or snippets of dopdown value given to **database** using **jquery and ajax** in php file. Thank You.

Member Avatar for diafol
0
385
Member Avatar for weeraa

First of all I should have to say that I do have a good knowledge in C# and but not much knowledge in JS and Jquery. I’m going to develop a web application which can see a specific location of a building (conference room, manager’s room) graphically. It is used …

Member Avatar for Traevel
0
399
Member Avatar for wfray

I'm trying to validate certain alphanumeric characters within javascript and all works but a colon (:). My code is: if (![\w_:.=\(\)@\-\/]/.test(field)) return false; I've placed a \ in front of the : and moved the colon to other positions, tried it in its own brackets [:] but it just won't …

Member Avatar for Taywin
0
277
Member Avatar for markbautista19

My Problem is when adding the item to the cart it doesnt have a remove button, just in case the user has a wrong choice the user will only remove the items in the cart. Here is my JSFIDDLE [Click Here](http://jsfiddle.net/fmM3e/1/) This is my Add Function on the script function …

Member Avatar for maltesersssss
0
182
Member Avatar for maltesersssss

I have a drag and drop shopping cart, and I've got a problem in updating the total price once I removed one item. and whenever I remove the item the table is still remain. Here's my addtocart PHP <?php define('INCLUDE_CHECK',1); require "../connect.php"; if(!$_POST['img']) die("There is no such product!"); $img=mysql_real_escape_string(end(explode('/',$_POST['img']))); $row=mysql_fetch_assoc(mysql_query("SELECT …

0
82
Member Avatar for munchlaxxx

Here is my code: <HTML> <HEAD> <TITLE>Menu</TITLE> <script type="text/javascript"> function loadXMLDoc(url) { var xmlhttp; var text,x,xx,i; if(window.XMLHttpRequest) {//code for IE7+,Firefox,Chrome,Opera,Safari xmlhttp = new XMLHttpRequest(); } else {//code for IE6,IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { txt="<table border='1'><tr><th>Name</th><th>Description</th><th>Price</th><th>Calories</th></tr>"; x=xmlhttp.responseXML.documentElement.getElementsbyTagName("food"); for(i=o;i<x.length;i++) { txt=txt …

Member Avatar for munchlaxxx
0
131
Member Avatar for network18

Hi, I have come across another programming challenge again and hopefully I wont close the thread myself this time. I am expecting good suggestions or examples from you to do this. I want to build a (scrollable) nested list, from which children of two parents could get swapped after some …

Member Avatar for Traevel
0
195
Member Avatar for ultmt.punisher

I want to make a system that generate numbers on click, I have numbers from 1 to 100 like M-3134 A-3133 U-3132 and so on. and I want to put all my these numbers in array and want to show using button randomally, upto 8 numbers or 10. and when …

Member Avatar for ultmt.punisher
0
2K
Member Avatar for s.zangeneh

. . <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> function cubeme(incomingnum){ if (incomming == 1) { return "what are u doin?"; } else { return Math.pow(incomingnum, 3); } } </script> <title>this project cubes a number</title> </head> <body> <script type="text/javascript"> var thenum = 2; var finalnum = cubeme(thenum); if (isNaN(finalnum)){ alert("you …

Member Avatar for Taywin
0
194
Member Avatar for GrantB

Hi I'm trying to end a user's session when they close the browser, because they never logout properly. I need to change a value in the db after they close the browser only. <script type="text/javascript"> window.onbeforeunload = check; function check() { return "Are you sure you want to exit this …

Member Avatar for wazz
0
113
Member Avatar for Violet_82

hi guys, I am doing some tests on e.currentTarget vs $(this) to get things clear in my head. It is said that the two are equivalent, so I created a test page with the following code in (among the other things of course): <div class="testLink"> <a href="#">Link</a> </div> The script …

Member Avatar for Violet_82
0
168
Member Avatar for Priti_P

how to check whether string contains characters like <% or <? tags or mysql tags. for example `<% String eid = request.getParameter("eid"); %> ` `<?php ?>` or `<?` my page is total depend on javascript so while its submitting form its giving me error or accepting codes which it should …

Member Avatar for Priti_P
0
335
Member Avatar for Siberian

I want a HTML page to be displayed within a DIV using jQuery. The following code isn't working ? $("tutorials .t").load("/path/path/cs_regular_tuts.htm")

Member Avatar for Siberian
0
343
Member Avatar for <M/>

I am trying to study javascript in deeper detail due to some pretty embarrising mistakes i made on my site yesterday. I use some pretty nice sites and books and i was curious to know what sites or books do you guys know of that are pretty effective when it …

Member Avatar for JorgeM
0
155
Member Avatar for nadiam

Hi guys, so i have a table populated by event details from database and i use a checkbox to select which event to be deleted: echo "<tr> <td><input type='checkbox' name='check[]' class='check' value='$id'>$name</a></td><td>$formatDate</td> </tr>"; my delete function: <?php if(isset($_SESSION['sess_user_id'])) { if(isset($_POST['del_event']) && isset($_POST['check'])) { require "connection.php"; $userid = $_SESSION['sess_user_id']; foreach($_POST['check'] as …

Member Avatar for diafol
0
465
Member Avatar for diafol

Hello All. Been playing around with some linked dropdowns. It seems to be a recurring theme here on DW, so I thought I'd offer this up as a possible solution or for discussion, to see how it could be improved. The premise for this set of linked dropdowns is that …

Member Avatar for diafol
5
985

The End.