zog953 Posted February 27, 2007 Share Posted February 27, 2007 Hi,Please would you take a look at at my portfolio page, I have used a script to allow the page within the Iframe to scroll up and down which works fine IE on Microsoft XP systems. Although people are telling me this doesn't work on Mac's, Firefox and others.953 DesignsIf you are able to help me please do so, it would be much appreciated. Many thanks! Link to comment Share on other sites More sharing options...
zog953 Posted March 2, 2007 Author Share Posted March 2, 2007 Can anyone help? Link to comment Share on other sites More sharing options...
aspnetguy Posted March 2, 2007 Share Posted March 2, 2007 nope, doesn't working Firefox 2.0.0.2 and it is n't producing any JavaScript errors either. Can you post your scroll code? Link to comment Share on other sites More sharing options...
zog953 Posted March 5, 2007 Author Share Posted March 5, 2007 This is the code I have used. <script type="text/javascript">var timer_id;function scroll_iframe(frm,inc,dir) { if (timer_id) clearTimeout(timer_id); if (window.frames[frm]) { if (dir == "v") window.frames[frm].scrollBy(0, inc); else window.frames[frm].scrollBy(inc, 0); timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20); }}function stopScroll() { if (timer_id) clearTimeout(timer_id); }</script><style type="text/css">html { overflow-x: hidden; overflow-y: hidden;}a {text-decoration:none}a:link {color: #666666}a:visited {color: #666666}a:hover {color: #000066}a:active {color: #000066}</style><table border="0"><tr><td height="70" align="center" valign="top"><img src="header.png"/></td></tr><tr><td align="center"><table align="center" border="0"><tr><td><img src="scroll.png"/></td><td><div class="arrows"> <a href="java script:;" onmouseover="scroll_iframe('disp', -4, 'v'); window.status='Hover here to scroll up.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="up.png" alt="" border="0"></a> <a href="java script:;" onmouseover="scroll_iframe('disp', 4, 'v'); window.status='Hover here to scroll down.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="down.png" alt="" border="0"></a></div></td></tr></table></td></tr><tr><td align="center"><IFRAME SRC="port.html" frameborder="0" height="350" width="600" id="disp" NAME="display"></IFRAME></td></tr></table> Link to comment Share on other sites More sharing options...
Xenon Design Posted March 5, 2007 Share Posted March 5, 2007 Quick question: Why not just have a scroll bar? I know it may look better to us designers BUT your average user just wants a scroll bar and not a fancy doodad. We really have to look at visitors as being Neanderthals and we have to spell everything out for them and make everything obvious. <script>function scrollDown(){var obj = document.getElementById('disp');obj.scrollTop += 10;}function scrollUp(){var obj = document.getElementById('disp');if(obj.scrollTop > 9){obj.scrollTop += 10;}}</script> Just basic stuff there. And just put the scroll buttons on the side and maybe make it look like a scroll bar. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now