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 January 20th, 2005, 12:12 PM
HRH HRH is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 5 HRH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 33 sec
Reputation Power: 0
Forms and Javascript Question (Newbie)

I have an asp page that contains a form. The form consists of some text messages and a button. I want the text messages to be created by a javascript function that would execute when the form loads, but I don't know what to put on the <form> tag to accomplish this. I have looked at the onload command but I am not using <body></body> in my form. Any assistance or suggestions would be appreciated.

Reply With Quote
  #2  
Old January 20th, 2005, 12:16 PM
mathew_conte's Avatar
mathew_conte mathew_conte is offline
this time, it's not kitty
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Ontario, Canada
Posts: 435 mathew_conte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 23 m 25 sec
Reputation Power: 5
BUT... there are <body> tags on your page are there not?
and your form is loaded when your page is right?
__________________
__________
Matty.

Reply With Quote
  #3  
Old January 20th, 2005, 01:17 PM
HRH HRH is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 5 HRH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 33 sec
Reputation Power: 0
I didn't write the initial page. No there isn't a <body> tag anywhere. Basically it's VB script functions with an IF ELSEIF ENDIF at the top to drive the program. The form is part of a series of Response.Write commands (which I thought was kinda weird) like so:

Response.Write "<form name="frmMain"" method=""get"">" & vbCrlf

I was under the impression that a very basic asp page format would be something like ...

<html>
<body>
<%
...
%>

<script language="Javascript">
...
</script>

<form>
</form>
</body>
</html>

At the top would be the VB script that acts as a "driver" and the javascript could either be "inline" with a VB Script block using Script tags or called from within the form.

Am I correct?

Reply With Quote
  #4  
Old January 20th, 2005, 04:22 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 9
Nope ^^;;

Never trust anyone who develops VBScripts for ASP to generate correctly formatted HTML.... not even me (we're all absent minded at some time)

Always review any code you use before implementing it, and always run code through the appropriate HTML validator before you make it public

Reply With Quote
  #5  
Old January 20th, 2005, 07:32 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,721 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377411 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 20 m 20 sec
Reputation Power: 1914
to add text boxes, have such code in the form:
<input type="text" name="text_box_name" value="default_value" />
this would cause text box to appear in the form once the page is loaded in browser.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Forms and Javascript Question (Newbie)


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 5 hosted by Hostway
Stay green...Green IT