473,909 Members | 4,189 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Performance Question...

hello. i have the following in a form that submits to itself ...

<%
dim page, strurl, strurldesc
page = trim(request.se rvervariables(" script_name"))
strurl = trim(request.fo rm("strurl"))
strurldesc = trim(request.fo rm("strurldesc" ))

if request.totalby tes > 0 then
savelink strurl, session("uid"), strurldesc
%>
<script>
window.opener.n avigate(window. opener.document .location.href) ;
window.close();
</script>
<%
end if
%>

<form name="Form" action="<%=page %>" method="post">
<snip />
</form>

Is this 'alright', or is there a better method for submitting the form
to itself?

Jul 19 '05 #1
3 1425
You can leave out the action altogether, and save the hassle of figuring out
the URL. A form without an action submits to itself...

"Aaron" <a@1.net> wrote in message
news:uW******** *****@TK2MSFTNG P10.phx.gbl...
hello. i have the following in a form that submits to itself ...

<%
dim page, strurl, strurldesc
page = trim(request.se rvervariables(" script_name"))
strurl = trim(request.fo rm("strurl"))
strurldesc = trim(request.fo rm("strurldesc" ))

if request.totalby tes > 0 then
savelink strurl, session("uid"), strurldesc
%>
<script>
window.opener.n avigate(window. opener.document .location.href) ;
window.close();
</script>
<%
end if
%>

<form name="Form" action="<%=page %>" method="post">
<snip />
</form>

Is this 'alright', or is there a better method for submitting the form
to itself?

Jul 19 '05 #2
Just be aware of what happens if you're on the directory's default page when
you do this, ie. http://yoursite.com/ If there's no pagename in the url,
you'll get a 405 when you post.

Ray at work

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:uU******** ******@TK2MSFTN GP10.phx.gbl...
You can leave out the action altogether, and save the hassle of figuring out the URL. A form without an action submits to itself...

"Aaron" <a@1.net> wrote in message
news:uW******** *****@TK2MSFTNG P10.phx.gbl...
hello. i have the following in a form that submits to itself ...

<%
dim page, strurl, strurldesc
page = trim(request.se rvervariables(" script_name"))
strurl = trim(request.fo rm("strurl"))
strurldesc = trim(request.fo rm("strurldesc" ))

if request.totalby tes > 0 then
savelink strurl, session("uid"), strurldesc
%>

Jul 19 '05 #3
> Just be aware of what happens if you're on the directory's default page
when
you do this, ie. http://yoursite.com/ If there's no pagename in the url,
you'll get a 405 when you post.


True, if you know your form is on the default page, you can just hardcode /
or even http://yoursite.com/ ... still without having to futz with all that
servervariable parsing.

A
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2347
by: Randell D. | last post by:
Folks, I have a Javascript performance question that I might have problems explaining... In PHP, better performance can be obtained dealing directly with a variable, as opposed to an element in an array... Thus, if I have a programming routine that utilises $a several times, it is better to write the value contained in $a to something else, for example, $vartmp, and have my routine instead use this for its work... I believe
115
7702
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical transform function. When compiling under gcc on my big-endian PowerPC (Mac OS X), declaring this array as "static" DECREASES the transform throughput by around 5%. However, declaring it as "static" on gcc/Linux/Intel INCREASES the throughput by...
4
3370
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design). Reason for my question is that application has 5mb, while without graphics it has cca 400kb. Graphic files (bmps) take about 200kb (in program, they are repeated many times, ie almost all labels (around 200) have same background image)). Also,...
13
2781
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance of C and I achieved that aim very early on. See, for example "The Design and Evolution of C++". -- Bjarne Stroustrup; http://www.research.att.com/~bs
6
1723
by: Mike | last post by:
Lets just say my app is done HOO HOO. Now, I'm accessing the database via a web service and one thing i noticed that my app is running real slow. When I first started working on the app is ran pretty quick returned the data to the screens in about 2 - 3 seconds. Now its going about 5 - 10 seconds. How can I beef it up for better performance.
18
14985
by: Rune B | last post by:
Hi Group I was considering using a Generic Dictionary<> as a value container inside my business objects, for the reason of keeping track of fields changed or added and so on. - But how expensive is it to instantiate/use Generic Dictionaries in great numbers (let's just say 100000's ), in terms of memoryuse and performance? Any practical experiences out there?
5
2044
by: Varangian | last post by:
Hi, I have a performance issue question? which is best (in terms of efficiency and performance, I don't care neatness in code)... building an ArrayList of Object Instances using SqlDataReader OR using SqlDataAdapter to Fill a DataSet or DataTable ? Thanks!
5
1921
by: Markus Ernst | last post by:
Hello A class that composes the output of shop-related data gets some info from the main shop class. Now I wonder whether it is faster to store the info in the output class or get it from the main class whenever it is needed: class shop_main { var $prices = null; function &get_prices() {
5
1994
by: toton | last post by:
Hi, I want a few of my class to overload from a base class, where the base class contains common functionality. This is to avoid repetition of code, and may be reducing amount of code in binary, not to get polymorphic behavior. None of them has virtual methods, and are self contained (no destructor at all) thus do not have a chance to have memory error. Thus the derived classes has additional functionality, not additional data.
30
3596
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
0
10035
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9877
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10919
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10538
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8097
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6138
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.