473,385 Members | 1,610 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,385 software developers and data experts.

To grab the name of the ASP page on the server

On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp',
c_iLOADNEW, '_self')"

function SubmitForm( FormName, ActionASP, ActionVal, TargetVal )
eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ;
eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" +
ActionVal + "'" ) ;
eval( "document." + FormName + ".submit()" ) ;

On the server, I would like to grab the name of the ASP page which was
called when the user hit the submit button which happens to be stored in
the variable ActionASP. But this variable resides on the client so I
can't reference it (ActionASP) on the server. I could put this variable
in the query string like I'm doing ActionVal but I don't want to do
that. Is there any other way I can grab that name on the server?

I know doing Request.QueryString( "Action" ) gives me what was passed
after the "?". Is there a way to get the pagename that happens to be
before the "?" OR is there another way of doing this?

Any ideas, suggestions would be appreciated.

Thanks,
Andy.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #1
3 1352
Wouldn't it just be the page itself that is running? If I submit a form to
page1.asp, page1.asp is the page that's processing the data! So, if your
question is about how to return an ASP file's own name to itself, see
http://www.aspfaq.com/show.asp?id=2072.

--

Ray at work
Microsoft ASP/ASP.NET MVP
"Andy Kasotia" <ak******@guideone.com> wrote in message
news:uo****************@TK2MSFTNGP10.phx.gbl...
On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp',
c_iLOADNEW, '_self')"

function SubmitForm( FormName, ActionASP, ActionVal, TargetVal )
eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ;
eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" +
ActionVal + "'" ) ;
eval( "document." + FormName + ".submit()" ) ;

On the server, I would like to grab the name of the ASP page which was
called when the user hit the submit button which happens to be stored in
the variable ActionASP. But this variable resides on the client so I
can't reference it (ActionASP) on the server. I could put this variable
in the query string like I'm doing ActionVal but I don't want to do
that. Is there any other way I can grab that name on the server?

I know doing Request.QueryString( "Action" ) gives me what was passed
after the "?". Is there a way to get the pagename that happens to be
before the "?" OR is there another way of doing this?

Any ideas, suggestions would be appreciated.

Thanks,
Andy.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 22 '05 #2
Uh, aren't you already on that page?
Look at the Request.ServerVariables collection

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Andy Kasotia" <ak******@guideone.com> wrote in message
news:uo****************@TK2MSFTNGP10.phx.gbl...
On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp',
c_iLOADNEW, '_self')"

function SubmitForm( FormName, ActionASP, ActionVal, TargetVal )
eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ;
eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" +
ActionVal + "'" ) ;
eval( "document." + FormName + ".submit()" ) ;

On the server, I would like to grab the name of the ASP page which was
called when the user hit the submit button which happens to be stored in
the variable ActionASP. But this variable resides on the client so I
can't reference it (ActionASP) on the server. I could put this variable
in the query string like I'm doing ActionVal but I don't want to do
that. Is there any other way I can grab that name on the server?

I know doing Request.QueryString( "Action" ) gives me what was passed
after the "?". Is there a way to get the pagename that happens to be
before the "?" OR is there another way of doing this?

Any ideas, suggestions would be appreciated.

Thanks,
Andy.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 22 '05 #3
Thank you for your response. The aspfaq.com site answered my question.
Thanks much.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #4

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

Similar topics

12
by: Larry R. Baker | last post by:
Is it possible to grab a client side IP Address using JavaScript in an htm page? I have a web page hosted on a non-ASP server and I want a piece of code in JavaScript to grab the IP address of the...
2
by: David Taylor | last post by:
I'm looking for a way to grab the HTML behind one of my pages and display it to the user. The page I'm trying to get the HTML from is an ASP page, so obviously I'm looking for the post-asp...
2
by: Jack | last post by:
Hi, I got a simple form where one needs to input data. The data is being processed in an asp page. However, I cannot figure out why couple of values I am typing in the form is not being retrived...
3
by: James | last post by:
Hi guys, I have been building a search engine here - not because I have plans of dethrowning Google but as a simple app upon which to develop a function set that I can use for other things. ...
10
by: Jonathan Schwarz via DotNetMonster.com | last post by:
Hi folks, I am a complete newbie to ASP.NET, VB, etc... I am coming from a Cold Fusion background where it only takes me 4 lines to query a MSSQL db and display a field name. Please, how do I...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
8
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the...
6
by: fmdevelopertim | last post by:
New to AJAX so sorry if this is simple. Have a page that gives the user a list to select a brand. Based on the brand selected it shows a list of sizes available using the following code: ...
19
by: JRough | last post by:
I have used this function to create a string called $headers: function GetHeaders($file_name){ return "<th><a href='".$file_name."&order_by=l_e'>L_E</a></th> <th><a href='"....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.