HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
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:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 6th, 2008, 05:02 AM
chetan1 chetan1 is offline
Banned
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 10 chetan1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 23 sec
Warnings Level: 1
Reputation Power: 0
Problem in javascript code.

Hi
I made such code, but once I click any of login links, my $_POST array has only statusx value, but not UserName and PassWord. What should I change?



Code:
<script language="Javascript">
function submitForm(action)
{
document.all.formlogin. innerHTML = document.all.formlogin.innerHTML +
"<input type=hidden name=statusx value=" + action + ">";
document.formlogin. submit();
}
</script>

<form name = "formlogin" action = "index.php" method = "POST">
UserName: <input type = "text" name = "UserName"></br></br>
PassWord: <input type = "password" name = "PassWord"></br></br>
<a class = "login" href="javascript: submitForm(\'temp\');"> Temporary Login</a></br>
<a class = "login" href="javascript: submitForm(\'perm\');"> Permanent Login</a>
</form>

Last edited by Shadow Wizard : May 9th, 2008 at 04:19 AM. Reason: removed signature

Reply With Quote
  #2  
Old May 9th, 2008, 10:06 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,831 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 15 h 16 m 28 sec
Reputation Power: 57
Code:
UserName: <input type="text" name="UserName"></br></br>
PassWord: <input type="password" name="PassWord"></br></br>
I'd recommend you look at some of the basics of HTML and JavaScript as the code you are writing is not going to work All the spaces surround = signs for starters are causing malformed HTML syntax and "javascript: submitForm" should be "javascript:submitForm"
__________________
selwonk

Reply With Quote
  #3  
Old May 9th, 2008, 11:45 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Mar 2005
Location: I used to live at home, now I stay at the house
Posts: 3,269 ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 1 Month 1 Week 2 Days 11 h 20 m 8 sec
Reputation Power: 228
Facebook
Quote:
Originally Posted by selwonk
I'd recommend you look at some of the basics of HTML and JavaScript
I agree.

Quote:
Originally Posted by selwonk
as the code you are writing is not going to work All the spaces surround = signs for starters are causing malformed HTML syntax and "javascript: submitForm" should be "javascript:submitForm"
Sorry, but none of that is true.

Chetan,

Instead of trying to [incorrectly] add to the <form>s HTML, put the
hidden field in there by default with an empty value, and simply use
the script to set the value of it before submitting.
__________________
Support requests via PM will be ignored!
Route of Queue | The General FAQ Thread | HOW TO POST A QUESTION

Sign up with Matched.co.uk and earn up to £15 per website every month!


Reply With Quote
  #4  
Old May 14th, 2008, 06:26 AM
getlucky getlucky is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 6 getlucky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 32 m 23 sec
Warnings Level: 5
Reputation Power: 0
You have madesome mistakes in html and javascript syntaxes.I would say one thing
clear ur fundamentals.

Reply With Quote
  #5  
Old May 14th, 2008, 09:04 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Mar 2005
Location: I used to live at home, now I stay at the house
Posts: 3,269 ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 1 Month 1 Week 2 Days 11 h 20 m 8 sec
Reputation Power: 228
Facebook
Quote:
Originally Posted by getlucky
You have done html and javascript syntaxes.I would say one thing
clear ur fundamentals.
Eh?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Problem in javascript code.


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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