473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

goto commend

2 New Member
<script language="JavaScript1.2">


Expand|Select|Wrap|Line Numbers
  1. var testresults
  2. function checkemail(){
  3. var str=document.validation.email.value
  4. var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  5. if (filter.test(str))
  6. testresults=true
  7. else{
  8. alert("Please input a valid email address!")
  9. testresults=false
  10. }
  11. return (testresults)
  12. }
  13. </script>
  14.  
  15. <script>
  16. function checkbae(){
  17. if (document.layers||document.getElementById||document.all)
  18. return checkemail()
  19. else
  20. return true
  21. }
  22. </script>
  23.  
i have this script
what the command must use
to the the next:
if testresults=true goto www.google.com
else goto www.yahoo.com
please any one can do it for me
[removed email]
Sep 10 '08 #1
4 1323
acoder
16,027 Recognized Expert Moderator MVP
Set location.href:
Expand|Select|Wrap|Line Numbers
  1. location.href = "http://www.google.com/";
PS. please use code tags when posting code and do not post your email address. Please read the posting guidelines. Thanks.
Sep 10 '08 #2
kaza
2 New Member
Set location.href:
Expand|Select|Wrap|Line Numbers
  1. location.href = "http://www.google.com/";
PS. please use code tags when posting code and do not post your email address. Please read the posting guidelines. Thanks.
thx thx thx thx
so easy so gd
Sep 10 '08 #3
Markus
6,050 Recognized Expert Expert
Also: the 'language' attribute is deprecated; use 'type="text/javascript"'
Sep 10 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
There's also the use of document.layers which is not required unless you're trying to support a browser over 10 years old (Netscape 4).

If you're new to JavaScript, check out the tutorial links in the Offsite Links sticky thread to get you started on your JavaScript journey.
Sep 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

30
by: Hayri ERDENER | last post by:
hi, what is the equivalent of C languages' goto statement in python? best regards
51
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
37
by: Tim Marshall | last post by:
From http://www.mvps.org/access/tencommandments.htm 9th item: Thou shalt not use "SendKeys", "Smart Codes" or "GoTo" (unless the GoTo be part of an OnError process) for these will lead you...
52
by: Rick | last post by:
Hi, For portability, can an issue arise if we use while(1) for an infinite loop in C? If so, should we then use for(;;)? Thanks, Rick
45
by: Debashish Chakravarty | last post by:
K&R pg.66 describes two situations when using goto makes sense. Has anyone here come across situations where using goto provided the most elegant solution. --...
77
by: M.B | last post by:
Guys, Need some of your opinion on an oft beaten track We have an option of using "goto" in C language, but most testbooks (even K&R) advice against use of it. My personal experience was that...
34
by: electrician | last post by:
Perl has it, Basic has it, Fortran has it. What is so difficult about creating a goto command for JavaScript. Just set up a label and say go to it.
2
by: vincent90152900 | last post by:
How to execute a dos commend in C#? Many thanks for your replying. private void button1_Click(object sender, EventArgs e) { //code here please }
59
by: raashid bhatt | last post by:
why are GOTO's not used they just a simple JMP instructions what's bad about them
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.