Civ Duel Zone  

Go Back   Civ Duel Zone > Site Stuff > Off Topic
Home

Reply
 
Thread Tools Display Modes
Old 30-03-2005, 19:33   #1
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default Help me make a website

More questions to come later on.

I have to use .asp, html, .css and Access to make a website to do one of those fantasy football websites.

Heres two to start off with:
Why would a standard text field box that happens to be a password field return the value that was entered but with a comma at the end?
This doesn't happen on any of the other text fields but it does on this one which is odd.

How do you mask the input to ***** etc?

Thanks in advance, I'll probably ask harder questions later on.
Dell19 is offline   Reply With Quote
Old 30-03-2005, 19:58   #2
Pastorius
Custard used tile
 
Pastorius's Avatar
 
Join Date: Jul 2003
Location: Opening a can
Posts: 3,158
Default

<input type="password" value=""> gives a password field where all text typed into it is converted to asteri IIRC.
__________________
Pastorius is offline   Reply With Quote
Old 30-03-2005, 20:07   #3
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default

Thanks. That actually fixed both problems. I wonder if its because I named the field password so it was getting confused and adding a comma to the end?
Dell19 is offline   Reply With Quote
Old 30-03-2005, 21:06   #4
Pastorius
Custard used tile
 
Pastorius's Avatar
 
Join Date: Jul 2003
Location: Opening a can
Posts: 3,158
Default

if you used <input type="text" name="password"> that doesnt do anything but make an ordinary textbox with reference name "password". The value part gives the predefined text that goes in the input area. AFAIK, there should be no commas at all. BUT, if you give the code you used, we can probably sort it out
__________________
Pastorius is offline   Reply With Quote
Old 30-03-2005, 23:23   #5
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default

I don't have a copy of the file that wasn't working. I remember hearing about the comma problem ages ago on CFC. It might not have been to do with text boxes but it was internet related so thats why I posted it. Anyway I'm sure I'll be back with more problems as I have to lots and lots of stats pages at some point and also get it so the competition actually works. Just doing the user side at the moment to get some experience.
Dell19 is offline   Reply With Quote
Old 31-03-2005, 19:18   #6
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default

New question.

I would like to allow users to update their details however this form needs to display the previously stored details whilst also allowing changes to made.

I have a registration page that works and a user details page that displays the details of a particular user but I cannot see how to merge the two pages together to form the change details page.

Basically it would be easy if it was possible to specify the value of a text box after it has been created. eg

<INPUT TYPE="Text" NAME="surname" SIZE="20"><BR>

and then later on

title.Value='Mr'

This would make it a lot easier but it doesn't seem to work so how else is it possible other than creating a monster.



Dell19 is offline   Reply With Quote
Old 31-03-2005, 19:44   #7
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default

Trying to it the silly way like this:

Title: <SELECT NAME="title">
<OPTION VALUE="Mr"
<%if Rst("title")=Mr then Response.write "SELECTED" End if %>
>Mr
<OPTION VALUE="Mrs"
<% if Rst("title")=Mrs then Response.write "SELECTED" End if %>
>Mrs
<OPTION VALUE="Ms"
<% if Rst("title")=Ms then Response.write "SELECTED" End if %>
>Ms
<OPTION VALUE="Dr"
<% if Rst("title")=Dr then Response.write "SELECTED" End if %>
>Dr
<OPTION VALUE="Rev"
<% if Rst("title")=Rev then Response.write "SELECTED" End if %>
>Rev
</SELECT><BR>

It doesn't work.
Dell19 is offline   Reply With Quote
Old 31-03-2005, 19:58   #8
Pastorius
Custard used tile
 
Pastorius's Avatar
 
Join Date: Jul 2003
Location: Opening a can
Posts: 3,158
Default

Ack! Me no understand complicated scripting language

I can mess up and make javascripts that work on occations, but they cannot access databases.

How come you write:

<option value="whatever"

and not close that tag.

afaik, there should be a way to do an onSelect="function(); return true" or something

DrA ought to know though
__________________
Pastorius is offline   Reply With Quote
Old 31-03-2005, 20:08   #9
Dell19
King
 
Dell19's Avatar
 
Join Date: Apr 2004
Location: Grantham.
Posts: 1,359
Default

The close part of the tag comes after the code.

.asp produces html which can have html around it.

I currently have a huge amount of problems at the moment.

Selection boxes return the first value regardless of what was selected. The client side script is meant to check everything but only checks 2.

Radio buttons return false.

On top of the user details page not working.

I HATE .ASP!!!
Dell19 is offline   Reply With Quote
Old 31-03-2005, 20:42   #10
DrAlimentado
Moderator
 
Join Date: Apr 2003
Location: the cookie jar.
Posts: 1,568
Default


you need to close each option tag properly, not just the select tag.
the code above produces html something like this;

Title: <SELECT NAME="title">
<OPTION VALUE="Title1" [SELECTED|''] >Title1
<OPTION VALUE="Title2" [SELECTED|''] >Title2
etc
</SELECT><BR>

It needs to output more like;

Title: <SELECT NAME="title">
<OPTION VALUE="Title1" [SELECTED|''] >Title1</OPTION>
<OPTION VALUE="Title2" [SELECTED|''] >Title2</OPTION>
etc
</SELECT><BR>


You can change the value of HDOM objects using javascript, although its unsuitable for handling sensitive data like user details - but why can you not fill the values when you serve the page?

What I do when I want to use the same page (form) to both add and edit records is pass the record_id (usually the pk in the record table) in the url. Then I grab the url variables at the top of the page and if record_id is present and is > 0 then I query the record from the db (check for the relevant permissions against the logged-in users access level etc.) and fill variables for each field. If its a new record then I initialise the same vars to 0 or '' or whatever default values I want.
Then draw the form and echo the vars to the fields, or if a select box use the var to select the correct value (as you are doing.)

Show us the javascript and the form code and we'll see if we can fix it. (And I'm sure your not, but just in case you are - don't rely on client-side validation only, its strictly an extra and not a replacement for server-side validation.)
DrAlimentado is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 13:43.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.