473,544 Members | 2,074 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
56,648
thread by: KS | last post Jul 20 '05 by: Lee
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try clicking other links or the same link. I can prevent this when i use buttons by calling onclick and in a javascript getElementsByTagName("input")...
5
56,559
thread by: seans | last post Aug 17 '05 by: seans
Hi, Is there a way to create a static variable in Javascript? I want to use a recursive function to traverse a DOM tree and examine each node. If the node is a text object I would like to save the text to a string or array. Is it possible to create an array or string variable to do this? Any advice would be greatly appreciated. Thanks...
6
56,033
thread by: vigi98 | last post Jul 20 '05 by: Dr John Stockton
Hello all, Can someone confirme that this: var strURLpiece = "UK & Ireland"; strURLpiece.replace("&", "%26"); replaces all occurrence of the character & by %26 in strURLpiece, ie that strURLpiece becomes "UK %26 Ireland" ? Thanks a lot.
12
55,532
thread by: Sam Collett | last post Jul 20 '05 by: Sam Collett
How do I remove an item with a specified value from an array? i.e. array values 1,2,2,5,7,12,15,21 remove 2 from array would return 1,5,7,12,15,21 (12 and 21 are NOT removed, duplicates are also removed) So far I have (val is value, ar is array, returns new array):
4
55,363
thread by: SpamProof | last post Jul 20 '05 by: SpamProof
I need to set my div tag (<div id="divBioBottom"> content </div>) to either visible or hidden from javascript. Does anyone know how to do this? Thanks. 7078895 /ra
2
55,249
thread by: yawnmoth | last post Jun 21 '06 by: yawnmoth
Say I have two input elements and that I wanted to make it so that when the first ones input was what it should be, the focus would automatically be shifted to the next input element. ie. something like... <input onkeyup="if (this.value.length == this.maxlength) document.forms.elements.focus()" value="whatever" maxvalue="x" type="text"...
3
54,983
thread by: Matt | last post Jul 23 '05 by: kaeli
Is there a way to change the title bar of the JavaScript alert box?? If we do the following, it always show Internet Explorer in the title bar of the box. What if I want to have title "My Title" on the alert box? alert("Hello"); any ideas? thanks!!
2
54,959
thread by: John M | last post Jul 20 '05 by: Louise Woodward
I want to hide the first row in my table and if a user click on a show button than show it. If it is visible than user can hide it with click a hide button. In default I hide it with: <tr id="ds" style="display:none"> but how can I make it visible or hide it dynamicaly? Is it possible to do it not with TR but with TABLE?
10
54,849
thread by: InvisibleMan | last post Jul 23 '05 by: Michael Winter
Hi, Thanks for any help in advance... Okay, I have the JS listed below that calls for the display of the (DIV) tag... cookie function not included, as don't feel its necessary but you'll get the idea! function closeall() { var objs;
2
54,791
thread by: Deepa | last post Jul 20 '05 by: Deepa
I need a routine to convert milliseconds to a traditional dd:hh:mm:ss or four separate variables that I can display. I am not wanting to display a date but rather the interval between two times. Thanks, Deepa :-)
4
54,543
thread by: guywmustang | last post Aug 26 '06 by: The Magpie
I basically have this.... <div id="page"> <div id="leftPane"> picture previews </div> <div id="Picture"> A picture here </div> </div>
9
54,152
thread by: Henrik | last post Jul 23 '05 by: Henrik
In Java you can write something like this. Does anyone know how to do this in javascript? "byte b=Integer.parseInt(int value or String).byteValue;"
1
53,057
\b
thread by: Miodrag Stancevic | last post Jul 20 '05 by: Lee
Please give me a proper use of switcher \b in command document.write. My goal is: 1. write a number on a screen 2. restore position of writing one character to the left (backspace) 3. write some else number over first number with overwrite If I write: <body> <script language="JavaScript">
11
52,857
thread by: François | last post Apr 10 '06 by: optimistx
Hi, I'm looking for a way to implement a destructor as a member method of a class. /* BEGIN CODE */ function SomeClass() { this.constructor.numInstances++;
8
52,808
thread by: Henrik Stidsen | last post May 2 '06 by: Henrik Stidsen
I am trying to access a table in an iframe via javascript. It sounds easy - but it won´t work... The iframe is added to the document via someContainerElement.innerHTML = "<iframe...>", it has name and ID and its visible in my DOM explorer just as the table I need is it. The table is added from ASP.NET via Response.Write(). I have tried...
4
52,500
dmjpro
thread by: dmjpro | last post Mar 19 '07 by: chunk1978
i want to stop loading page after loading starts ... using js how can i do it thanx in advance
2
52,256
thread by: Max | last post Jul 23 '05 by: Richard Cornford
I just wonder if there is a way of converting an object to a string. I am using a function to send an object parameter e.g "fctng(train0);" later on I would like to use train0 but as a string to access a img id called <img id="train0"> . This might be obvious to you but I am not a programmer, just trying to learn javascript at home for...
7
52,229
thread by: jmartmem | last post Sep 19 '08 by: acoder
Greetings, I have an ASP page with a form (form1) that contains a JavaScript validation function that is activated onSubmit. The function contains a series of IF statements to alert the user to any blanks contained in the form elements. What I want to do is add a new IF statement to the function that checks whether the user has populated a...
1
52,032
thread by: Debs | last post Jul 11 '06 by: sunilp
Hi, I am running my website using Weblogic, so the path is something like http://<myip>:<port>/<servername>/ On JSP pages I can use <%=request.getContextPath()%to get the root path of the site, ie that specified above. How can I get the same using Javascript? For example, something like <a href='/home'>..</awill not work as
3
51,981
thread by: Kim Haines | last post Jul 20 '05 by: Janwillem Borleffs
I need help finding where an error is occuring in my code. I use a try-catch block like this in my global.asa: try { //my code } catch (e) { Application('errormsg') = ("An exception occurred in the script. Error name: " + e.name
9
51,972
chunk1978
thread by: chunk1978 | last post Jan 15 '07 by: chunk1978
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and 2nd Select Menu are "printing options" for 4x6 and 5x7 prints respectively. the 3rd Select Menu holds an "Email" option that can be toggled...
10
51,879
chunk1978
thread by: chunk1978 | last post Feb 10 '10 by: Snegoalthorp
hi there... i have a large HTML page (approx 200kb)... since ActionScript is quite similar to JavaScript, i'm curious weather it's possible to design a "flash-like preloader" for HTML pages using JavaScript? thanks...
4
51,862
thread by: whidbeywave | last post Jan 16 '06 by: whidbeywave
Hi Gurus, I belive this has been asked several times with its own twist. Still after reading newsgroup and KB articles like 241754,I am clouded, with options. Please help in giving me direction. The scenario is of two different web servers. The parent frame (html page orginates from server 1) has script like function x1() { .....
15
51,829
thread by: shannon | last post Dec 9 '05 by: Evertjan.
Hello, I am wondering if a Do until loop can be used in Javascript. I have an array and want to fill the array 10 times with the users details until it reaches 10 or if they press cancel. I'm using window.prompt to get user info. Any suggestions. Do { //ask user to input their details } while (myairline !=10);
2
51,602
realin
thread by: realin | last post Dec 26 '07 by: veseffi
hi guys, I am trying to make a simple text editor for IE and firefox using javascript. I want to know how can i bold the selected text and otehr stuff like italics and all. cause in IE i was able to do with the following lines. if(document.selection){ var str=document.selection.createRange().text;...

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.