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.
1
74,063
thread by: John English | last post Jul 20 '05 by: Vjekoslav Begovic
Is there a way to catch the Enter key being pressed in a text field? I want to submit the form if Enter is pressed in a particular field. I have more than one form on the page, each with a submit button but more than one text field each. TIA, ----------------------------------------------------------------- John English |...
15
74,770
thread by: baranitharan | last post Aug 20 '10 by: tsubasa
i need a code to disable user print and save as.if there is any javascript plz help me.last 1 month i need this code.the end user never save my pages and print my pages including text image
8
74,878
thread by: J. B. Moreno | last post Aug 31 '05 by: Jim Davis
What's the best (i.e. fastest) way to find out if an array contains a given value? Other than looping, the only way I know to do it is to use an associative array/hash instead.... Is there a better/faster way? I.e if I have a list of names, what's the best way to find out if the aray contains "jane"? --
14
75,442
thread by: white lightning | last post Sep 17 '08 by: Doug Gunnoe
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post" enctype="multipart/form-data" name="form1"> <select onchange="this.form.submit();" name="prod"> <option value="">Select product</option> <option value="12">abc</option>
2
76,517
thread by: J.W. | last post Jul 20 '05 by: Douglas Crockford
How do I compare strings in javascript? The "==" double equals or "!=" doesn't seem to work in this case. I'm sure string comparison has been explained before but searching Google didn't find any code that looked similar to this one: ----- function CheckPassword(val,val2, str) { var strInput = new String(val.value);
4
77,245
thread by: Sandman | last post Jul 20 '05 by: Sandman
How do I create an array in JavaScript and then go through it? I want to feed a function with the string "foo,bar,rab,oof" and want JavaScript to do something with each line, like this (in pseudo-code): myfunc("foo,bar,rab,oof"); function myfunc(string){ foreach i (split(",", string)){ alert(i);
7
77,345
thread by: Matt | last post Sep 23 '05 by: ASM
Is there a way to increase the amount of time a hyperlink title displays or show the desired text using javascript? <a title="This is the title text displayed on hover.">Displayed Text</a> The above HTML will display the title text when the mouse is hovered over the displayed text but it disappears quickly. There may be a better way to...
9
77,413
thread by: Mahernoz | last post Jan 27 '07 by: Mahernoz
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
5
77,567
thread by: antonyliu2002 | last post Sep 30 '06 by: RobG
Hi, It looks like so many people are having problems with the javascript submit in firefox. I searched around, but haven't found a solution yet. Mostly, people were saying, try this or try that or maybe blah blah or why do you wanna do that blah blah. I haven't seen a solution to this problem. OK, I am trying to share session objects...
3
77,575
thread by: Ian Renfrew | last post Jul 23 '05 by: Grant Wagner
Does Javascript supply a function that destroys an object? If so, is there a dependancy on Javascript version? Thanks in advance, Ian Renfrew
20
78,038
thread by: Geoff Cox | last post Sep 15 '05 by: Lasse Reichstein Nielsen
Hello, This may be the answer to a problem I have - or it may not be possible?! Can I have initial values of variable situation and count defined as var situation = 0; var count = 0;
11
78,069
thread by: KathyB | last post Jul 20 '05 by: kaeli
Hi, I have an asp.net app running on an Intranet. From one of my aspx pages I would like to run a javascript that will run the following command OUTSIDE of the IIS/asp.net environment on the CLIENT machine (remember, a controlled Intranet!). Is this possible? This windows program needs to be opened and data entered periodically while using...
12
78,698
thread by: Mokka | last post Jan 11 '06 by: Randy Webb
i need a check that can go through a string to see if it contains any numbers. Please help!
6
79,413
thread by: Matt | last post Jul 23 '05 by: Evertjan.
I want to check if the user enters alphabet or numbers only in the text box. If the user enters non-alphabet or non-numbers, I should pop up a message and doesn't allow the user to do that. I am using regular expression to do the checking. But it seems it always return false. What did I miss? please advise. thanks!! <script...
2
79,922
thread by: Saint's Knight | last post Oct 10 '06 by: mbriggs
make progress bar while browser is loading page. ang when finish loading , show the page
53
81,664
thread by: usenet | last post Oct 28 '05 by: Thomas 'PointedEars' Lahn
See <ul> <li><a name="link1" onClick="alert(this.name);return false;" href="#">Link1</a></li> <li><a name="link2" href="javascript:alert(this);">Link2</a></li> <li>Item 3</li> </ul> Clicking on the first list item gives me "link1" because "this" refers
3
82,190
thread by: Obscurr | last post Jul 20 '05 by: Daniel
hi, I've got a submit button, and when one clicks it, I want a confirm box to pop up to make sure the user really wants that. The user is supposed to be redirected to another url if he presses OK, and do nothing if not. The way it works at the moment, is that the confirmbox appears as it should, but whatever the user presses, the php code...
3
84,574
thread by: Paul Thompson | last post Jul 20 '05 by: Paul Thompson
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
4
84,999
thread by: James Black | last post Apr 10 '06 by: James Black
I have an application that relies on JSON, and I realized yesterday that I when the user types at least some of these characters (most likely all, haven't had time to verify) that the parser has problems: , { } " ' How can I escape these characters so that it is in the file, but can still be parsed? For example: {data: '", "and {more...
1
87,350
thread by: eldokp | last post Sep 18 '06 by: franks
hi, In my javaScript function iam using document.ReportListForm.submit(); for form submision My ReportListForm contains <form name="RoleListForm" method="Post" action="RIRoleList.do?PageCount=<%= rptBean.getPageCount() %>">
7
88,008
thread by: pardesiya | last post May 22 '07 by: pardesiya
Friends, I need to write a javascript function (which will be called on clicking a button) to return the currently selected item from a drop- down list whose rendered html is below. <select name="ddlQuery" onchange="javascript:setTimeout('__doPostBack(\'ddlQuery\',\'\')', 0)" id="ddlQuery" style="width:273px;"> <option...
3
91,300
thread by: sameergn | last post Feb 20 '06 by: Richard Cornford
Hi, Can anyone confirm is AJAX request can be sent over HTTPS if the containing page is loaded via HTTPS? or is it true that all AJAX interaction take place via HTTP? (Since the name of the class is XMLHttpRequest and not XMLHttpsRequest) Thanks, Sameer
10
91,444
thread by: agun | last post Nov 2 '10 by: Sticks
Hello, question 1: how do i get textarea value to javascript variable if the textarea contains linefeed? it only works if the textarea contains no linefeed. var jtext = document.getElementById('idTextArea').value; question 2:
5
91,917
thread by: Jon | last post Jul 23 '05 by: Dr John Stockton
Hello all, Would anyone please be able to help? I would like to remove all characters after and including the @ from a string, for example the string joe.Bloggs@someplace.com would become Joe Bloggs. Thanks You all,
15
92,318
thread by: Nageshwarrao | last post Sep 10 '09 by: EisBear
Hi Every one, My Problem is, I want to hide the options in drop down. As an example, I have code as <SELECT> <OPTION>NAME</OPTION> <OPTION>REG.NO</OPTION> ...

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.