Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting URL of the page and passing it to other page 5

Status
Not open for further replies.

zxcdf5je

Programmer
Apr 1, 2005
86
US
hi there,
I have this page which lists all the users name and they can be edited deleted and updated.The page which does that is 2.asp and the page which actually lists all the users is 1.asp.
when i delete a particular user by using 2.asp ,after delteing the users name it redirects me to the first page of 1.asp and i again have to go do 28th page to proceed ahead with other users..is there any way i could catch that page number /page and make the user return to the page from where they came from?

Hope u are understanding what i want..
help needed..pleaseeeee

-Smita

1.asp uses this code to catch url:
'-------------------------------
' list Navigation begin
'-------------------------------
bEof = rs.eof
if not(rs.EOF and iPage=1) then
if iPage = 1 then
%>
<font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Previous</font>
<%
else
%>
<a href="<%=file_name%>?<%=form_params%><%=sSortParams%>Formlist_Page=<%=iPage - 1%>#list"><font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Previous</font></a>
<%
end if
response.write "&nbsp;[&nbsp;" & iPage & "&nbsp;]&nbsp;"

if bEof then
%>
<font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Next</font>
<%
else
%>
<a href="<%=file_name%>?<%=form_params%><%=sSortParams%>Formlist_Page=<%=iPage + 1%>#list"><font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Next</font></a>
<%
end if
end if
'-------------------------------
' list Navigation end
'-------------------------------

2.asp
has just a variable sActionField="1.asp"
which if delete update pressed would point to this variable and take it to the first page ..

hope that helps
 
or add & between 1 and #list as fester suggested, i've done that on my sample so you can try out
 
WOWOWWOO i am lagging behind today...i got to read all these changes u guys have suggested and then try each one of them!!!
hold on for me..i am right behind u guys...
 
ok now here i wht i need to do right sheco and steven 90..
i have the reformatted page1 given by sheco which i am going to replace it,then i am going to add the hidden field like this in page2:
<input type="hidden" name="pageno" value="<%=request("Formlist_Page")%>">
and have
sActionFileName = " & request("s_company") & "&Formlist_Page=" & request("pageno") &"#list"

right guys?
thats wht i caught while i read ur posts..if i am wrong..please do correct me?

else please send me the modified files(both of them),,...

Thanks a lot and thanks a million trillion to you guys...
-Smita
 
was that message to me?
i dint do anything ..was waiting for ur reply to go ahead and do it!!

let me know ..

-smita
 
Don't use the reformatted code, it was a dead branch of the evolutionary tree.
 
ok guys i used the page1.asp as it is (which i had posted above)
i did modifications on page2:
did the hidden field thingi (in page2) and changed the
sActionFileName = " & request("s_company") & "&Formlist_Page=" & request("pageno") &"#list"

now when i click update it takes me to:

where am i going wrong?
 
now that problem has gone away as i removed the extra coding when i posted it..
now it gives me Clng error...

wht shud i do..
 
yup it worked!!! wow finally this code worked..and i guess my post had brokent he record with 113 replies..cool.

But thanks a lot to sheco and steven and others who have been real patient with me and who addressed all my silly quiestions..you guys really deserve a treat from me...
lets go for lunch!!!

thanks so much and i am going to post a new thread soon...
hope i can get the same overwhelming response from you guys...
let me know abt the lunch!!
Thanks a million sheco and steven90

-Smita
 
not a problem,

always remember those who helped you along the way
 
A special thanks to FesterSXS too for helping me out and giving this small little tip which was so much needed for the code to get working!!
Thanks a lot FesterSXS

appreciate it!!

-Smita
 
I feel good !!!
Thanks once again..hey anyone knows abt any forum related to virtual hosting problems on linux box?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top