ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

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 Dev Shed Forums Sponsor:
  #1  
Old September 10th, 2003, 06:15 AM
atferraz atferraz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 108 atferraz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old September 10th, 2003, 09:26 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #3  
Old September 11th, 2003, 06:44 PM
atferraz atferraz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 108 atferraz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 4 sec
Reputation Power: 6
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > How can I call a sub from within a action form


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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT