quarkmike
asked on
Auto scroll to an anchor inside a cfdiv
Hi,
I have a CFDIV
<cfdiv name="test">
<a name="top">TOP</a>
<div style="height:5000px;">con tainer</di v>
<a name="bottom">BOTTOM</a>
</cfdiv>
I need to scroll to the anchor #bottom when i click on a link.
Please Help
Mike
I have a CFDIV
<cfdiv name="test">
<a name="top">TOP</a>
<div style="height:5000px;">con
<a name="bottom">BOTTOM</a>
</cfdiv>
I need to scroll to the anchor #bottom when i click on a link.
Please Help
Mike
ASKER
Thanks Leakim but i need to post value inside cfdiv and go to the anchor (bas) without refreshing the entire page .
Example
test.cfm
<cfdiv id="mike" style="width:100px; height:200px; overflow:hidden;" ></cfdiv>
<a onClick="ColdFusion.naviga te('div.cf m?testValu e=1','mike ');">a</a>
-------------------
div.cfm
<cfparam name="testValue" default="0">
<div style="height:500px;backgr ound-color :red;"><cf output>#no w()#</cfou tput></div >
<a name="bas" id="bas">#testValue#</a>
Example
test.cfm
<cfdiv id="mike" style="width:100px; height:200px; overflow:hidden;" ></cfdiv>
<a onClick="ColdFusion.naviga
-------------------
div.cfm
<cfparam name="testValue" default="0">
<div style="height:500px;backgr
<a name="bas" id="bas">#testValue#</a>
Did you tried this?
<a onClick="ColdFusion.naviga te('div.cf m?testValu e=1#bas','mike');">a</a>
<a onClick="ColdFusion.naviga
ASKER
Yes.
Mike:
<a href="#bottom" onClick="ColdFusion.navigate('div.cfm?testValue=1','mike');">Go to bottom</a>
ASKER
Don't work :/
Please provide a link to see that in live! Thanks :)
ASKER
http://www.cfmike.com/test/test.cfm
test.cfm
<cfdiv id="testDiv" style="width:100px; height:200px; overflow:scroll;" ></cfdiv>
<a href="#bottom" onClick="ColdFusion.naviga te('div.cf m?testValu e=1','test Div');">Go to bottom</a>
div.cfm
<cfparam name="testValue" default="0">
<div style="height:500px;backgr ound-color :red;"><cf output>#no w()#</cfou tput></div >
<cfoutput><a name="bottom" id="bottom">#testValue#</a ></cfoutpu t>
test.cfm
<cfdiv id="testDiv" style="width:100px; height:200px; overflow:scroll;" ></cfdiv>
<a href="#bottom" onClick="ColdFusion.naviga
div.cfm
<cfparam name="testValue" default="0">
<div style="height:500px;backgr
<cfoutput><a name="bottom" id="bottom">#testValue#</a
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys
and add : #bottom to your link
https://www.experts-exchange.com/questions/28367507/Auto-scroll-to-an-anchor-inside-a-cfdiv.html#bottom