...

View Full Version : Send data without form methods



jaywhy13
01-31-2005, 03:28 PM
Is there a possible way that I can send data to the next page without using form methods? No querystrings and no hidden form input boxes...

Is there any possible way that I can do that? :o

abhishek.in
01-31-2005, 03:54 PM
thnx for starting this thread...

i hav been searching an answer for this question for ages.
finally, i had to use cookies.
i wasnt able to send data as such, however i was able to send "arguments" to the next page to load.
this is however very insecure and inefficient way.
anyone, really, anyone who could help..

fractalvibes
01-31-2005, 05:06 PM
You could set a session variable on page1 that would be available on the next page, perhaps.

fv

tboss132
01-31-2005, 05:31 PM
fv's right. Session variables are the way to go. They are available on any page as long as the session is open.

jaywhy13
02-01-2005, 03:52 AM
yeah... i'm familiar with the session variables and application variables.... sorry should hav made my post a lil bit clearer.

And I was jus wondering..... anything but those variables?

tboss132
02-01-2005, 11:09 AM
No, don't think so. What do you have against the variables?

ghell
02-01-2005, 04:23 PM
duh! they are evil :p

glenngv
02-02-2005, 06:25 AM
duh! they are evil :p
They become evil if you use them incorrectly. Just as a hammer is a good tool but if you use it to hit one's head, it becomes bad.

jaywhy13, session variables might be the solution to the problem. But you have to explain the background of the problem to determine if indeed using session variable is the best solution.

abhishek.in
02-02-2005, 08:12 AM
right, session variables will work.
i hav a function/method in one of the pages.
so can i send am argument to it from another?

tboss132
02-02-2005, 09:03 AM
right, session variables will work.
i hav a function/method in one of the pages.
so can i send am argument to it from another?
I don't think you can call a function located in another page from the page you're in presently. - unless, of course you include the page with the function. But if you are just trying to use a variable from another page, there are a number of ways to do that.
1. Use
Server.Transfer("pagewithfunction.asp") to move from the reference page to the page with the function. When you use Server.Transfer as against response.redirect, all your variables remain in memory and you can reference them as you would normally do

2. Use forms on the first page to send your variables to the page with the function.

3. Use session variables. Caution: make sure you destroy the variables immediately you're through using it or else (like ghell said) the session variables might become evil.

ghell
02-02-2005, 10:54 AM
They become evil if you use them incorrectly. Just as a hammer is a good tool but if you use it to hit one's head, it becomes bad.

jaywhy13, session variables might be the solution to the problem. But you have to explain the background of the problem to determine if indeed using session variable is the best solution.

so.. you are saying i shudnt do that to people?... what are hammers good for then ='(

i just stay clear of them pretty much full stop, i think there is one script on my server that stores 1 byte number on them at the moment and thats it.. they sorta crap up the server if you put any moderate amount of data in them dont they?

jaywhy13
02-03-2005, 05:43 AM
If application variables are not the way to go... due to the fact that yeah.... its evil and u sin when u over populate them with 2 much info....

Is there a better way to exchange global data then?

Oh, when i opened this thread... i wasn't searchin for anything in particular... rather just thinkin aloud.... and learning from you guys have to say....

Hope I'm not charged for that.... Ur insight really helps out guys!

ivan
03-03-2005, 07:48 PM
Hi!
I am looking for something similar to this.
I want to send a variable through POST method using javascript. is it possible?
i found a code that gets the selected text and sent it to another page using get. that's simple: it just appends the selected text after some url:


location.href = 'http://www.url.com/page?var='+selectedText;

but i have a problem with GET:
The server here blocks a lot of words in url, so i wanted to send through post, cause the server ignore POST variables.

moreover, this code is in a button in my firefox, so i cant use a form to host the variable and then submit it, because the button will take the selection in any open page.

thanx in advance

ivan
03-08-2005, 04:07 PM
no answears... maybe no solution?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum