473,657 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass value to a asp file not using form post/get?

17 New Member
Hi, All.
I want to pass a value to asp file on server side but NOT using form post/get. For example:[html]
<input id="regionbox" type="hidden" name="region" value="abc">


function dothing
...
request.open("G ET", "do.asp?"+Date. parse(Date()), true);
...[/html]do.asp file on server side should respond to abc and do sth.
Expand|Select|Wrap|Line Numbers
  1. do.asp
  2. <%
  3. if (???="abc") then
  4. s="http://www.123.com"
  5. end
  6. if (???="abc0") then
  7. s="http://www.000.com"
  8. end
  9.  
  10. use s to do sth
  11.  
  12. ...
  13. %>
It seems ??? can not be replaced with request.queryst ring(). How to do it?

Please show code.
Thank you very much in advance.
Oct 1 '07 #1
3 4287
jhardman
3,406 Recognized Expert Specialist
I'm not sure I understand you. You are saying that you are having troubles adding querystring? I would guess that the problem lies in the javascript junction that adds data to the url. Shouldn't it be more like:
Expand|Select|Wrap|Line Numbers
  1. function dothing
  2. ...
  3. window.open("do.asp?myDate="+Date.parse(Date())+"&myVal=true");
  4. ...
If you explain a little more what you are trying to do, I will try to explain more how I would do it.

Jared
Oct 1 '07 #2
1965
17 New Member
Thank you very much, jhardman.

Let me explain more. I am using proxy script on server side to dynamically retrieve data from 10 rss sources. When the user clicks on one of rss in browser, I want to pass which rss has been clicked and pass the clicked url and name to a proxy script on server. The proxy script handles retrieval of data based on url/name received, and then send data to browser for parsing in order to display.

I can handle one rss retrieval on server side in STATIC way, using one asp file. That is why I want to know how to pass choices by user to that same script on server in order to have Select Case or QueryString or sth else to retrieve the data that user clicks. That is why I want to pass the value.

As form submit post/get is not suitable in current case, can I have other ways to workaround. Google search on this topic says using a hidden input and when user clicks a link, catch the link in that hidden input box using document.getele mentbyid.value. Yes, we can catch that value by using document.getele mentbyid.value, but how can i pass that value to the proxy script on server side.

I do not know if i have made it clear.

Thank you again.
Oct 2 '07 #3
jhardman
3,406 Recognized Expert Specialist
OK, I think I understand the idea, but why is form submit not an option? That is easier and more straight-forward then adding a value to the url, plus url formatting has very specific character restraints and ASP does not have a built-in URLDecode function.

From your example it appears that you are putting the data in the URL but the syntax is garbled. I'm not an expert on javascript but it sounds like it is the javascript that is having a problem, rather than the ASP. After the javascript makes the URL it should look like this:
Expand|Select|Wrap|Line Numbers
  1.  "do.asp?myDate=10%2F2%2F2007&myFeed=rssFeed%2Erss"
notice the characters that need to be escaped and notice the syntax of "page.asp?name= value&name=valu e". Does this answer your question? If this is too tricky, let me see if I can show you how to do it using a form input (which is a lot simpler).

Jared
Oct 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4595
by: Matt | last post by:
How to pass data back and forth between ASP and JSP page? Let's say I have Java objects, how to pass the data back to ASP page?? Or ASP has data, how to pass the data to JSP page?? Please advise. Thanks!
5
14033
by: Belinda | last post by:
Hello All I have the following test.asp page which needs one parameter querystr but my querystr is a very long string value. When I send a long value the query string is getting truncated after some characters. Can you please kindly share the code segment to workaround how to pass such a long string value to a asp page. This is how I invoke the test page:
3
6781
by: Nath | last post by:
Please help!? I am new to writing html, javascript, pretty new to MySQL but quite proficient at writing Perl and i'm a quick learner. I am building a database driven website and i am a little stuck: I have page of results obtained from a MySQL query presented as a table (the first column having checkboxes for each of the rows in the table, and all having the name "seqs"). I have set up a javascript (connected to a "toggle all" checkbox)...
5
3744
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the following code fragments in which I want to list through all files on a directory with a link to download each file by passing a filename and whether or not to force the download dialog box to appear.
19
9074
by: nazgulero | last post by:
Hello all, I wonder if anybody can give me a hint about what I have to do to get this working: I am creating a drop down box using the script below. The result is two text fields; now I want to pass those values, which come from the drop down box, to the next page. The next page should then simply look like this:
15
1965
by: Jack | last post by:
Hi, I have a asp form where one element is a list box which lists four years starting from 2004. This list is drawn from a database table which has YearID and Year as two fields as shown below: YearID YEAR 1 2004 2 2005 3 2006 4 2007 PART OF ASP CODE IS:
19
248149
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect this data is essential to any developer. This article is a basic tutorial on how to user HTML Forms, the most common method of data collection. Assumptions - Basic HTML knowledge. - Basic PHP knowledge. HTML Forms A common and simple way of...
4
4333
by: IRC | last post by:
hey, i am pretty new on javascript as well as PHP, Hey, anyone can you help me, how to pass the javascript array value to php page......... i want to retrieve the values which are arrayed on "selectedValues" from next page for php variable this is my javascript code saved on "sendValue.js" file, <script> function updateRecordEntry(requestValue){
12
11073
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
8420
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
8324
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
8842
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...
0
8740
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
8516
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
7353
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
6176
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
5642
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
4173
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...

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.