Click to See Complete Forum and Search --> : Href & Variable Probs
johannesburgboy
06-17-2003, 07:31 AM
Howzit guys.
Is it possible to redirect to a new page sending variables AND an href to scroll down to for example:
response.redirect "newpage.asp?var1=6&var2=1223#scrollTo
var1 = 6
var2 = 1223
scrollTo = <a name="scrollTo"></a> (tag on newpage.asp).
pulling my hair out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if anyone knows the javascript for this please help.
shoud be something like this:
document.location.href = "newpage?var1="+var1 + "&var2="+var2 + "#scrollTo
gerjan
06-17-2003, 08:30 AM
I once made it in an intranet.
Ofcourse I checked if it works on al the pc's.
I did it like this:
http://www.domain.nl/forum.asp?variable1=variable1#18
But like Dave already sad, be carefull because this is clientsite!
johannesburgboy
06-17-2003, 10:34 AM
thanks guys.
i have tried that and it worked - (daves idea)
gerjan yours i have tried but it did not work. i assumed that it was wrong.
both the <a name="<%=scroll%>"></a>
and the link was dynamicly drawn from the database. could this be the reason?
<body onload="self.location.hash='<%=aspVarName%>';"> is called before the actual anchor is created later in the page
<blah><blkah
text text text
<a name="<%=objsql("anchor")%>"></a>
???
gerjan
06-18-2003, 03:23 AM
Hi,
Sorry it didn't work.
I think it's the client side problem :)
It worked for me here, I'm cureous it does not work here by you either.
Would you check this for me?
http://www.compenz.nl/fice/forum/forum.asp?titel=FICE Forum januari 2003
johannesburgboy
06-18-2003, 07:46 AM
oi oi oi
not sure where in the page it was supposed to scroll to but the link you gave me was quite empty.
only the top read: "fice forum"
the rest of the page had a background image but no text. also there was no scroll bars as to indicate that the page is only 1024 X 768 px.
am i talking gibberish? so, basicaly it did not scroll anywhere.
hoe is dit in nederland?
ik was er geweest in desember 1997 en weer in 2001. wij sprechen akrikaans hier. het afrikaans is heel naby aan nederlands. ik vind amsterdam heel leuk hoor. mijn nederlands is nite meer zo goed. ik hebt die lank gelede geleerden.
bent jij van ansterdam?
johannesburgboy
06-18-2003, 07:50 AM
sorry i am an idiot. it does work if you use the link yuo gave me pluse '#34' or '#21' or whatever. well done. but are these anchors created dynamically? mine is not in the code. they are objects drawn from the databse. anyway, thanks for your help bud, i managed ok.