473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Performance Question...

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

<%
dim page, strurl, strurldesc
page = trim(request.servervariables("script_name"))
strurl = trim(request.form("strurl"))
strurldesc = trim(request.form("strurldesc"))

if request.totalbytes > 0 then
savelink strurl, session("uid"), strurldesc
%>
<script>
window.opener.navigate(window.opener.document.loca tion.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 1414
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*************@TK2MSFTNGP10.phx.gbl...
hello. i have the following in a form that submits to itself ...

<%
dim page, strurl, strurldesc
page = trim(request.servervariables("script_name"))
strurl = trim(request.form("strurl"))
strurldesc = trim(request.form("strurldesc"))

if request.totalbytes > 0 then
savelink strurl, session("uid"), strurldesc
%>
<script>
window.opener.navigate(window.opener.document.loca tion.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***@TRASHaspfaq.com> wrote in message
news:uU**************@TK2MSFTNGP10.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*************@TK2MSFTNGP10.phx.gbl...
hello. i have the following in a form that submits to itself ...

<%
dim page, strurl, strurldesc
page = trim(request.servervariables("script_name"))
strurl = trim(request.form("strurl"))
strurldesc = trim(request.form("strurldesc"))

if request.totalbytes > 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
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...
115
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...
4
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)....
13
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...
6
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...
18
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...
5
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...
5
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...
5
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,...
30
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.