473,543 Members | 2,030 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.
6
92,374
thread by: lucoin | last post Mar 3 '16 by: ramonlm
Hello guys, I met a problem about php and javascipt For a tickets booking system, when a customer search for flights from one city, so in the data base there should be many routes to different cities, like from Sydney, it can go to Landon, Paris and Beijing and etc. So first I use php to get the data from data base, and use a loop to list all...
5
94,236
thread by: Christian Radermacher | last post Jul 23 '05 by: Ranbir Kaur
I have document with an iframe in it. I'm able to call a javascript function in the main-document from the javascript inside the iframe-document. I have difficulties to do the other way round, i.e. to call a function in the iframe-document from javascript in the main-document. TIA Christian
8
94,973
thread by: Robert Mark Bram | last post Jul 20 '05 by: Keith Bowes
Howdy All! How can you tell the type of an object? I am not talking about using "typeof" .. I am talking about being able to determine if an object is a Date or String .... Thanks for any advice!
1
96,478
thread by: mike | last post Jul 23 '05 by: mike
I have a div I'd like set up differently based on some url params. <div onload="do_something('mike');document.getElementById('header_home_link').focus();do_other_things('params');"> </div> Of course the onload event is not getting tripped. Anyevents that should fire off when the div is shown in the body of the document?
2
97,079
thread by: Tony | last post Nov 29 '05 by: Tony
If I want to call a function (call it doResize) when the browser window is resized, is it better to put that in the body tag: <body onresize="doResize()"> Or is it better to put the call in a script tag in the <head>: <script type="text/javascript"> window.onresize = doResize; </script>
1
97,411
thread by: Philip WATTS | last post Jul 20 '05 by: Hywel Jenkins
I have written a function that checks the format of the text entered into a form field. The function is called by an onBlur() event and checks the format of the script which, if it is incorrect calls a second function to display an alert() message. Both functions end with a return statement. My problem is that the cursor returns to the...
3
99,079
thread by: Julia | last post Jul 23 '05 by: Lasse Reichstein Nielsen
Is there some way in Javascript to abort a script...not just a function, but the entire script? Most languages I've used have something like an exit or abort function. I want to be able to alert the user with a message, and then just have the script stop dead where it's at. Is this possible? Thx, Julia
2
100,386
thread by: Arielle | last post Feb 22 '09 by: foochal
Okay I've been wracking my brain all morning trying to figure this one out. It seems like to me it -should- work so kudos for anyone who can tell me what I'm doing wrong. <html> <head> <style type="text/css"> .subset A{ background-color:#EAEFF5; color:#000000; height:12px;
12
101,844
thread by: Ivan Marsh | last post Jul 20 '05 by: Thomas 'PointedEars' Lahn
Hey Folks, Anyone know how to test for the existance of a variable in javascript? I'm looking for the equivalent of IsSet() from PHP. I'm having trouble finding it. thx --
3
101,978
thread by: Frances | last post May 30 '06 by: Michael Winter
how to do you add elements to an array? am looking at section dealing with arrays in JS Bible, can't find how you add to an array.. in the last few years I've been doing much more Java than JS, am used to Java, where you can't add elements to an array, but use a Vector instead.. and it's very easy to add to it (use add() method..) how to you...
4
103,068
thread by: ssmith | last post Jun 4 '09 by: sarussian
Hi, I've a requirement which needs file download to be called from AJAX. can we make a call from AJAX so that content gets downloaded and file dialog box gets opened. Please help me.
8
104,030
thread by: Primal-oooze | last post Apr 7 '06 by: Richard Cornford
In most newer browsers, would the following methods successfully write to the <div>s below? ------ <script> document.all.div1.innerText = "Some random text."; document.all.div2.innerHTML = "More random text."; </script> <div id="div1">
2
105,141
thread by: bigbuddha | last post Jul 20 '05 by: bigbuddha
how do i check i testarray is empty or not? thanks -- +++-BigBuddha-+++ --------------------------- ---www.bigbuddha.be--- --------------------------- "Light is faster than sound. Thats why people look intelligent untill you
5
107,273
thread by: w i l l | last post Jul 20 '05 by: Dan Brussee
Why does this work the way it does? If someone could explain return true, and return false to me I'd greatly appreciate it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Form.html</title> </head>
13
107,461
LacrosseB0ss
thread by: LacrosseB0ss | last post Feb 16 '15 by: jeevaraj16
I was wondering, can an OnClick event of a button call multiple functions? The reason for this is I have a page that when "ok" is clicked, goes to a preview page before submitting data to the database. If "Modify" is clicked, I want to change session variables (using VB) and then go to the previous page (the easiest way I know how to do this...
1
107,752
thread by: Brian Hanson | last post Jul 20 '05 by: asdf asdf
Hi, I am trying to write a javascript function that gets called from a within an asp.net application to print a pdf file(s) programmatically. I am a pretty experienced developer in several languages, but I'm a serious newbie when it comes to anything sounding like javascript. I have searched the forums and found some code that (I think)...
1
108,681
Frinavale
thread by: Frinavale | last post Nov 7 '10 by: Maria R
Introduction I've seen many questions asked about how to disable the browser's back button and in the past I've replied with "it's simply not possible". It's not a good idea to disable the back button anyways, if the user ventures away from your page then they wouldn't have this button at their disposal. The main reason people ask how to...
8
109,714
thread by: rrosebro | last post Jul 17 '08 by: Logician
this work great and stops all enter key presses. now how do i disable the event and fire a tab key event. so if a user presses the enter key i need it to be ignore and tab to the next field. <head> <script type="text/javascript"> function kH(e) { <!-- var pK = document.all? window.event.keyCode:e.which; return pK != 13;
3
110,147
thread by: Peter | last post Jul 20 '05 by: Steve van Dongen
Hi all, Sorry if this is an obvious/common question, but I'm trying to get the value of a radio button using JavaScript. Where I can easily get the value of a text field: document.myform.myfield.value how do I get the value of the *selected* radio button? E.g. given:
9
110,924
thread by: Rafal Konopka | last post Jul 23 '05 by: Rafal Konopka
How can you caount the number of occurrences of elements in an array? For example var arr1 = ; how can I count how many 1s, 2s, 3s, etc.? Despite the example, I never actually know what elements (and how many) the array holds, which means, that the following is NOT a solution for me:
4
117,210
thread by: danao | last post Feb 17 '10 by: mali01
i want to be able to clear the value in the text box as soon as I click on it. I thought the code may be something like this: onClick="(this.value='')" Any Suggestions?
16
120,209
thread by: abhishekitb | last post Mar 29 '14 by: NeoPa
Hi., i dont know how to get windows username using javascript.. can someone help me please.. thank you in advance,
17
121,602
thread by: kartheek | last post Apr 21 '09 by: dubbmac
hi friends, can any one out here help me by giving me the code to connect to an MSACCESS database using javascript.
2
125,396
thread by: Ant | last post Jul 23 '05 by: Ant
Ok, so I have a regular input textbox on my webpage and I'm trying to work out how to make it so when the user presses a button the the textbox holds the value of a variable. I just can't work out how to do this. any help much appreciated
15
128,216
India777
thread by: India777 | last post Apr 4 '15 by: Killer42
Hai all, How to Detect, the Client Closed the Browser/Tab using Javascript.

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.