Does javascript support .= ? - JavaScript Help


Question says it all.. I have something like..

VALUE .= 'something' in a for loop. After 5 rounds of the loop, would VALUE hold.. 'something' 5 times.. if not, how can I change it so it is like that
Posted On: Wednesday 2nd of January 2013 12:36:56 AM Total Views:  213
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Geolocation API

, I am wondering how can I install and use geolocation api by Google so that I can use it in my website. I have spent 2 hours for this searching on google, yahoo, mamma, ask but not found a solution so please help because I am ready to throw my computer out of the window with myself to follow.
VIEWS ON THIS POST

72

Posted on:

Saturday 24th November 2012
View Replies!

Object required error

I'm playing with javaScript and AJAX and using the source code used in this page: http://www.codeproject.com/KB/webforms/MultiSelectDropDown.aspx (Actually I copied the code on the Default.aspx to the page I was working on, which has a MasterPage and translated Default.aspx.cs from C# to VB.NET) However, I'm having an "Object Required Error" in the line divRef.style.display = "block"; Any ideas why is this happening
VIEWS ON THIS POST

99

Posted on:

Saturday 24th November 2012
View Replies!

Need to extract count-down from javascript.

Ok, I will be honest - my first javascript challenge is a little hard, but has been handed down to me from my uncle. He doesnt know how to do it, and thinks a fresh mind might be able to make sence of it. Fresh meaning fairly new to js... not his wisest move I would say. I come here instead :) Here's the deal - I believe that he intends to make a program to execute a function (in his case, a vote) when a timer reaches 1. The timer is located somewhere in a javascript he has provided me with, and after some scouring, I think I have found the relevent area. The script passes along the timer text to a webpage in the form of HH:MM:SS - but I need another way of geting that timer data out (to a program or script\t). 1. Is there a way to extract the timer data in any way shape or form He would be rapt if I could solve his final programming challenge too, but this might be a bit (read: lot) more challenging. 2. What ways could I get that data into a local javascript (or anything else if easier) script to make it execute a function (not sure, but I believe just a url or mouse press) when the timer reaches 1 second. The original script in full and page with the timer will be located on his server and accessable to me through the web, so the script would need to be capable of running locally from me to him. Can that be done\t Please ask and I would be delighted to give you any other info you need. Here is the part of the script where I believe the final condition for the timer is handled. As I am new to js, let me know if I have butchered anything before or after that is critical to you understanding the timer function. // JavaScript Document (Part) update: function (updateTime) {var id, pollId, i, count, item, amount_element, time_element, element, field, value;if ((typeof updateTime === "undefined" || updateTime === true) && this.serverTimeUpdated === null || new Date - this.serverTimeUpdated > 1000) {++this.serverTime;}this.updateServerTime();if (typeof this.data.pollList !== "undefined") {for (pollId in this.data.pollList.itemList) {item = this.data.pollList.itemList[pollId];if (item.status !== "online" && item.status !== "offline") {continue;}item.updated.push("time");id = "poll_" + pollId;i = 0;count = item.updated.length;if (typeof this.elementList[id] !== "undefined" && count > 0) {for (; i < count; ++i) {field = item.updated[i];if (field === "count_down_time") {if (this.ignoreNextTimeHighlight === pollId) {this.ignoreNextTimeHighlight = false;} else {this.highlight(this.elementList[id].time);}continue;}value = item[field];if (field === "amount") {this.needAdditionalDataUpdate = true;value = this.formatAmount(value);} else if (field === "time") {if (item.status === "offline") {value = "00:00:00";} else {timeRemaining = value - this.serverTime - 1;if (timeRemaining > 0) {if (item.status === "completed") {item.status = "online";this.setPollAsOnline(item);}value = this.formatTime(timeRemaining);} else {value = "00:00:00";if (item.status === "completed") {continue;}}if (typeof this.elementList[id][field] !== "undefined") {element = this.elementList[id][field];var className = this.getTimerColorClass(item.status, timeRemaining);element.className = element.className.replace(/ red| green| dark_gray/, "") + " " + className;}}}
VIEWS ON THIS POST

56

Posted on:

Saturday 24th November 2012
View Replies!

Getting multiple variables from AJAX

I have used AJAX lots before and I wondered if it was possible to set variables from an AJAX file E.G. an ajax file could set var set1 = 10; var set2 = 55; with both variables coming from an external file called by AJAX Could you tell me the JS side for performing the request and the format of the file that is requested.
VIEWS ON THIS POST

93

Posted on:

Saturday 24th November 2012
View Replies!

Help! Tab content not working in FF

I'm having problems with a tab content script/css in the way it displays in Firefox. http://www.godirect.com.sg/etravel3/test/etravel.htm It looks perfectly alright in IE, but in Firefox the big shaded tab on the far right just wouldn't line up. I have used 'html>body' for Firefox so the layout in IE remains unchanged. However, no matter how I try to extend the last tab out, anything over the padding margin set currently, the last tab gets swipe down below. However, the code in Firefox works without a table enclosing it like this one: http://www.godirect.com.sg/etravel3/Untitled-2.htm I noticed that if you click on the last tab, there's an extended invisible margin to the right of it. That could be the reason why the tab pushes down when placed in a set table width. As I'm not allowed to redesign this, plus I'll probably burn in hell for using DIVs with tables. My question is, why does Firefox render the code like that, is there something I can do to fix this so it lines up properly like it does in IE I'll appreciate any help I can get. Thank you very much. (This tab content script was taken from Dynamic drive. It uses a JS file and CSS. http://www.godirect.com.sg/etravel3/test/tabcontent.js ) Below is the CSS that the tab panel uses (for Firefox) .shadetabs1{ padding: 0px 0px -5px 0px; margin-left: auto; margin-right:auto; margin-top: 0px; margin-bottom: 0px; font: bold 15px tahoma; list-style-type: none; text-align: left;/*set to left, center, or right to align the menu as deed*/ } html>body .shadetabs1 li{ display: inline; margin: 0; margin: 5px 19px 5px -40px; } html>body .shadetabs1 li a{ text-decoration: none; position: relative; z-index: 1; padding: 19px 62px 4px 20px; margin-right: 5px; border-bottom: 0px solid #778; color: #2d2b2b; width:206px; background-image: url(images/tab_up.jpg); background-repeat:repeat-y; } .shadetabs1 li a:visited{ color: #2d2b2b; } .shadetabs1 li a:hover{ text-decoration: underline; color: #2d2b2b; } .shadetabs1 li a.selected{ /*selected main tab style */ position: relative; width:1px; top: 0px; } .shadetabs1 li a.selected{ /*selected main tab style */ background-image: url(images/tab_down.jpg); border-bottom-color: white; } .shadetabs1 li a.selected:hover{ /*selected main tab style */ text-decoration: none; }
VIEWS ON THIS POST

63

Posted on:

Saturday 24th November 2012
View Replies!

How to make an tag stay alaway visible?

Hi. I got a page on which on the left side there is a Tree with branches, on the right side of the page i got an tag that shows a pdf file, User can click on tree branches to expand them and can click on the leafs to view different pdf in on the right side of the page... The problem is that if a user expand several branches the tree grows down and than the user scrolls down the page. to click some leaf of the tree... and by doing the scroll the tag with the pdf becomes invisible (because the user scrolled up).. how can i make the tag stay allways on top of the page even if the user scrolls down....
VIEWS ON THIS POST

65

Posted on:

Saturday 24th November 2012
View Replies!

submit once button

I want to this, a button that changed to disable when click, while there is something sent to the database. I worked with ajax, I can do this with a submit button, but when I i put the form tag, not work any more. Can you give me some available solution for this , dont know how much you know about javascript but this will do the thing that you want. this one adds butons into body onclick event and changes its label to delete and delete buton delete any other button randomly (doesnt remove itself) this was an interview question object model used to support ie4+ replace document.body.removeChild(btns[tmp]); and add there what you want and it will work. var q = q q : new Object(); /* create document element */ q.CreateElement = function(tagName) { return document.createElement(tagName); }; /* set element attribute */ q.SetAttribute = function(element, attName, attValue) { return element.setAttribute(attName, attValue); }; /* append element to given parent */ q.AppendChild = function(parent, newChild) { return parent.appendChild(newChild); }; /* set element class name */ q.ClassName = function(element, className) { return element.className = className; }; /* fetch source element of the event */ q.GetTarget = function(ev) { var target; if (!ev) var ev = window.event; if (ev.target) target = ev.target; else if (ev.srcElement) target = ev.srcElement; if (target.nodeType == 3) target = target.parentNode; return target; }; /* button click event */ q.buttonClick = function(event) { /* as we cannot pass parameter with the event (possible in IE Browsers), checking the value of source element. */ if (q.GetTarget(event).value.indexOf("Add") == 0) { var newBtn = q.CreateElement("input"); q.SetAttribute(newBtn, "value", "Delete"); q.SetAttribute(newBtn, "type", "button"); /* set type of the input */ /* attach event to new button */ if (newBtn.addEventListener) { /* if FF */ newBtn.addEventListener('click', q.buttonClick, event); } else { /* if IE */ newBtn.attachEvent('onclick', q.buttonClick); } q.ClassName(newBtn, "q"); q.AppendChild(document.body, newBtn); } else { var btns = document.getElementsByTagName("INPUT"); var tmp; /* temporary value */ while (tmp = Math.floor(Math.random() * 10)) { if (tmp < btns.length) /* boosting */ { /* check if the button has no values as "Add" and not the sender itself, remove it */ if (btns[tmp].value.indexOf("Add") != 0 && btns[tmp] != q.GetTarget(event)) { document.body.removeChild(btns[tmp]); break; /* end the loop */ } } } } };
VIEWS ON THIS POST

42

Posted on:

Saturday 24th November 2012
View Replies!

Can't put 2 Javasript working in the same page!

I am working on a website and I dont know much of Javascript,but I need to put to work different scripts on the page,and it wont work!:sad: I've already try to chage all that I remeber to chage,but dosen't work!What I am doing wrongCan anybody help me out Here is my code: window.onload = function() { // Pick your classes var myBox = document.getElementsByClassName('box_title'); var myBoxOpen = document.getElementsByClassName('information'); // Create the accordion var myAccordion = new fx.Accordion( myBox, myBoxOpen, { onActive: function(tog){ tog.setStyles({color: '#fff', background: '#840000'}); }, onBackground: function(tog){ tog.setStyles({color: '#b7d30b', background: '#7d8c87'}); }, alwaysHide: true } ); } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } $(document).ready( function(){ $('ul#hFade').innerfade({ speed: 7000, timeout: 13000, type: 'sequence', containerheight: 'auto' }); });
VIEWS ON THIS POST

69

Posted on:

Saturday 24th November 2012
View Replies!

AJAX code for generate new tag on page link by clicking?

I want to generate new tags (like text, button any thing) on click of link... Like,, In gmail attachments by clicking add new one file tag generate by clicking another add new it generates another file tag... How can I get this\t
VIEWS ON THIS POST

79

Posted on:

Saturday 24th November 2012
View Replies!

resize not working

i am trying to resize a button using the following code and it has had no effect on the button it has remained the same size.
VIEWS ON THIS POST

70

Posted on:

Saturday 24th November 2012
View Replies!

Image Map Rollover error

I am working on an image map rollover...its basically done..but it isn't working in Firefox and I have an error in IE7, however it is still working in I.E.7...was wondering if somebody could take a look and see some glaring error that I am making in my code...It's a fairly basic double-image in a div..using an image map and a few javascripts and function calls...Note - i only finished the rollover effect on the first 3 images from the left - starting with the Bills, Dolphins and Patriots and excluding the A (afc logo). Here is a link to the menu: http://www.mfllive.com/nfltest.php Untitled Document arClips = new Array(); function setParams(the_clip,from,to) { arClips[the_clip] = new Array(); arClips[the_clip][0] = from; arClips[the_clip][1] = to } setParams(1,35,64); setParams(2,67,89); setParams(3,94,118); setParams(4,365,506); setParams(5,365,506); setParams(6,365,506); setParams(7,365,506); setParams(8,365,506); setParams(9,365,506); setParams(10,365,506); setParams(11,365,506); setParams(12,365,506); setParams(13,365,506); setParams(14,365,506); setParams(15,365,506); setParams(16,365,506); setParams(17,93,234); setParams(18,236,365); setParams(19,365,506); setParams(20,365,506); setParams(21,365,506); setParams(22,365,506); setParams(23,365,506); setParams(24,365,506); setParams(25,365,506); setParams(26,365,506); setParams(27,365,506); setParams(28,365,506); setParams(29,365,506); setParams(30,365,506); setParams(31,365,506); setParams(32,365,506); clTop = 1; clBot = 28; function MM_showHideLayersIM() { //v1.2 Modified by jlowery var i, visStr, args, theObj; var clRight, clLeft, the_clip; args = MM_showHideLayersIM.arguments; for (i=0; i
VIEWS ON THIS POST

67

Posted on:

Saturday 24th November 2012
View Replies!

Compare values of text boxes and highlight the minimum

Hi ... I need some help from you all.. Actual Scenario is : This is Module to Update today's price of products and these TextBoxes below is created in loop with
VIEWS ON THIS POST

67

Posted on:

Sunday 25th November 2012
View Replies!

HTML5+Ajax to use SOAP Web Service

I am trying to experiment with HTML5+Ajax client with a Java SOAP web service on the server end. I know that Ajax can use SOAP web service and it is not difficult. What about using Web Service through HTML5 Web Socket I haven't found much about using a SOAP service directly with HTML5 Web Socket without using Ajax. Is it possible
VIEWS ON THIS POST

53

Posted on:

Sunday 25th November 2012
View Replies!

syntax highliting

how to input a code snippit to a textarea and how to preview it using syntax highliting in a html page
VIEWS ON THIS POST

68

Posted on:

Sunday 25th November 2012
View Replies!

How to check if URL exists..?

Hi ., I have a textbox for entering URL. I validate that URL using regular expression. Now the problem is, How do i know whether the entered URL is exist or not. For example, if user enter "http://www.daniweb.cam" rather entering "http://www.daniweb.com", how do i intimate them that the entered url is not valid. Is it possible.. Please kindly advise me....
VIEWS ON THIS POST

50

Posted on:

Sunday 25th November 2012
View Replies!

Chaining onload events

I am working on a website in ASP.NET and I need to run a JavaScript function on page load from a content page and I also have a user control that needs to have some JavaScript executed on page load. I'm new to JavaScript and I'm not completely familiar with how our pages work (I'm also new on this project) but here's what I know. The master page of our site implements some JavaScript on load and it allows the content pages to do on load events by allowing them to implement body_onload function mp_onload() { if(window.body_onload != null) window.body_onload(); } On one of out content pages, I have several user controls that also need to execute on load functions. I've tried to do chain the events like this but am not having any luck. In the user control: function body_onload() { addLoadEvent(cpWidget_onload); } function cpWidget_onload() { makeExpandCollapse508('WidgetCollapsiblePanel'); } function addLoadEvent(func) { var oldonload = window.onload; if(typeof window.onload != "function") window.onload = func; else window.onload = function() { oldonload(); func(); } } On the content page: function body_onload() { makeExpandCollapse508('SelectPlanTypesCollapsibleExtender'); } I stepped through this code in FireBug, but it doesn't seem to ever enter the cpWidget_onload function. I'm guessing that the content page's body_onload is getting deleted by the user control's body_onload
VIEWS ON THIS POST

58

Posted on:

Sunday 25th November 2012
View Replies!

BODY onload is not working

Hi , I'm using ajax to display the xml file. On my html i put so everytime users go to the main.html, all the information in xml will be displayed after transformed by XSL Now the problem is it gets the errorDisplay is not defined While i did define it in js file this is what I do in js; var xhr = createRequest(); function sendRequest(data) { if(xhr) { xhr.open("GET","product.phpid=" + Number(new Date) +"&value=" + data, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { var divtag = document.getElementById("product"); divtag.innerHTML = xhr.responseText; } } xhr.send(null); } } xhr has another file for it* in php file; load('items.xml'); $transformedXml = $processor->transformToXml($xml); echo($transformedXml); break; } > in my xsl; Can anyone tell me what's wrong with the code
VIEWS ON THIS POST

84

Posted on:

Sunday 25th November 2012
View Replies!

checkbox , javascript and php

hi, I ve form with checkbox in php. as we see , this code send "id=deger"... but I want this : if user uncheck checkbox, then it wont send "id= deger" how can I do this
VIEWS ON THIS POST

54

Posted on:

Sunday 25th November 2012
View Replies!

files

Hi all, I want to write some text into a file using javascript.And i am using the following code.But it doesn't work at all. Can you please help me... WriteFile(); function WriteFile() { var fh = fopen("c:\\test.txt", 3); // Open the file for writing if(fh!=-1) // If the file has been successfully opened { var str = "Some text goes here..."; fwrite(fh, str); // Write the string to a file fclose(fh); // Close the file } } Thanx a lot...
VIEWS ON THIS POST

54

Posted on:

Sunday 25th November 2012
View Replies!

MouseOver in problem

When the mouse is over the small image in a table cell, the large image appears in other cell. Code below works fine in IE but not in other browsers. How can solve this issue
VIEWS ON THIS POST

57

Posted on:

Sunday 25th November 2012
View Replies!

iframe file uploading

hello i am trying to get uploaded to a server using a hidden iframe so the page does not reload. i have a upload.php page which resizes the file and remanes the file. What i thiink should happen is that the php file should be in the iframe and the submit button directs the information to this page. without the page reloading. the code i have keeps reloading the page which is not good. the code i am using for the form is here Select File: can anyone show me where i have gone wrong because this code keeps reloadiing my page which is not what is meant to happen.
VIEWS ON THIS POST

69

Posted on:

Sunday 25th November 2012
View Replies!

Dynamic listing in the navigation tree

I am working on implementing a navigation tree which lists the configured network objects dynamically. Has somebody worked on a similar kind of project It would be of great help if somebody can provide information on this as I am a beginner in terms of JavaScript programming.
VIEWS ON THIS POST

64

Posted on:

Sunday 25th November 2012
View Replies!

How can I get the name of an input?

I'd like to know how can I get a name of an input. For example, the input of Second Name is: But I have two forms with this field Second name, which have diferent input names. Is there a general way to dynamically get the name instead of enter the name of the input in the code As you can see below, i had to add the name (secondname4) of the input. if(bk_af_reg.test(bk_af_element.name) != false) { if (bk_af_element.value == "" ) { jWPDev(".wpdev-validates- as-required").filter([name^=secondname4]").css({"display":"none"}); bk_af_element.value = "'.$Sname.'"; jWPDev(".secondname4").append("'.$Sname.'"); } }
VIEWS ON THIS POST

68

Posted on:

Monday 26th November 2012
View Replies!

Calculating age using date of birth

hi, I've got a problem and i really need help. this is my code var y= new Date(); y.getFullYear() + ''; alert(y); var year = new Date(); year.setFullYear(prompt('Enter the year','1990'),prompt('Enter the month','1'), prompt('Enter the day','1')); alert(year); var yy = y-year; alert(yy); i want when a user write his/her birthday JS calculate the age. that's all
VIEWS ON THIS POST

101

Posted on:

Monday 26th November 2012
View Replies!

textarea problem

i started to create a small cms in javascript. I just got done with the basics, but i have a problem. Check my page to see how it works: http://timo.freevar.com/ Try to click on the news or the welcome to enigma text, and a textarea will come up. I made the css for the textarea so the width is 80%, but i want it to depends on the length of the text. Same with the height. I want my textarea to become same width as the text, and same height as the text. I tried everything in css, but nothing seems to work. Someone has any ideas on how to do it in javascript I dont need any codes, just ideas.
VIEWS ON THIS POST

51

Posted on:

Monday 26th November 2012
View Replies!

Submit a Form in Lightbox

, Scenario: I am working on making a site located on my computer to give me full access of my computer wherever I am. It works great so far, and I thought it would be good if I could provide a minature, functional command prompt. By allowing myself to enter standard Windows commands in the text box plus other own-made syntax, I can process it to do stuff on the server side. So far I have called the lightbox from the administration page to give a command-prompt-like box. The code for the page loaded by Lightbox Gone Wild is as follows: Mainframe Command Prompt Type commands in here and click the accept button to execute. For a list of commands, click the help button. For help on standard Windows commands, type the command followed by / >
VIEWS ON THIS POST

46

Posted on:

Monday 26th November 2012
View Replies!

Script similar to oanda currency converter

Hi Can someone help me find a script similar to the dropdown search as seen on http://www.oanda.com/currency/converter/ where I am able to: 1. search currencies from the list. 2. Scroll through all the currencies with mouse and keyboard UP and DOWN keys. 3. Have a custom scrollbar Many
VIEWS ON THIS POST

56

Posted on:

Monday 26th November 2012
View Replies!

Facebook custom FBML tab. help needed.

i am working on a facebook page with custom fbml page. Here is the link: SNIP I want to make a jquery slideshow in the page. Is it possible to use jquery there. I write a script which work on other website but not working there. I am importing the jquery and the script by
VIEWS ON THIS POST

171

Posted on:

Monday 26th November 2012
View Replies!

ajax is not working on onsubmit

i have a simple form validation onsubmit event. The requirement is very simple, if validate.php brings any error it shows errors and it stops form for further processing else form submit and action runs process.php. But, unfortunately ajax function is not working onsubmit event.. any help please..... files are attached except html code which is here test form Your name: , Hi servis, you could try this thread and see how I made an AJAX call via the onsubmit handler. hope it helps you..., thank you Graphix for your reply. i tried your suggested code, but the matter is, on pressing submit form bypass onsubmit function and execute process.php directly without validation, ohooooo, it is now working very much fine...yes you are right i have no experience in js and ajax....thank you Graphix for kind replies..... please give me a hint, how can i validate multiple form inputs...
VIEWS ON THIS POST

107

Posted on:

Monday 26th November 2012
View Replies!

How can fix the problem?

This site is developed and maintained by
VIEWS ON THIS POST

94

Posted on:

Tuesday 27th November 2012
View Replies!

Multiple Scrollbars within Tabs - JavaScript Help

I have just implemented this jquery plugin nanoScroller. My work to date: http://jsfiddle.net/tebrown/uXV7c/11/The trouble i am having at the moment is creating more than one scroll bar within 3 tabs. The first tabs works fine, although when you go to the next tab, it doesn't show. Ideally i would like this to work within multiple tabs.
VIEWS ON THIS POST

52

Posted on:

Tuesday 27th November 2012
View Replies!

Jquery Selector Logic, Copying Form Inputs, Incrementing Name Values - JavaScript Help

I have a problem with my following example on js fiddle.http://jsfiddle.net/7nx6j/2/My goal is to append on additional group of input fields into a existing form when a button is clicked. The server side php needs the name attributes of the input fields to be unique.So with j query I copy and append a div containing the addition input elements into a containing div when a button is clicked.Also, I change the value of the name attributes by incrementing a var and appending that number value to the existing value of all the name attribute.It works except for when I go to add the 2nd set of input elements. The Jscript selector selects all the existing name attributes with the ascendant class .appendRunTableRight and appends the increment value. So the first set of input elements will have a name attribute looking like : name="mill_rpm1_2_3" the second set will look like: \tname="mill_rpm2_3" \tand the third:\tname="mill_rpm_3" \tand so on...So logically the jquery selector must only select the last div with class .appendRunTableRight not all of them. Given my current script Im not sure how to rewrite it to fix the problem.Here is to hoping that someone will understand my problem and what Im trying to do!Thank You
VIEWS ON THIS POST

47

Posted on:

Tuesday 27th November 2012
View Replies!

Popunder - JavaScript Help

I know it's a bad idea but i've been asked by a client to develop a popunder. This means the window will pop up under (behind) the current window. When googling i've found a lot which don't do this and only pop up over the current window. Does anyone know of a script which works in this way and works in all browsers The most common script seems the be the one below but this only pops up and not under. var popunder="http://www.yahoo.com" var winfeatures="width=800,height=510,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0" win2=window.open(popunder,"",winfeatures) win2.blur() window.focus()
VIEWS ON THIS POST

38

Posted on:

Tuesday 27th November 2012
View Replies!

Pop Up Window - JavaScript Help

How to showPop Up when form is refreshed and on the back nothing will work hwo can do that .\t when form is refreshed form is working . how can do that plz send me the code if u have ...........
VIEWS ON THIS POST

50

Posted on:

Tuesday 27th November 2012
View Replies!

form only update change - JavaScript Help

Hi I got the js script below which loops through all form inputs , then check if the field value changes to other value rather than the default but for some reasons the if condition does not work, no error showed. Really need someone to shed a light on it. Maybe give me some other solutions to fulfil this task$(document).ready(function() { $("select").change(function(){ $("form").find("input").each(function(i) { if (this.value != this.defaulValue) { alert(this.value); } else { alert("no update"); \t\t } }); });
VIEWS ON THIS POST

60

Posted on:

Tuesday 27th November 2012
View Replies!

How can I transfer database information to a JavaScript file?

I'm in the process of building a web application designed that allows users to embed it into their site using XSS (like adsense, Digg, Reddit, etc). Since XSS requires a Javascript file, I'm having difficulty figuring out how to implement information from a database. In a nutshell, what I'd like to be able to do is allow for accepted users to run my application on their webpage. Which means I will need to pull a client ID from a database, and only allow the user to run the file if their client ID is valid. Something like.... Which is essentially what Google does with adsense However, I haven't the slightest clue how I can perform this since there doesn't seem to be any means of running PHP inside my JS file and have that transfer over to the other user's site. I'd also like to avoid having every single valid ID directly listed in the JS file if possible for the sake of security and avoiding massive clutter and file size. Does anyone know a good way to achieve this, or an alternative way to achieve essentially the same result Thank you.
VIEWS ON THIS POST

93

Posted on:

Thursday 29th November 2012
View Replies!

Calling a function when passing no parameters

If I have the following function: function foo(){ alert('hi'); } and I don't need to pass any parameters to it, is calling it this way: foo; the same as calling it this way: foo();...
VIEWS ON THIS POST

61

Posted on:

Friday 30th November 2012
View Replies!

JavaScript assign by value vs reference

Consider a simple example, e.g. var a = { 'a': 'b', 'c': 'd' } var k = a; 1. Is it assign by value (copying) or by reference) 2. If it is by value/reference, how to make them assign ...
VIEWS ON THIS POST

86

Posted on:

Friday 30th November 2012
View Replies!

editing JavaScript with Spreadsheet, getting statistics, also XMLrepresentation of Script.

The company I work for currently has a really bad library of JavaScripts for its main web-based product (yet surprisingly better than its competitors), last week I had an idea to modify jslint to recurse over a filesystem of ...
VIEWS ON THIS POST

75

Posted on:

Friday 30th November 2012
View Replies!

getElementById problem

and
I am trying to hide text inside
tags until a link is clicked. The following code example reveals the hidden text before the link is clicked. Can anyone point me in the right direction so I can ...
VIEWS ON THIS POST

116

Posted on:

Friday 30th November 2012
View Replies!

decode javascript?

I'd like to make some changes to the following javascript and wonder if anyone knows how to decode it var clocksize=80; var colnumbers='cc9900'; var colseconds='ff0000'; var colminutes='000000'; var colhours='000000'; var numstyle = 0; var font_family = 'helvetica,arial,sans-serif'; var localZone = ...
VIEWS ON THIS POST

42

Posted on:

Friday 30th November 2012
View Replies!

Re: How to see source code as rendered (not the script)

On Jul 2, 3:41 pm, "V S Rawat" wrote: > When I run a javascript in ff 2.0.0.4, the "view source" shows the > javascript that I had put in the html file that is being rendered. Which is ...
VIEWS ON THIS POST

104

Posted on:

Friday 30th November 2012
View Replies!

PhotoNotes

! I've found an interesting project called PhotoNotes[1]. It can be compared to Flickr's photo tagging feature. There's only one problem with this project: It doesn't allow you to save the input in any way. I've looked around the ...
VIEWS ON THIS POST

61

Posted on:

Friday 30th November 2012
View Replies!

Printing a page

I need to hide some controls on the Web page (.aspx), print it, and then display the controls again. Is it possible Something like this (this does not work): function PrintForm() { document.getElementById("tblCtls").style.display="none"; window.print(); document.getElementById("tblCtls").style.display=""; } In this example, the ...
VIEWS ON THIS POST

42

Posted on:

Friday 30th November 2012
View Replies!

JS URL Sniffer Redirect

I have a need to write a JS that sniffs URL's being click and if a specific one is clicked to redirect it to another. Anyone have any knowledge if this is possible Rk...
VIEWS ON THIS POST

59

Posted on:

Friday 30th November 2012
View Replies!

Take a look at the corrective pack for Microsoft Internet Explorer

...
VIEWS ON THIS POST

82

Posted on:

Friday 30th November 2012
View Replies!

Making a drop down menuline

I have created a menuline with HTML and CSS and now I want to make it so that when you hover over the link in the list item it drops down revealing more options. Here's my HTML: {{TITLE}} {{FNAME_TOKEN}} Messages Groups My Groups Create Group Forums High School College Professional Off Topic Tools Flash Cards Games More Evaluation High School College Tutoring And here's my CSS: /* nav bar styles */ #mainNav { margin: 0; padding: 0; list-style: none; border-left: 1px dashed white; overflow: hidden; zoom: 1; } #mainNav ul { list-style: none; margin: 0; } #mainNav li { float: left; width: 12em; } #mainNav a { color: #000; font-size: 11px; text-transform: uppercase; text-decoration: none; border: 1px dashed white; border-left: none; padding: 7px 5px; display: block; background-color: #542437; zoom: 1; line-height: 33px; } #mainNav a:hover { color: white; } The menuline is just made by floating the li elements. The tags take up the whole box to. That way, the whole menuline is the link. Not just on the text. Anyway, I have tried doing Javascript which I think should work, but it's not doing anything. menujs.js: $(document).ready(function(){ $('#mainNav li ul').css({ display: "none", left: "auto" }); $('#mainNav li').hover(function() { $(this) .find('ul') .stop(true, true) .slideDown('fast'); }, function() { $(this) .find('ul') .stop(true,true) .fadeOut('fast'); }); }); It's not doing anything at all. The ul inside each drop down is displaying initially and it shouldn't be, AND when I hover over the links nothing happens.
VIEWS ON THIS POST

59

Posted on:

Sunday 23rd December 2012
View Replies!

Error Message Showing up in INPUT field - JavaScript Help

First, thanks for any help with this issue.I have a form on a website that is posting an error message within one of the input fields. I am not sure why. I believe it was working before.This form has 3 text fields. If one of these empty, it should say that there is information required. It looks like it is throwing the html code into the top box. The code is ( fields are required.)Wondered if anyone would have an idea why this would happen
VIEWS ON THIS POST

47

Posted on:

Friday 28th December 2012
View Replies!

Basic JS Form prob... - JavaScript Help

I have this code: Please enter an address:
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

Proper forum to discuss slimbox? - JavaScript Help

I don't know where to turn to help for this one. I have installed slimbox on my site which is a lighter weight version of lightbox. I have a file structure as follows:user_page.php--include editpage.php\t--include place.php --include appinformation.phpappinformation.php: image 1 Now, if i go to url site.com/includes/appinformation.php the slimbox works perfectly. I click the "image 1" link and the slimbox operates fine. If I goto userpage.php where appinformation.php is an include and click on "image 1" i am redirected to http://www.site.com/...mber_banner.gif instead of the slimbox operating.Any ideas why this is happening or a work around
VIEWS ON THIS POST

43

Posted on:

Wednesday 2nd January 2013
View Replies!