Irish SEO,  Marketing & Webmaster Discussion

 

javascript

This is a discussion on javascript within the Coding Help forums, part of the Webmaster Help category; Hi All, I have a question regarding a javascript function, can i put an if / else statement inside a ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-04-2007, 09:35 AM
7aken's Avatar
Frontpage User
 
Join Date: Oct 2006
Posts: 23
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
7aken will become famous soon enough
Default javascript

Hi All,

I have a question regarding a javascript function,

can i put an if / else statement inside a function?

more specifically, my problem is this
I am writing a login script which will allow a user to enter username and password, and be allowed access. i also want to be able to give this user the option of entering a 'pin' number, which will also allow access. i have discovered that i can create a new filed using the username and let the user enter their pin here (ie the username is the pin) in which case the password is not required. how do i write this in javascript though?

i have this





Code:
 <script type="text/javascript">
 <!--
     function doLogin() {
  document.sendin.username.value = document.login.username.value;
  document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
  document.sendin.submit();
  return false;
     }
 //-->
 </script>




( i have posted before with something similar but didnt receive an answer)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-04-2007, 03:50 PM
ph3n0m's Avatar
Webmonkey
Recent Blog: Show and click
 
Join Date: Jan 2006
Location: Ireland
Posts: 300
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ph3n0m will become famous soon enough
Default

of course


JavaScript If...Else Statements
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
javascript

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
JavaScript Gallery With Picture Caption Peter McC Coding Help 5 20-02-2007 06:26 PM
javascript help 7aken Coding Help 2 20-02-2007 06:09 AM
Javascript - Open and configure new browser wheres me jumpa Coding Help 7 20-01-2007 04:32 PM
Javascript Captcha for use on forms louie Coding Help 8 23-10-2006 09:22 AM
Javascript Menu Help (again...)? ButtermilkJack Coding Help 18 25-04-2006 12:32 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 04:38 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0