View Full Version : Scrollbar On Inline Frame (i've tried everything!, pulease help!)
StarSparklz 05-13-2004, 09:10 PM I've tried everything i can to get a inline frame to scroll ONLY horizontaly, you know the layouts that scroll the whole page horizontally? Well, how do you get an inline frame to scroll horizontally? I desperately need this, for a pixel clique im starting, and if there is no way to scroll horizontally, there is a image slideshow at dynamic drive that is called "conveyor belt slide show script" and i've tried that, but i cant figure out how to make the images border=0, ive even tried border=0 and it seems to be permanently spaced!! Please help, if there is any other ideas to make a sort of images go like this: XXXXXXXXXXXXXXXXXX
and not like this: X X X X X or like this:
XXXX
XXXX
they seem to either be spaced out in a slide show, or if not in a slide show they want to scroll down and not sideways.
PLEASE HELP, i've looked everywhere for tutorials.
salomeyasobko 05-13-2004, 10:49 PM try adding the red part to your iframe code:
<iframe style="overflow-x: auto; overflow-y: hidden; height: ##px; width: ##px">
hopefully that will work! let me know :)
EDIT: wait, did you want it to be a scrolling marquee or manual scrolling? if you wanted a marquee, add this code to the page with the iframe:
<marquee behavior=scroll direction="left"><img src="yourimagename1.gif border="0" /><img src="yourimagename2.gif border="0" /><img src="yourimagename3.gif border="0" /></marquee>
add as many image codes as you need.
StarSparklz 05-14-2004, 02:11 AM I tried what you suggested and it didnt work, i dont think i did it wrong or anything either. It just sepereated the pictures(like you would seperate a paragraph)
about your edit: Well i would prefer to scroll right over something that scrolls but if there is no way to do the scrolling i might have to take a marquee, those are no trouble. Its just with that particular script, the scroling stopped when the mouse went over it, and each one was linked. BUT i couldnt get the pictures at a border=0 on that one.
but overall, i would love to figure out how to scroll right with lots of dif pictures at a border=0
salomeyasobko 05-14-2004, 04:38 AM can you provide a link to the page so i can see what it looks like with the code i gave you? because maybe i'll be able to figure out how to change it if i know what's happening now :lol:
EDIT: okay i did some research, try this code, put it after the <body> tag:
<script type="text/javascript">
/***********************************************
* Memory Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var memorywidth="300px" //scroller width
var memoryheight="20px" //scroller height
var memorybgcolor="#DEFDD9" //scroller background
var memorypadding="0" //padding applied to the scroller. 0 for none.
var borderCSS="border: 1px solid black;" //Border CSS, applied to scroller to give border.
var memoryspeed=2 //Scroller speed (larger is faster 1-10)
var pauseit=1 //Pause scroller onMousever (0=no. 1=yes)?
var persistlastviewedmsg=1 //should scroller's position persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".
//Specify the scroller's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var memorycontent='<nobr> INSERT ALL IMAGE CODES HERE</nobr>'
////NO NEED TO EDIT BELOW THIS LINE////////////
var combinedcssTable="width:"+(parseInt(memorywidth)+6)+"px;background-color:"+memorybgcolor+";padding:"+memorypadding+";"+borderCSS+";"
var combinedcss="width:"+memorywidth+";height:"+memoryheight+";"
var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
memoryspeed=(document.all)? memoryspeed : Math.max(1, memoryspeed-1) //slow speed down by 1 for NS
var copyspeed=memoryspeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-10000px">'+memorycontent+'</span>')
var actualwidth=''
var memoryscroller
if (window.addEventListener)
window.addEventListener("load", populatescroller, false)
else if (window.attachEvent)
window.attachEvent("onload", populatescroller)
else if (document.all || document.getElementById)
window.onload=populatescroller
function populatescroller(){
memoryscroller=document.getElementById? document.getElementById("memoryscroller") : document.all.memoryscroller
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
if (persistlastviewedmsg && get_cookie("lastscrollerpos")!="")
revivelastmsg()
memoryscroller.innerHTML=memorycontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
lefttime=setInterval("scrollmarquee()",20)
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}
function savelastmsg(){
document.cookie="lastscrollerpos="+memoryscroller.style.left
}
function revivelastmsg(){
lastscrollerpos=parseInt(get_cookie("lastscrollerpos"))
memoryscroller.style.left=parseInt(lastscrollerpos )+"px"
}
if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg
function scrollmarquee(){
if (parseInt(memoryscroller.style.left)>(actualwidth*(-1)+8))
memoryscroller.style.left=parseInt(memoryscroller. style.left)-copyspeed+"px"
else
memoryscroller.style.left=parseInt(memorywidth)+8+"px"
}
if (iedom){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0" style="'+combinedcssTable+'"><td>')
write('<div style="position:relative;overflow:hidden;'+combinedcss+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=memoryspeed">')
write('<div id="memoryscroller" style="position:absolute;left:0px;top:0px;" '+divonclick+'></div>')
write('</div>')
document.write('</td></table>')
}
}
</script>
okay, only edit the bold parts and pay special attention to the red part because that's where the code goes
salomeyasobko 05-14-2004, 04:45 AM sorry, my five minutes were up, when i said "pay special attention blahblahbblah because that's where the code goes" i meant the image code.. that sounded a little confusing when i read it back to myself so yep, i just wanted to clarify that :lol:
StarSparklz 05-15-2004, 04:16 AM http://www.freewebs.com/hekele/index.htm
its not quite finished, but i thought you might need it to figure out what in the world i am talking about. lol. somehow i manage to find the most confusing way to say things!
see the bar thats on each hanger, i want them to connect so it will be horizontal, thats why i want the whole scroll horizontal thing.
question to the dynamic drive code you put up, doing that will it help the spaces? because the original code has a bazillion spaces that i couldnt figure out how to take out.
well thank you for how much help you've been giving me. it means alot that there are people who help others. :)
salomeyasobko 05-15-2004, 04:34 AM the dynamic drive code makes the images scroll automatically and they stop when you put your mouse over one of them.. i didn't quite get what you wanted.. but it should be horizontal. if you don't want to use that one for whatever reason, can you revert back to the first code i gave you and show me the code after you're done modifying it to fit how you want it to be? then maybe i can figure out how to change it. :)
StarSparklz 05-15-2004, 05:04 AM okay, i tried the first code again, the one in post #2, and its not doing anything in the horizontal function. maybe im doing it wrong. Im supposed to put this code in the main page? or the inline frame page? ive been putting it in the main page.
salomeyasobko 05-15-2004, 05:06 AM you're supposed to put it in the inline frame page.. because it's supposed to show up in the inline frame, lol :lol:
StarSparklz 05-15-2004, 05:08 AM oh oopsies. sometimes i can be really ditzy! well lemme try that.
salomeyasobko 05-15-2004, 05:10 AM oh oopsies. sometimes i can be really ditzy! well lemme try that.
haha that's okay! hopefully it'll work :)
StarSparklz 05-15-2004, 05:15 AM wait.... i did mean the page where the inline frame is at.
unless you mean put it in the page where the clothes are because if so then im really confused.
okay here is what i meant to make sure we are on the same page
main page= the page with the closet background and inline frame
inline frame leading page=the clothes are at
salomeyasobko 05-15-2004, 05:36 AM okay lets try the dynamic drive code: put the dynamic drive code i gave you in the page where the clothes are, because the code makes the CLOTHES scroll :rolleyes:
StarSparklz 05-15-2004, 07:36 AM Okay, yeah i dont know if the horizontal scrolling is even possible. but im still having problems witht the dynamic drive script. i entered my image html and it didnt show up, maybe im doing something wrong, well this is what i put in... maybe you'll see my mistake.
from the image html section....
//Specify the scroller's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var memorycontent='<nobr> <img border="0" src="PCshirt.gif" width="68" height="173"><img border="0" src="HeatherPC.gif" width="73" height="173"><img border="0" src="h6.gif" width="95" height="173"><img border="0" src="h5.gif" width="83" height="173"><img border="0" src="h4.gif" width="73" height="173"><img border="0" src="h3.gif" width="52" height="173"><img border="0" src="h2.gif" width="77" height="173"><img border="0" src="h1.gif" width="72" height="173" </nobr>'
////NO NEED TO EDIT BELOW THIS LINE////////////
.....
that whole middle part is on 1 line
salomeyasobko 05-15-2004, 07:41 AM you forgot to close the image tag of the last image [red part]..
//Specify the scroller's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var memorycontent='<nobr> <img border="0" src="PCshirt.gif" width="68" height="173"><img border="0" src="HeatherPC.gif" width="73" height="173"><img border="0" src="h6.gif" width="95" height="173"><img border="0" src="h5.gif" width="83" height="173"><img border="0" src="h4.gif" width="73" height="173"><img border="0" src="h3.gif" width="52" height="173"><img border="0" src="h2.gif" width="77" height="173"><img border="0" src="h1.gif" width="72" height="173" </nobr>'
so just add a > and that should work.
StarSparklz 05-15-2004, 08:29 AM lol yeah i'm such a tard, i figured out what i did, but then i was trying to do several things at once and forgot to post that i had figured it out.i had one more question. IS there a way to close the gap and make it a never ending clothes bar?
salomeyasobko 05-17-2004, 05:43 AM when i go to your page, it looks never-ending to me! just keeping adding image codes. i see the dynamic drive code worked though ;) it looks pretty cool :D
StarSparklz 05-17-2004, 06:19 AM Yes thank you soo much!! if you wan to join you can. :) www.freewebs.com/pixelclothes
I will be forever grateful for your help! thank you! :)
salomeyasobko 05-17-2004, 06:25 AM haha you're welcome! :buckt:
|