HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 5th, 2004, 04:52 PM
HijinX HijinX is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 HijinX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 27 sec
Reputation Power: 0
Unhappy Help with Forms and linking external site

Hello,

I need to set-up a form that can obtain a username and password and provide two selections. So a visitor would type in his/her username and password, place a checkmark in box "A" or "B" and click login. If they check "A" the username and password would be passed to http://www.someplace.com/login.cgi if they check "B" they would be sent to http://www/otherplace.com/login.cgi . So far i have one of the ones working the one within this code... ie: e-mail... can't figure out the other link though... any help would be appreciated.

<FORM NAME="logon" METHOD="POST" ACTION="http://someplace.com:8080/login.cgi" target="_blank">
<INPUT TYPE="hidden" NAME="page" VALUE="login">
<TD> <div align="center"><FONT SIZE="1" FACE="Arial, Helvetica"><strong>USERID:<br></strong></FONT>
<INPUT TYPE="text" SIZE="20" NAME="userid">
</div></TD>
<TR>
<TD> <div align="center"><FONT SIZE="1" FACE="Arial, Helvetica"><strong>PASSWORD:<br></strong></FONT>
<INPUT TYPE="password" SIZE="20" NAME="passwd">
</div></TD>


</TR>
<TR>
<TD><div align="center">
<INPUT class="niceinput" TYPE="submit" VALUE="Logon" onClick="return formSubmit(this.form);">
&nbsp;&nbsp;
<INPUT class="niceinput" TYPE="button" VALUE="Help" onClick="openHelp('cs_login')" onMouseOver="statusBarMsg(help)" onMouseOut="statusBarMsg(current)">
</div></TD>

</TR>
<tr><TD><INPUT NAME="Expire_Cache" TYPE="checkbox" VALUE="1" checked>
<FONT FACE="Arial, Helvetica" SIZE="1"> <strong>Check
E-mail</strong></FONT> </TD>
</tr>
<tr><TD> <INPUT TYPE="checkbox" NAME="Use_Cookie" VALUE="1">
<FONT FACE="Arial, Helvetica" SIZE="1"> <strong>Account
Management</strong></FONT></TD>
</tr>
</FORM>


--- HiJinX ---

Reply With Quote
  #2  
Old May 6th, 2004, 04:49 AM
bhupi_dhami bhupi_dhami is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 6 bhupi_dhami User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
reply

I could not get you properly. As far as I have understood, u want the form to be posted to one of the sites depending on which checkbox the user chooses. If this is the case, the code should be simple. First of all, remove the ACTION attribute of the form. Set the id attribute of the form as 'logon' (this is the same value as that of the attribute 'name'). Then, in the formSubmit method, u should first check which checkbox has been checked (please make sure that the user is able to select only one checkbox). Then, depending on the checkbox, set the action attribute of the form dinamically, like

document.all.logon.action = "";

The say

document.all.logon.submit.

This should work.

Reply With Quote
  #3  
Old June 9th, 2004, 01:00 AM
Prayer Prayer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: eastern PA
Posts: 8 Prayer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Prayer
I just joined to get similar answers that you are seeking. I have found some gond things in your code and have examined the definition and additional amount and found the following note:

If you click the "Submit" button, you will send your input to a new page called form_action.asp.

Looks like you can go to exactly ONE page. So send to logon.html and since input items are available, process with if condition. If "A" then form action to someplace else froma action to other place. Now you have split to two forms based upon the "A" OR "B" condition and resubmit all other items to one of the two pages.

I'll need to use PHP to verify that the username & password are in the database and send them to welcome screen and set logon var on. Else send to access denied screen and set logon var to off.

Hmmm, can a hacker find this var and somehow force it to be on?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Help with Forms and linking external site


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway