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?
8 2445
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?
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.
Can you show the code so far?
Can you show the code so far?
Sure, I'll have to put snippets because I have a lot of html -
<a href=javascript:validate("#RecID#")>view comments</a><
-
-
function validate(comments){
-
password = prompt("Please enter the password","");
-
if (password=="codegrey") {
-
settings="toolbar=no,location=no,directories=no,"+
-
"status=no,menubar=no,scrollbars=yes,"+
-
"resizable=yes,width=500,height=300";
-
commentWindow = window.open('http://intweb/codegrey/comments.cfm?id=' + comments,'CommentWindow',settings);
-
}
-
else
-
alert("Invalid password!");
-
}
-
-
function validate(comments){
-
password = prompt("Please enter the password","");
-
if (password=="codegrey") {
-
settings="toolbar=no,location=no,directories=no,"+
-
"status=no,menubar=no,scrollbars=yes,"+
-
"resizable=yes,width=500,height=300";
-
commentWindow = window.open('http://intweb/codegrey/comments.cfm?id=' + comments,'CommentWindow',settings);
-
}
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.
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?
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!).
I've never done that using coldfusion. I guess I shall try and figure it out.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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)...
|
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...
|
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....
|
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
|
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...
|
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...
| |