|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How can I call a sub from within a action form
I've an asp page with some procedures and functions and from there I design my form. Now, how can I run another sub or functions like sub test2 from that form?
this is the code: sub test1() Response.Write "</head>" Response.Write "<body Class='Geral'>" Response.Write "<CENTER><h1 class='titulo'>search1</h1></CENTER><BR>" Response.Write "<FORM method='post' id='formDialogUser' name='formDialogUser' action=''>" Response.Write "<CENTER><TABLE Class='' border =0>" Response.Write "<TR><TD align='right'><input type='submit' name='Confirm' value='Confirmar'></TD>" Response.Write " <TD align='left' ><input type=button value='out' onclick='window.close()'></TD></TR>" Response.Write "</TABLE>" Response.Write "</CENTER>" Response.Write "</FORM>" Response.Write "</body></html>" end sub sub test2() search code page............ end sub
__________________
atferraz |
|
#2
|
|||
|
|||
|
First question...
Where is the call for sub test1() ??? Secondly... Why oh why are you creating a sub test1() only to display your html ??? why not simply create your html inside the page something like: -------------------------------------------------------- <%@ Language=VBScript %> <html> <body> . . . . . . . . . </body> </html> -------------------------------------------------------- Notice that the html *isn't* intermingled with the ASP, its seperated... Now if I understand correctly, you want to call sub test2() once the user clicks the <submit> button inside your <form>...</form> right? If that is the case, let me know, otherwise I won't assume that's what you want. Hope this helps! Sincerely Vlince |
|
#3
|
|||
|
|||
|
ok,
sub test1() is call from another asp page witch exists only to receive strings from the action forms ant asp redirects. After Select case those strings, another subs and functions are call from there. In fact I've only a few html pages and 3 asp: one for login, another (that) to centralize all function calls (request form actions and calls other functions) and a third one with all those function and subs with html forms and tables. Why? In my project I’ve to put all asp code in DLL files. What other way is there to get asp code into DLL? If you think I wasting my time with this solution, please tell me so because I'm new at these sailings. Yes my intension is to eliminate most of the second asp page witch only job is to request forms from the asp subs and functions and execute calls for others subs and functions that are in the same asp file. So yes for your last question, I want to call another asp sub or functions that are in the same page, pass them arguments and receive as well. Is that possible? How does it work? Thanks |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > How can I call a sub from within a action form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|