SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 17th, 2005, 09:02 PM
Wolf_22 Wolf_22 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Cloverdale, IN
Posts: 5 Wolf_22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 5 sec
Reputation Power: 0
Send a message via Yahoo to Wolf_22
Unhappy Have a Q about selection tags...

I have a selection tag in some of my JavaScript, and heres how it goes:

Quote:
<select name=memlist size=10 onChange="showmem(this.form)">
<!-- "member name | password | destination pagename |" -->
<option selected value="John Smith|password|mainpage|">John Smith
<option value="Peter Jones|theirpwd|endpages|">Peter Jones
<option value="Sue Brown|asdfvcxz|nowheres|">Sue Brown
<option value="Sally West|zaqxswde|logintop|">Sally West
</select></td>


Now each option tag has a "value" attribute inside it, and the values given for it are like this, or are in this format:

Quote:
...
<option value="User Name|Password|Directed Address">John Doe ...



Now my question is this:
What do those dern bars do inside the "value" attribute's value? I know that in C++ those bars when coupled together with one another set an argument to make an "or" parameter, but I know for a fact that this isn't the case in this given code. Inside the login it sets the given example as the username, password, and directed site when a certain username is selected, but when the script is inacted, is it those bars that tell the browser that when a given username is selected that the password and site are translated along with the username???

Thanks for any help.

Reply With Quote
  #2  
Old March 17th, 2005, 09:10 PM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: I have emerged from the place of spells and fairies
Posts: 97 ChiefWigs1982 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 17 h 35 m 12 sec
Reputation Power: 4
They don't mean anything. I assume they are just to separate
the data so the script can split the string up to get the bits it's
after. Hard to tell without actually seeing the script though, so
could you post the code for the actual script please?

Even better: can you paste a link to the live page?

Reply With Quote
  #3  
Old March 18th, 2005, 07:38 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
That has to be the least secure method of username/password i have ever seen =)
I advise you not post a live example as promoting a user's password and their login destination is a bad thing.

As Agent47 has stated, I'm pretty sure that the pipe's are used as delimeters to divide the value into the three necessary parts.

I am curious though, how does this select box get populated?
If you have a new user, is it just manually added to the list (editing the HTML in a text editor)

Reply With Quote
  #4  
Old March 23rd, 2005, 11:14 AM
dejaone dejaone is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 34 dejaone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 47 m 11 sec
Reputation Power: 4
I'd use some id in select value, and store username/password in backend.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Have a Q about selection tags...


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 1 hosted by Hostway