473,484 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Intermittant Javascript Issue

2 New Member
Hi Everyone

I have very little knowledge of Javascript or any other language and have built the basics of my website using Dreamweaver. I have built in extra functions just by trying to follow the logic of other scripts etc. However, for only the second time ever, I am posting to a forum with a problem I can't can't solve. The reason I can't solve it is because the problem only happens when run the script is run more than once within a few hours of the first time?? The problem...

The 'Redirect if spambot answer wrong' section below will always return true if run more than once within a period of roughly a few hours. After which, the if statement seems to work perfectly. I appreciate it's probably not the if statement itself that is the problem but some outside factor. I created the section myself apart from declaring the MM_Flag variable which I got from another form validation section which performs a simlar function. I guess that part is evaluating if the the MM_Insert contains any data and if so, to perform the validation process otherwise...carry on?? Is this some sort of sessions issue??

The script:

Expand|Select|Wrap|Line Numbers
  1. <%
  2. // *** Select security question
  3. var rsSecurity_cmd = Server.CreateObject ("ADODB.Command");
  4. rsSecurity_cmd.ActiveConnection = MM_database_STRING;
  5. rsSecurity_cmd.CommandText = "SELECT TOP 1 Question, Answer FROM tbl_dir_security ORDER BY NEWID()";
  6. rsSecurity_cmd.Prepared = true;
  7.  
  8. var rsSecurity = rsSecurity_cmd.Execute();
  9. var rsSecurity_numRows = 0;
  10. %>
  11.  
  12. <%
  13. // *** Redirect if spambot answer wrong
  14. var MM_flag = "MM_insert";
  15. if (String(Request(MM_flag)) != "undefined") {
  16.   var MM_dupkeySpambot_Answervalue = String(Request.Form("Spambot_Answer"));
  17.  
  18.   if (MM_dupkeySpambot_Answervalue != rsSecurity.Fields.Item("Answer").Value) {
  19.     // wrong answer
  20.     Response.Redirect("security.html");
  21.   }
  22. }
  23. %>
Any help you can offer would be very much appreciated!

Many thanks if you've read this far!

Lee
Feb 24 '09 #1
1 1103
acoder
16,027 Recognized Expert Moderator MVP
This doesn't look like a JavaScript problem. The code you've posted is ASP. Is there any JavaScript code involved?
Feb 24 '09 #2

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

Similar topics

5
2192
by: Michael Mossey | last post by:
Runnng python 2.2 on HP-UX, I get intermittant slow startup. Sometimes python starts up in a small fraction of a second, and sometimes takes 3-5 seconds. This applies to any script I run, or just...
0
1386
by: Nick Jushchyshyn | last post by:
Having a really strange issue with IIS 6 where the session variable does not stay consistant. The first symptom was that database connections (which use a user entered name/PW stored in the...
2
2252
by: Chuck Ritzke | last post by:
Hi all, I am getting an intermittant error after uploading a project from my development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of...
2
1590
by: James Wallace | last post by:
I hope that someone can help me out there with this problem. I get an itermittant problem with our web page that occurs about once every 10 to 15 days where the only way to fix the problem is to...
0
7079
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
6949
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...
0
7103
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7194
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5403
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4838
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
3044
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
3038
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
587
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.