473,378 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

javascript not responding

Hi,

I got a little problem with executing a javascript. I have a simple html
page with a textfield and a button. When I hit the button a javascript will
check the value of the textfield. If it's a right value, a new page will be
opened otherwise I get an error message.

That works but now I want to execute the script also if I hit enter after
typing in the textbox. The webpage will be loaded but the script won't be
executed. Even stranger, if I add a second textbox to the page it suddenly
works?! That's fine but I want to get rid off that second box, it has to
work with one.

Greetings,
Rick
Jul 20 '05 #1
1 1920
Use the forms onSubmit property to run the function that does the
validation.

Stu

"Rick" <as******@hotmail.com> wrote in message
news:3f***********************@news.xs4all.nl...
Hi,

I got a little problem with executing a javascript. I have a simple html
page with a textfield and a button. When I hit the button a javascript will check the value of the textfield. If it's a right value, a new page will be opened otherwise I get an error message.

That works but now I want to execute the script also if I hit enter after
typing in the textbox. The webpage will be loaded but the script won't be
executed. Even stranger, if I add a second textbox to the page it suddenly
works?! That's fine but I want to get rid off that second box, it has to
work with one.

Greetings,
Rick

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: splatter | last post by:
Hey all, I'm trying to get a java bookmark to work from my browsers address field which is supposed to send a prefix + reload the current page from my proxy & return a special view depending...
5
by: Wade G. Pemberton | last post by:
Can't find it quickly in the reference books.
3
by: Daren Perry | last post by:
You're wrong! There is a way using JavaScript, someone else came up with it in another forum.
13
by: long5120 | last post by:
I am trying to use webpage with javascript to check if a web server is responding. I was thinking of using 2 frames. Frame1 will have the site, and the Frame2 will be a status bar (not really...
12
by: Stanley | last post by:
Hi, I'd like to write a HTML page which can help me directly log in my Yahoo!mail or Gmail account without typing user name and password. Basically, I want to set up a link, click it and pop up...
3
by: DanWeaver | last post by:
I use visual studio 2008 and am learning to use javascript. I am constructing a javascript heavy website and have tried using the visual studio tools as well as Firebug- an add on for Firefox which...
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
3
by: pjdelaere | last post by:
Hi, In a multiuser environment the following happens: for one user I load a page that contains external, internal and inline javascript; all runs well. If I load new internal or inline...
2
by: ManidipSengupta | last post by:
Hi, a few (3) questions for the Java experts, and let me know if this is the right forum. It deals with 100% java code (reason for posting here) but manages a Web browser with Javascript. Thanks in...
25
by: Oltmans | last post by:
Hi guys, I'm learning JavaScript and I need some puzzles that can make me a better JavaScript programmer. I mean I'm looking out for programming puzzles (e.g. Project Euler or TopCoder) but I'm...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.