15,700 Topics

Member Avatar for
Member Avatar for concepcionmark

Hello everyone! I am not good in PHP, AJAX, jQuery and JS. I am exploring and doing self study on a chat application on web. But I can't figure out why every time the message received by the other user, it duplicates as if its copying all the recent messages …

Member Avatar for concepcionmark
0
212
Member Avatar for turpentyne

I'm trying to replace this set of if statements as an each statement. but I'm a little confused on how to do this. I just want to cycle through a series of images that have the class .hotspots and change source, after detecting whether they have one of 4 other …

Member Avatar for chr.s
0
127
Member Avatar for Ritesh_4

Hello, I have a script which is as follows (not written by me), and would like to get the value of "content" in this case to be displayed on the screen for test purposes, how can I do this? <script type="text/javascript"> $(document).ready(function (){ var content = $('#menu-upper').html(); $('#menu-upper').html(''); $('#menu-lower').html(content); }); …

Member Avatar for Ritesh_4
0
187
Member Avatar for Diogo Martinho

Hello, I'm currently creating a website in C# and I'm trying to add Globalization to my application, however there is an issue I'm currently facing related with the fact that I must change some labels for some buttons I've created in a javascript file, and I was thinking about using …

Member Avatar for LastMitch
0
250
Member Avatar for joshl_1995

Hello Community, I need help with getting javascript function arguments in php eg. function jsFunction(arg) { <?php phpFunction(arg); ?> } <button onclick="jsFunction(this.id);" id="XXXX"/> But when i press the button it doesn't send "XXXX" to the php function (<?php phpFunction(args); ?>) it sends "args" (as plain text). Please Help...

Member Avatar for joshl_1995
0
437
Member Avatar for phfilly

Hi all! I have a problem which I can't seem to fix. I would like to know is it possible to send a normal JS variable to a php page. I've tried the following and nothing seems to work. <input type="submit" value="Bookmark" onclick="bookmark();"> function bookmark() { var pageNum = 2; …

Member Avatar for phfilly
0
295
Member Avatar for Jane160768

function CardNumber(num, isVisa, isMaster) { var card = new Array(); if (document.getElementById('radioVisa').checked) { card = isVisa; } if (isVisa){ ((isNaN(num))||(num[0] != '4') || (num.length != 16)) return false; } else { return true; } if (document.getElementById.innerHTML('radioMaster').checked) { card = isMaster; } if ((isNaN(num))||(num[0] != '51') || (num[0] != '52') || …

Member Avatar for ryantroop
0
235
Member Avatar for jamey8420

I am using window.open to launch a link from within an iFrame. Here is my code to launch the link: =iif(Fields!budgetid.Value>1,"javascript:void(window.open('"+"http://test/forms/Su....aspx?BudgetId=" & Fields!budgetid.Value & "'))","") The link is showing up in my iFrame, but when I click the link nothing happens. If I right click, copy the shortcut, and paste …

Member Avatar for ryantroop
0
3K
Member Avatar for dhani09

I have the following code to draw any polygon on an HTML5 canvas on a button click. The user supplies the radius, sides, x and y co-ordinates. Using the sides any regular polygon should be drawn. First we move to the perimeter using moveTo() and then draw lines using lineTo() …

Member Avatar for IIM
0
203
Member Avatar for daniel.pareja.315

Hi all, would like to convert this javaScript code versatile so it will be able to extend various inputs of a form. var instance = 0; function moreFields() { // Check if there isn't more than 3 fields if(instance != 3) { instance++; // Create a child var clone = …

Member Avatar for daniel.pareja.315
0
155
Member Avatar for erum

i have follwoing code in jquery function CallService3() { $.ajax({ type: "POST", url: "MyService.asmx/Comments", // data: "{ 'loginid': " +"'"+ $("#txt_login").val()+"'" + ", 'pass': " + "'" + $("#txt_pass").val()+"'" + "}", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: OnSuccess3, error: OnError1 }); } function OnSuccess3(data, status) { if(data.d.length > …

Member Avatar for LastMitch
0
208
Member Avatar for Tewhano

I am working on an assignment from the book ‘New Perspectives: HTML, CSS and DHTML’ and I am unable to get the code to work. This is an online class and this book is not a desirable choice for this type of class. Basically I am to write code to …

Member Avatar for radhakrishna.p
0
423
Member Avatar for blivori

I am trying to search through a JSON file and display only the result matching the input form. When I click the 'Search' button, nothing happens. How can I resolve this? This is the code: <div id="search"> <form name="input" action="search()" method="get"> Search: <input id = "searchField" type="text" name="search"> <input type="button" …

Member Avatar for theHop
0
178
Member Avatar for riahc3

Hello Lets say in the localStorage object I have the following: Apple = red Potato = brown Gum = blue And I want to search thru it for the word Potato and then get its value (brown). How could I do this? Im thinking: for (var i=0;i<localStorage.length();i++) { if (localStorage[i]=="Potato") …

Member Avatar for imBaCodes
0
139
Member Avatar for Buppy

Hi, I know it's possible to add actions for elements that are not in DOM yet, like $(element).live('event',function() { //code here }); Is there any way to execute the code without the event, or give it an event like 'exists' ? Like, when object is added, the function executes automatically, …

Member Avatar for kela_wala
0
248
Member Avatar for eburlea

Hi all. I need to fix a bug in a code, it is not displaying properly (it appears in the upper-left corner and when I try to click on it, the page reloads). I cannot figure it out myself. Please help. <div class="btn_center" style="padding: 0 0 10px;"> <fieldset> <div class="edit_entry …

Member Avatar for eburlea
0
207
Member Avatar for singularity~

I have jQuery, jQuery Mobile and jQuery-UI included in my MVC4 project. I am having a problem where the jQuery-UI script only loads if the page is refreshed, otherwise the jQuery-UI will not load initially. I have tried moving the include script to the bottom of the page instead of …

Member Avatar for LastMitch
0
199
Member Avatar for Dervish1

I'm working on my first web app, and have a simple version of the application working. It allows the user to create and edit a fantasy map from a set of terrain tile images - but I can't figure out how to make it print. A print preview (and an …

Member Avatar for Dervish1
0
2K
Member Avatar for PhilEaton

Here is the code: var Circle = function( radius ) { var _radius = radius, _area = function() { return Math.PI * _radius * _radius; }, _perimeter = function() { return 2 * Math.PI * _radius; }; this.radius = _radius; this.area = "Area" + _area(); this.perimeter = "Perimeter" + _perimeter(); …

Member Avatar for PhilEaton
0
164
Member Avatar for Rajthilak24

Any way to show "printed success" message in website after printing completed in printing machine? I need to implement this function in my client website using either .Net, jquery, java script. CONDITION: The data displayed in grid with "print" option when user click the "print" the default browser print dialog …

Member Avatar for caperjack
0
75
Member Avatar for mattster

Hi folks, I am aware this is a problem that many people have, but I am yet to find an answer... I have a 10x10 grid generated using a html `<table>`, each cell has an id reffering to its location (ie. #15 - row 1, colmn 5). All I need …

Member Avatar for LastMitch
0
365
Member Avatar for Wailintun

HI! my friends, Now I am trying to make a drop down which will show image map by selecting image from drop down,please check this link http://www.siteexperts.com/dhtml/ch9/chapter/samples/map1/switch.htm it's very similar to what I want to make but it has one pic. Please help me! thanks for your time!

Member Avatar for LastMitch
0
86
Member Avatar for nacedo

I have this chunk of jQuery that is doing strange behavior. When I load the page, my list is slided Up (completely folded) wich make sense. But I have to double click each parent to slide them down, which is not the normal behavior. I think this line is the …

Member Avatar for nacedo
0
1K
Member Avatar for leandros.ioannou

Hi i have an issue using top to bottom plugin, while it works, the problem is that the image is visible only on top and while i scroll down the image stays top. Below is the code: <html> <head> <style> #main { float:left; width:500px; background:#c9c; } #sidebar { position: fixed; …

Member Avatar for leandros.ioannou
0
340
Member Avatar for Violet_82

Hi all, I wonder if you can help me at all. I need to display one ul list into separate (3-4) columns one next to the other one, only if the number of items is bigger than 6. Let's look at the following code. Html is: <div class="wrapper"> <h2 id="first">First</h2> …

Member Avatar for LastMitch
0
215
Member Avatar for ryan311

I have this jquery code <script type="text/javascript"> $(document).ready(function () { var counter = 2; $("#addButton").click(function () { var newTextBoxDiv = $(document.createElement('div')) .attr("id", 'TextBoxDiv' + counter); newTextBoxDiv.after().html('<input class="required" data-val="true" data-val-regex="Provide a valid date." data-val-regex-pattern="^\d{1,2}\/\d{1,2}\/\d{2}$" name="Date[' + counter + ']" id="Date[' + counter + ']" value="Date[' + counter + ']" style="width:165px" type="text" …

Member Avatar for LastMitch
0
1K
Member Avatar for root59

I am a big fan of the jqtransform plugin [URL="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/"]http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/[/URL] but have discovered that when you add to many select fields on a page, the bottom half of the select fields do not open the option fields. I have a form which takes an passenger's date of birth, but there …

Member Avatar for rudywaltz
0
245
Member Avatar for turpentyne

My boss has several projects where i need to change out information. I did one with an included file of several divs that are hidden/shown, depending on what the user clicks on. It got tedious. But I don't have access to mysql to set anything up. Now I'm doing another …

Member Avatar for pritaeas
0
168
Member Avatar for sri.

Javascript string search string in array not working here is my code Mycode var array = ["foo","fool","cool","god",'searchstring']; var src_keyword=""; $("#search_str").click(function(){ src_keyword=$("#str_search").val(); find(array,src_keyword) }); function find(arr,src_keyword1) { var result = []; alert(src_keyword1); //src_keyword1="oo"; for (var i in arr) { var search = new RegExp(src_keyword1, "gi"); if (arr[i].match(search)) { alert(arr[i]) result.push(arr[i]); } …

Member Avatar for paulkd
0
356
Member Avatar for theguitarist

What are some common uses of HTML forms that contain just one text input and a submit button? The only one use I find is to submit search queries. Is there some other reason why this is commonly used?

Member Avatar for imBaCodes
0
196
Member Avatar for dewhickey

I know how to set it to auto jump to the next field in the form after a certain number of characters are entered. But that's not what I need. I need this: If number 2,3,4,5,6,7,8, or 9 is entered, I do want auto jump to the next field. However, …

Member Avatar for imBaCodes
0
198
Member Avatar for Kusno

Dear all, I can use this code to write a value in parent window control. [CODE]StrJScript = "<SCRIPT>parent.document.forms[0].TxtCustomerId.value = '" & ClearSpace(Row.Cells(1).Text.Trim) & "';</SCRIPT>" If Not ClientScript.IsClientScriptBlockRegistered("S1") Then ClientScript.RegisterClientScriptBlock(Me.GetType(), "S1", StrJScript) End If[/CODE] but, I cannot set iFrame visible to false. I use this code : [CODE]StrJScript = "<SCRIPT>parent.document.form1.iFrmCustomer.visible = …

Member Avatar for sachin.e
0
544
Member Avatar for emilio

hi i have a simple website that includes a WebService and a Webform page. i'm trying to call my web service from the web form using jquery. when i type the web service's url using https, i get "Access denied" error from internet explorer. the call works just fine when …

Member Avatar for emilio
0
256
Member Avatar for deepak.fugo

Hi All, How can we set a value to iframe textbox element either in JS/Jquery <head> <script type="text/javascript"> function load() { alert("Frame is loaded"); myframe.document.getElementById("user_email").value = "<?php echo $var ?>"; } </script> </head> <body> <iframe onload="load()" id="myframe" name="myframe" src="http://www.gigpayrr.com/signup" width="700px" height="600px"> <p>Your browser does not support iframes.</p> </iframe> </body>

Member Avatar for deepak.fugo
0
1K
Member Avatar for Reliable

I've gone through Code Academy's beginner's JS course. I would like to not only practice what I've learned more, but now move on to interdemiate lessons. Is there a site like Code Academy offering such things for free and online?

Member Avatar for imBaCodes
0
112
Member Avatar for debasishgang7

Hi, I have a problem.I have a third party HTML/Javascript code in which they have text area.They post the content of the text area when user press enter. there is no button to submit the form. So I wanna know how can I submit that form using javascript. Thanks.

Member Avatar for imBaCodes
0
180
Member Avatar for Kmhnz201

Can anyone point me to the right direction with validating a input field like this "p99” (i.e. a letter followed by two digits).

Member Avatar for imBaCodes
0
68
Member Avatar for jmay1327

Hello all, I am looking for a way to code up an exit popup. The problem I am having is a way around the alert box that pops first asking if the user would like to leave or stay on the page. I would like to show an small html …

Member Avatar for JorgeM
0
116
Member Avatar for blivori

Hi, Can anyone tell me why no 'products' are being displayed from the JSON file? This is my code: products.html: <!DOCTYPE html> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding"> <style>img{ height: 100px; float: left; }</style> <link rel="stylesheet" type="text/css" href="style.css"> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script> $.getJSON('products.json', function(data) { $.each(data.products, function(i, item) { …

Member Avatar for pritaeas
0
368
Member Avatar for rexmatthew

Can anyone help me? I'm trying to gat my reservation calendar working with jquery tabs. Everything else works exept for this reservation calendar. When I remove the javascript from the header, the calendar works just fine but the tabs disappears... Can anyone please help...? <div class="reservationbox"> <div class="reservation_calendar" id="reservation_calendars"></div> <div …

Member Avatar for annaharris
0
246
Member Avatar for unikorndesigns

Hi guys, I am getting very weird issue here. On my wampserver, this script works fine but not on my liver server which is linux. This is what it does. After a checkbox gets checked, the scripts identifies that and insert a row in table and that script send back …

Member Avatar for LastMitch
0
160
Member Avatar for allifields

Hi, so I have developed a top fixed navigation bar at the top of a webpage. How do I incorporate a fading navigation bar so that when I scroll down, the fixed bar turns from black to a certain opacity level? Is that something incorporating jquery? And if possible, if …

Member Avatar for Dani
0
984
Member Avatar for dhani09

I have the following code that gets input from users on a button click and draws on a canvas but when i click the button nothing works. Here's the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="mycss.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js.js"></script> <title>CANVAS</title> </head> <body> <canvas …

Member Avatar for dhani09
0
159
Member Avatar for chr.s

In order to make my AJAX functionality a little more efficient I've added a cache component; but this has given me a huge new headache. The AJAX related code is below. It listens for a click and checks if the user has already clicked that link. If not, it'll fetch …

Member Avatar for chr.s
0
298
Member Avatar for newrat

****** good day im new to this forum and i hope you can help me, I'm new to javascript i need to achieve a few things. my goal is to put a running timer for each text box generated ive read tutorials online and tested some codes and so far …

Member Avatar for newrat
0
197
Member Avatar for techd

Hi I have a datepicker: <input class="dmxCalendar2" name="dmxCalendar21" id="dmxCalendar21" /> <script type="text/javascript"> // <![CDATA[ jQuery(document).ready( function() { jQuery("#dmxCalendar21").dmxCalendar2( {"altFormat": "yy-mm-dd", "condDates": [], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10", "onSelect": "MM_goToURL('parent','allactstest.html');"} ); } ); // ]]> </script> And also a script: <script> var chosenDate …

Member Avatar for LastMitch
0
216
Member Avatar for turpentyne

Quick question. I want to make a variable from just a section(substring?) of an id in javascript / or jquery. I've got four possible id names: link_north, link_south, link_east, link_west. I want to pull just the direction from the link to use as a variable, with this: var header_change = …

Member Avatar for LastMitch
0
116
Member Avatar for MasterHacker110

I have taken up a project of creating my own forum. A chat forum. I have started to design the homepage. But there is still much more work to do. The thing is I dont know how the folowing things work: Member login and that each member has their own …

Member Avatar for James singizi
0
286
Member Avatar for Atlanta15Braves

I am trying to have my .js file have a function that will change the color of the text within the div tag named "ID=test". I have the function (below), but I think I am missing something. I have three buttons in my HTML (red, blue, and black) that should …

Member Avatar for EvolutionFallen
0
409
Member Avatar for cris.calleo

Hi, I need to get a variable value from dropdown and pass this to another JS file: On <SELECT> i have Onchange event, which get dropdown value. If I make selection, alert popup appear with correct value file.php ... script ... function __doPostBack(elm) { var user_id = elm.options[elm.selectedIndex].value; alert(user_id); } …

Member Avatar for EvolutionFallen
0
119

The End.