|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
BUT... there are <body> tags on your page are there not?
and your form is loaded when your page is right?
__________________
__________ Matty. |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
||||
|
||||
|
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 |
|
#5
|
||||
|
||||
|
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. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Forms and Javascript Question (Newbie) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|