Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2005, 02:28 PM   PM User | #1
jaywhy13
Regular Coder

 
Join Date: Dec 2004
Location: Jamaica
Posts: 592
Thanks: 2
Thanked 0 Times in 0 Posts
jaywhy13 is an unknown quantity at this point
Send data without form methods

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?
__________________
I'm gonna find a way to download the internet if its the last thing I do...
Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished
jaywhy13 is offline   Reply With Quote
Old 01-31-2005, 02:54 PM   PM User | #2
abhishek.in
New Coder

 
Join Date: Jan 2005
Location: INDIA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
abhishek.in is an unknown quantity at this point
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..
abhishek.in is offline   Reply With Quote
Old 01-31-2005, 04:06 PM   PM User | #3
fractalvibes
Regular Coder

 
Join Date: Aug 2002
Location: Texas
Posts: 287
Thanks: 0
Thanked 0 Times in 0 Posts
fractalvibes is an unknown quantity at this point
You could set a session variable on page1 that would be available on the next page, perhaps.

fv
fractalvibes is offline   Reply With Quote
Old 01-31-2005, 04:31 PM   PM User | #4
tboss132
Regular Coder

 
Join Date: Oct 2004
Location: In front of this computer. (Where else?)
Posts: 442
Thanks: 0
Thanked 0 Times in 0 Posts
tboss132 is an unknown quantity at this point
fv's right. Session variables are the way to go. They are available on any page as long as the session is open.
__________________
Tomorrow is the first day of the rest of your life... What have you done today?
Tutorials
Web: w3schools, htmldog General tips: Hardware, Networking
tboss132 is offline   Reply With Quote
Old 02-01-2005, 02:52 AM   PM User | #5
jaywhy13
Regular Coder

 
Join Date: Dec 2004
Location: Jamaica
Posts: 592
Thanks: 2
Thanked 0 Times in 0 Posts
jaywhy13 is an unknown quantity at this point
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?
__________________
I'm gonna find a way to download the internet if its the last thing I do...
Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished
jaywhy13 is offline   Reply With Quote
Old 02-01-2005, 10:09 AM   PM User | #6
tboss132
Regular Coder

 
Join Date: Oct 2004
Location: In front of this computer. (Where else?)
Posts: 442
Thanks: 0
Thanked 0 Times in 0 Posts
tboss132 is an unknown quantity at this point
No, don't think so. What do you have against the variables?
__________________
Tomorrow is the first day of the rest of your life... What have you done today?
Tutorials
Web: w3schools, htmldog General tips: Hardware, Networking
tboss132 is offline   Reply With Quote
Old 02-01-2005, 03:23 PM   PM User | #7
ghell
Senior Coder

 
Join Date: Apr 2003
Location: England
Posts: 1,192
Thanks: 5
Thanked 13 Times in 13 Posts
ghell is on a distinguished road
duh! they are evil
__________________
My tech/code blog
ghell is offline   Reply With Quote
Old 02-02-2005, 05:25 AM   PM User | #8
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Quote:
Originally Posted by ghell
duh! they are evil
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.
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 02-02-2005, 07:12 AM   PM User | #9
abhishek.in
New Coder

 
Join Date: Jan 2005
Location: INDIA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
abhishek.in is an unknown quantity at this point
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?
abhishek.in is offline   Reply With Quote
Old 02-02-2005, 08:03 AM   PM User | #10
tboss132
Regular Coder

 
Join Date: Oct 2004
Location: In front of this computer. (Where else?)
Posts: 442
Thanks: 0
Thanked 0 Times in 0 Posts
tboss132 is an unknown quantity at this point
Quote:
Originally Posted by abhishek.in
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
Code:
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.
__________________
Tomorrow is the first day of the rest of your life... What have you done today?
Tutorials
Web: w3schools, htmldog General tips: Hardware, Networking
tboss132 is offline   Reply With Quote
Old 02-02-2005, 09:54 AM   PM User | #11
ghell
Senior Coder

 
Join Date: Apr 2003
Location: England
Posts: 1,192
Thanks: 5
Thanked 13 Times in 13 Posts
ghell is on a distinguished road
Quote:
Originally Posted by glenngv
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?
__________________
My tech/code blog
ghell is offline   Reply With Quote
Old 02-03-2005, 04:43 AM   PM User | #12
jaywhy13
Regular Coder

 
Join Date: Dec 2004
Location: Jamaica
Posts: 592
Thanks: 2
Thanked 0 Times in 0 Posts
jaywhy13 is an unknown quantity at this point
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!
__________________
I'm gonna find a way to download the internet if its the last thing I do...
Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished
jaywhy13 is offline   Reply With Quote
Old 03-03-2005, 06:48 PM   PM User | #13
ivan
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ivan is an unknown quantity at this point
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:

Code:
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 is offline   Reply With Quote
Old 03-08-2005, 03:07 PM   PM User | #14
ivan
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ivan is an unknown quantity at this point
no answears... maybe no solution?
ivan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:01 PM.


Advertisement
Log in to turn off these ads.