473,604 Members | 2,681 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 1419
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
2324
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
7556
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
3355
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
2746
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
1714
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
14964
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
2018
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
1895
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
1974
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
3499
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
7997
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
7929
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
8419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8065
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
8274
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...
1
5882
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
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3906
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...
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.