473,545 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript Forum

JavaScript web scripting language - Ask questions about JavaScript development, jQuery, Vue, React, the DOM, cross-browser scripting, event handling, OOP, cookies, client-side form validation, built-in objects like Date, String, Array and Object, performance and more.
4
47,613
thread by: Danny | last post Jul 20 '05 by: Dr John Stockton
Hi I don't understand why I keep getting "Error: Object expected" I tried different things and haven't been able to solve it. I'm a newbie so I'm not sure what I'm doing wrong. The debugger breaks at the <BODY> Tag of my code so I'm thinking the problem is with my InitPage() function. I appreciate the advice. Here is my code. <SCRIPT...
12
47,522
thread by: Robert Mark Bram | last post Nov 7 '05 by: Julian Turner
Hi All, I am using the following trim function: function trim (str) { return str.replace(/^\s*/g, '').replace(/\s*$/g, ''); } The problem is that this doesn't trim instances of the "&nbsp;" char - the non breaking space. Can this be represented in a grep statement at
10
47,484
thread by: korund | last post Apr 8 '06 by: Dr John Stockton
We can use special characters ('\n') to add line breaks in text in JavaScript popup Alert boxes. there is also few additional special characters: \' single quote \" double quote \& ampersand \\ backslash \n new line
7
47,354
thread by: lawrence | last post Jul 23 '05 by: lawrence
Can I do something like the following to get a browser to redirect to a new url every time someone picks a new value in a select box? function changeUrl() { var redirect; redirect = document.getElementById('newUrl').value;
4
47,326
thread by: effendi | last post Jul 23 '05 by: effendi
Hi can anyone point out what is wrong with this code. I got the above error after introducing the "else if" statement if (newdoc=="isnew") { parent.nameCheck.location.href="//dbTeamNameValidation?OpenForm&ClassSection=" + classSection+"-"+classNumber+"&teamchange="+teamchange+"&MemberList="+memberList+"&TeamName=" +teamName; }
2
47,300
thread by: Templar | last post Jul 20 '05 by: Templar
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe snipplet: //************************************* //*************************************
16
47,289
nirmalsingh
thread by: nirmalsingh | last post Oct 26 '09 by: acoder
hai experts, i am having page called main.html, when the user clicks a button in this page a popup window of pop.html is opened. in pop.html user enter his name and close that popup window. now what i need is: the name entered in pop.html shiould be shown as table format in main.html. the row should be added each and every time the user open...
2
47,213
thread by: Xzorius | last post Apr 27 '07 by: dorinbogdan
Hi, Simple question: how do i change the background color of a textbox with javascript? BuBbA
2
46,975
thread by: wlevine | last post Jul 15 '06 by: Douglas Crockford
Can someone give me an example of how to construct an array of objects? for example, I have: function objFacility(id,name,adr,city,state,zip) { this.id = id this.name=name this.adr=adr this.city=city this.state=state this.zip=zip
7
46,582
thread by: TomislaW | last post Jul 23 '05 by: Mick White
i have number that i need to concatenate with string
6
46,549
thread by: John Ramsden | last post Jul 20 '05 by: John Ramsden
.... when the id 'junk' doesn't exist anywhere in the document, instead of returning 'object'?! I am using Javascript for a drop-down menu, slightly adapted from one by Angus Turnbull (see http://javascript.internet.com and http://gusnz.cjb.net, not that this is probably relevant but it deserves a plug ;-), on Internet Explorer...
4
46,387
thread by: xu.devel | last post May 4 '07 by: xu.devel
Hello, which comment character is used in JSON? i have tried with {"name": "value" /* comments */ }, it is ok, but {"name": "value" // comments } does not work. thanks! schuen
3
46,341
thread by: Aquosus | last post Oct 7 '06 by: Evertjan.
How do I change the z-index on a page I have tried document.getElementById(name).style.z-index and document.getElementById(name).style.Zindex I want to change the z-index to show a layer that is covered -- Totus possum, totum Deum.
8
46,146
thread by: Steven | last post Jul 23 '05 by: Randy Webb
i need to force a carriage return with a textarea field at X number of characters. anybody know how to do this? tks
3
45,946
thread by: news.rcn.com | last post Sep 22 '05 by: web.dev
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem to find a reference to request or response objects in JavaScript either in Google Groups or O'Reilly's "JavaScript the Definitive Guide" (surely it...
5
45,919
thread by: coolsti | last post Jul 23 '05 by: coolsti
Can someone tell me how to do this if it is possible? I have a table based web site, and I would like to dynamically change the text that is shown in a particular cell of a table. I give the cell the unique ID label1 so I can get a hold of it, and I can get a javascript to display the data in an alert box (this is just to see if I can access...
4
45,831
thread by: Bosconian | last post Jan 30 '07 by: Bosconian
I've been fighting with this for an hour. My form contains a hidden input with the value initially set to "". When a user clicks on the link, a function is called that updates the hidden form value and submits the form. Unfortunately this generates an error which states the form object is undefined.
4
45,703
thread by: mport | last post Jan 14 '10 by: mport
Does anyone know of possible reasons why onload might not be working? It's gotta be the most pathetic question ever, it's doing my head in!! I've done this a dozen times, but on this one, nothing! I just can't see what the problem might be. Here's the background: Initially the idea was to run a js function using window.onload =...
26
45,473
thread by: Dave Hammond | last post Jul 23 '05 by: Christopher J. Hahn
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function defined in "A.html", but every attempt results in an "is not a function" error. I have tried to invoke the function using...
3
45,165
thread by: kam bansal | last post Jul 20 '05 by: Lasse Reichstein Nielsen
Hi all, Can javascript read a cookie from a different domain? Meaning, if my html page is running on "www.mydomain.com" and I goto another domain "www.another.com" to do some work, and then I come back, can I see the cookie that "www.another.com" created from my domain??? Any thoughts? ~Kam (^8*
4
44,926
thread by: Michael Hill | last post Jul 20 '05 by: Martin Honnen
I had this html: <tr id="action" title="click to do something" onclick="alert('mike');"> <td>a</td> <td>b</td> </tr> and it works when I click on the row, but when I try to add it dynamically like:
4
44,856
thread by: Bill | last post Jul 20 '05 by: Lasse Reichstein Nielsen
I call a function in my .js file like this: onClick="location.href='blank.html' + generateSearchStringFromForm('section')" where section is the name of my form. The function is defined as follows: myFunction(k) {
14
44,787
thread by: kigoobe | last post Mar 25 '08 by: Practicality
Well guys, I have tested a script that's working well in FF, however while testing with IE7, I am finding errors. That famous yellow warning icon at the left of our status bar. Basically, I am opening a new popup window using dhtmlgoodies modal message tool. It opens well in FF, however in IE, the yellow icon appears with a bunch of erros as...
1
44,685
thread by: Raghuram Banda | last post Jul 20 '05 by: Lasse Reichstein Nielsen
Hi there, I'm new programmer in JavaScript. Can any one help in creating a checkbox (by default selected) from JavaScript and creating Drop down box (<select> ... </select>) from Javascript. Thanks In Advance
7
44,522
thread by: Erik-Jan Bakker | last post Jul 20 '05 by: Erik-Jan Bakker
Hello, I am stuck with a weird javascript problem.... ;-( Maybe it's somehting very simple, but I am really stuck in it, right now. What's the matter.... When place my website at a different hosting provider my webpage menu generates the javascript error:

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.