Author |
Topic  |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 06 March 2001 : 11:31:29
|
Hi!
I've got the login workin' and soo, see site: http://bjorkelund.snoop.dk/ . But I'd like the submit button, with the text "Logga in", to automatically, when pressed, not only refresh it's own fram, but also target the adress http://cheetah.121host.net/forum/default.asp in the main frame, which frame-name is "Text". How to do this!? The submit buttons action goes like this: <form action="<% =Request.ServerVariables("URL") %>" method="post" id=form1 name=form1>
Is this possible!? Please help me! :)
cheers /CHEETAH
|
|
babygate
Starting Member
32 Posts |
Posted - 06 March 2001 : 23:08:56
|
You can write a Javascript function to do it. Something like this:
<SCRIPT language=JavaScript> <!-- update another frame when a button is clicked function loadFrames(frame,page) { eval("parent."+frame+".location='"+page+"'"); } // End --> </SCRIPT>
Then on your submit buttom, add the follow:
<INPUT type="submit" value="Login" id=submit1 name=submit1 onClick="javascript:loadFrames('Text','default.asp')">
Hope this will do what you want.
|
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 07 March 2001 : 02:00:58
|
great! thanks! I will try that! :)
|
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 07 March 2001 : 05:31:30
|
quote:
<SCRIPT language=JavaScript> <!-- update another frame when a button is clicked function loadFrames(frame,page) { eval("parent."+frame+".location='"+page+"'"); } // End --> </SCRIPT>
<INPUT type="submit" value="Login" id=submit1 name=submit1 onClick="javascript:loadFrames('Text','default.asp')">
I did exactly as you said above! But it didn't work! The script in the head, and the input in the body! 
cheers /CHEETAH
|
 |
|
babygate
Starting Member
32 Posts |
Posted - 07 March 2001 : 14:19:11
|
Sorry StockholmStudent, my mistake. I didn't read all your question. I throught u just want to update the target frame with a particular page within the same website.
Besides the frame, you probably want the cookies and sessions to update too. Is this correct?
BabyGate |
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 07 March 2001 : 15:16:08
|
quote:
Sorry StockholmStudent, my mistake. I didn't read all your question. I throught u just want to update the target frame with a particular page within the same website.
Besides the frame, you probably want the cookies and sessions to update too. Is this correct?
BabyGate
right. that sounds right... :) dunno what a session is.. but it souds good! :)
|
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 10 March 2001 : 04:27:14
|
are you done with it?
|
 |
|
babygate
Starting Member
32 Posts |
Posted - 10 March 2001 : 08:11:13
|
I am sorry, I have been away....
I don't think it's possible to login from your main site, and then redirect to a page hosted on a different server, and still wish to maintain the same cookies or sessions. Is both of your homepage and forum hosted on the same server?? If not, the only suggestion i have for you is to host both of your homepage and forum in the same server (that will work), or Maybe someone else may know an another way...
Edited by - babygate on 10 March 2001 08:25:10 |
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 10 March 2001 : 11:30:26
|
quote:
I am sorry, I have been away....
I don't think it's possible to login from your main site, and then redirect to a page hosted on a different server, and still wish to maintain the same cookies or sessions. Is both of your homepage and forum hosted on the same server?? If not, the only suggestion i have for you is to host both of your homepage and forum in the same server (that will work), or Maybe someone else may know an another way...
Edited by - babygate on 10 March 2001 08:25 :10
thats bad. I have only 20MB of free asp host from121hos.net... that wont be enough for the homepage too! :( I even have the forum images on another server than 121host! 
|
 |
|
StockholmStudent
Junior Member
 
Sweden
329 Posts |
Posted - 10 March 2001 : 11:47:47
|
but wait! The little menu in the menu which includes the login thing is on the same server as the forum! YES!
MAYBE IT CAN WORK THEN!? HOW!?
|
 |
|
|
Topic  |
|