473,322 Members | 1,473 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,322 software developers and data experts.

Displaying value after user validates pw

219 100+
Ok, I'd like your suggestions. I have a field on my page which is password protected. If the user clicks the link and validates the password, I'd like to have the comments display.

Does anyone have a suggestion on how I can do this?

I'd rather not have to create a whole new page to display the comments. Can I have them come up in a popup window with javascript?
Oct 16 '07 #1
8 2445
acoder
16,027 Expert Mod 8TB
You could even have them just display on the page without a popup.

Do you want this password validation to happen on the same page and the comments display without the page having to be refreshed/reloaded?
Oct 17 '07 #2
dmorand
219 100+
You could even have them just display on the page without a popup.

Do you want this password validation to happen on the same page and the comments display without the page having to be refreshed/reloaded?
I'd rather have a popup menu appear when they validate the password.
Oct 17 '07 #3
acoder
16,027 Expert Mod 8TB
Can you show the code so far?
Oct 17 '07 #4
dmorand
219 100+
Can you show the code so far?
Sure, I'll have to put snippets because I have a lot of html

Expand|Select|Wrap|Line Numbers
  1. <a href=javascript:validate("#RecID#")>view comments</a><
  2.  
Expand|Select|Wrap|Line Numbers
  1. function validate(comments){
  2.     password = prompt("Please enter the password","");
  3.     if (password=="codegrey") {
  4.         settings="toolbar=no,location=no,directories=no,"+
  5.                  "status=no,menubar=no,scrollbars=yes,"+
  6.                  "resizable=yes,width=500,height=300";
  7.         commentWindow = window.open('http://intweb/codegrey/comments.cfm?id=' + comments,'CommentWindow',settings);
  8.     }
  9.     else
  10.         alert("Invalid password!");
  11. }
  12.  
Oct 17 '07 #5
acoder
16,027 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. function validate(comments){
  2.     password = prompt("Please enter the password","");
  3.     if (password=="codegrey") {
  4.         settings="toolbar=no,location=no,directories=no,"+
  5.                  "status=no,menubar=no,scrollbars=yes,"+
  6.                  "resizable=yes,width=500,height=300";
  7.         commentWindow = window.open('http://intweb/codegrey/comments.cfm?id=' + comments,'CommentWindow',settings);
  8.     }
Don't use JavaScript for password validation. I could view the source and see that the password is "codegrey". Password validation should be done on the server-side.
Oct 18 '07 #6
dmorand
219 100+
What if I have the javascript as a linked file rather than embedded? I don't want anything crazy advanced. I'm a dummy and didn't even think of the whole view source issue. My users are pretty dumb for the most part so I doubt they'd do that, but you're right I should remove it from there.

I should probably use php then right?
Oct 18 '07 #7
acoder
16,027 Expert Mod 8TB
What if I have the javascript as a linked file rather than embedded?
That won't make much of a difference except that it takes a few seconds longer to figure out.
I should probably use php then right?
Or how about Coldfusion (it is a Coldfusion forum, after all!).
Oct 18 '07 #8
dmorand
219 100+
I've never done that using coldfusion. I guess I shall try and figure it out.
Oct 18 '07 #9

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

Similar topics

3
by: CJM | last post by:
I'm adding some extra features to an intranet-based ASP application... As part of the process, I thought I would give the html a mid-life upgrade, ie. remove much of the tag-soup, replace with...
6
by: WindAndWaves | last post by:
Hi Folks I have inhereted a script that I understand reasonably well, I just do not understand !/^\d+$/.test(el.value) what the hell does that mean? Below is the script (there are really...
12
by: Susan Cranford | last post by:
Please forgive, I have looked at so much info I can't figure out how to put it together even though I know it must be fairly simple. I have an array of input text boxes (txtDOBn) where n is...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
6
by: Coleen | last post by:
Hi all :-) I need to redirect to multiple pages on click of a transmit button, without redisplaying each page. This redirection is to capture session variables that are created on each page and...
9
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash...
2
by: Mike | last post by:
I have a text box were I can enter in a list of users. I then have a button that I verify each user. I'm running into an issue, were if I have 3 users entered in the textbox and user #3 is invalid,...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
2
by: =?Utf-8?B?RHJEQkY=?= | last post by:
I understand that the Value put into a DataGridViewComboBoxCell has to be a member of the Items list or an exception is thrown. I also understand that you can override that exception by handling...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.