got script? web site people help me out here...

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
hey... i really need to get a multi browser script for this scrollable layer html thing...

heres what im talking about...

http://www.nullcore.net/index.htm



i need that code script... if anyone can post it up for me i would appreciate it.

i seem to not be able to get the script for this after searching for it. people tell me its very basic but i still cant get it. i need to be able to change the color of to fit my background too.

all ive come up with is this...


Code:
<div id="Layer1" style="position:absolute; left:148px; top:198px; width:600px; height:185px; z-index:1"> 
  <textarea name="MyText" cols="70" rows="40" id="MyText">This is text that should be in a box and hopefully it is scrollable.  Let's make this text longer so that we can see if it is scrollable because we want to be able to scroll the text. This is text that should be in a box and hopefully it is scrollable.  Let's make this text longer so that we can see if it is scrollable because we want to be able to scroll the text.</textarea>
</div>

but i cant change the color of it. its only white. i would like to change the background color and the scroll bar color if possible or at least make it transparent or something. does something like this require java script?
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
got dang! what happened here... now area is very wide... have to scroll all the way to the right to get a new response.


sorry i didnt mean that.
 

jvaska

macrumors 6502
Feb 18, 2002
432
18
Haiti/NYC
this?

use an iframe...it's good (well, mostly) with ie 4+ and netscape 6 (who uses netscape 4.7?)...

if this is what you were looking for...just "open frame in new window" and view the source code...if you use the script though...it's proper to leave the the dev's info in the script...or contact them before you use it...i'd check their website to see if it's allowed first...jv


<script language="JavaScript">
<!--

function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4

if (bgcolor=="") {
bgcolor="#FFFFFF";
}
var adj=10
var w = screen.width;
var h = screen.height;
var byFactor=1;

if(w<740){
var lift=0.90;
}
if(w>=740 & w<835){
var lift=0.91;
}
if(w>=835){
var lift=0.93;
}
if (imageWidth>w){
byFactor = w / imageWidth;
imageWidth = w;
imageHeight = imageHeight * byFactor;
}
if (imageHeight>h-adj){
byFactor = h / imageHeight;
imageWidth = (imageWidth * byFactor);
imageHeight = h;
}

var scrWidth = w-adj;
var scrHeight = (h*lift)-adj;

if (imageHeight>scrHeight){
imageHeight=imageHeight*lift;
imageWidth=imageWidth*lift;
}

var posLeft=0;
var posTop=0;

if (hugger == "hug image"){
if (hugMargin == ""){
hugMargin = 0;
}
var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
if (scrHeightTemp < scrHeight) {
scrHeight = scrHeightTemp;
}
var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
if (scrWidthTemp < scrWidth) {
scrWidth = scrWidthTemp;
}

if (scrHeight<100){scrHeight=100;}
if (scrWidth<100){scrWidth=100;}

posTop = ((h-(scrHeight/lift)-adj)/2);
posLeft = ((w-(scrWidth)-adj)/2);
}

if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
imageHeight=imageHeight-adj;
imageWidth=imageWidth-adj;
}
posTop = parseInt(posTop);
posLeft = parseInt(posLeft);
scrWidth = parseInt(scrWidth);
scrHeight = parseInt(scrHeight);

var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1){
var args= new Array();
args[0]='parent';
args[1]=imageName;
var i ; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
} else {
newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
newWindow.document.open();
newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onClick="self.close()">');
newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
newWindow.document.write('<a href="javascript:;"><img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="click image to close" border=0></a>');
newWindow.document.write('</td></tr></table></body></html>');
newWindow.document.close();
newWindow.focus();
}
}

//-->
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
//-->
</script>
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
i tired that script. .... plugged it in.. but it didnt work for some reason...

im trying this one out... but i cant even get text in there or change the color...


Code:
<iframe id="datamain" src="external.htm" width=150 height=150 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=1 scrolling=no></iframe>

<layer left="7" top="-4" width="736" height="114" visibility=hide> 
<div style="width:150px;" align="right">

  <p> </p>
  <p> </p>
  <p> </p>
  <p><a href="#" onMouseover="scrollspeed=-2" onMouseout="scrollspeed=0">Up</a> 
    | <a href="#" onMouseover="scrollspeed=2" onMouseout="scrollspeed=0">Down</a> 
  </p>
</div>

</layer>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

</body>
</html>


<!--DO NOT REMOVE BELOW SCRIPT. IT SHOULD ALWAYS APPEAR AT THE VERY END OF YOUR CONTENT-->

<script language="JavaScript1.2">

//Scrollable content III- By [url]http://www.dynamicdrive.com[/url]

var speed, currentpos=curpos1=0,alt=1,curpos2=-1

function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}

function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp

window.scrollBy(0,speed)
}

setInterval("initialize()",10)


</script>
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
ahhhhh someone help.


i just need to be able to plug in text... the background of the iframe needs to be able to have its color change ...so it need to be very versitile... with links being able to be in there and pics.
 

szark

macrumors 68030
May 14, 2002
2,887
0
Arid-Zone-A
Re: got script? web site people help me out here...

Originally posted by krossfyter
i seem to not be able to get the script for this after searching for it. people tell me its very basic but i still cant get it. i need to be able to change the color of to fit my background too.
If I'm understanding you correctly, your original code sample is very close to what you need:

Code:
<div id="Layer1" style="position:absolute; left:148px; top:198px; width:600px; height:185px; z-index:1; overflow: auto; background: #FF0000">
...text to be scrolled...
</div>
The "overflow: auto" is what causes it to scroll, and the "background: #FF0000" changes the background color.

Hope that helps!
 

jvaska

macrumors 6502
Feb 18, 2002
432
18
Haiti/NYC
i've played with iframed quite alot...but i've never used them for an actual project...

i'm not completely understanding what you are looking for...

you want to change the background? you do this by the file that is more or less included IN the iframe (which will have a complete set of html tages including head and body tags...so it's not the iframe where you change the color...it's the inserted frame...

i did an experiment where i was wondering if i could control one iframe with another iframe (via hyperlinks both inside and outside of the various frames)...it worked pretty darn well...although on some older browsers it was a little unstable (or just plain didn't work on netscape 4.7)...

hope this helps...jv
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
okay thanks guys.


i got it so far... now im stuck on this part...

how can i put links and pics and links on pics in the text area of that scrollable layer? .... like here.... http://www.nullcore.net/index.htm


how do i put up dividers like that... in that example where there are 3 colums in the scrollable layer?
 

jvaska

macrumors 6502
Feb 18, 2002
432
18
Haiti/NYC
javacript files...

i've never seen somebody do this before...it's kind of neat...my only guess is that he has the data coming out of a database/blog?...this is strange...i'm sure somebody will know...

but his javascript files are inserting the text in the cells...if you read the javascript files you'll see how it's doing it...just like an include except the .js files don't display the code...just the .js link is visible...

ok, i'm mass intrigued by this...hope somebody knows...

but that's the solution for you...here's a snipp from one of his .js file (it's definitely coming from a blog)...jv



document.write("<p class='text_heading'>thursday, october 10</p>")

document.write("<p><img src='/_images/blogs/icon_n88888.gif' width='35' height='35' align='left'>")
document.write(" posted by n8888<br>")
document.write(" <a href='mailto:jon@n888888.net' target=_blank>jon@n88888.net</a><br>")
document.write(" 23:55 eastern standard time<br></p>")

document.write("<p class='justify'>blah, blah, cblah...i'm editing this out...just because i think it's the polit thing to do...</p>")
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
cool man... yeah the stuff u sent me worked man.

i figured it out.


yeah thats another thing... how does he work on a blog and have it show up on his site? i would like to know how to do that for sure.
 

szark

macrumors 68030
May 14, 2002
2,887
0
Arid-Zone-A
Glad I could help. :)

As for blogs, I've been playing around with those myself lately. There's a lot of pre-made blogging software/services out there -- you just have to look at the provided output templates and change the code to fit your needs.

Not necessarily simple, but certainly possible. ;)
 

jvaska

macrumors 6502
Feb 18, 2002
432
18
Haiti/NYC
i've been creating my own blog recently...i think alot of the features they have on these things is kind of ridiculous...and even if you know how to tweak things...they aren't very pretty to look at...

i own a CMS company in europe...and we are considering retrofitting the blog with our tools and sending it out as shareware...maybe...otherwise, i'll probably just make it a freeware thing...

but i have to have our dev guy go through and make all my hacky php code better...

anyways...creating your own blog is not so hard really...and you can get exactly what you want...and it's the best way to learn new things...jv
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
i emailed the guy and this is what he said...

"i use blogger.com for the blog. here's the template i made for my main blog:
<Blogger>
<BlogDateHeader>
document.write("<p class='text_heading'><$BlogDateHeaderDate$></p>")
</BlogDateHeader>
document.write("<p><img src='/_images/blogs/icon_<$BlogItemAuthorNickname$>.gif' width='35' height='35' align='left'>")
document.write(" posted by <$BlogItemAuthorNickname$><br>")
document.write(" <a href='mailto:<$BlogItemAuthorEmail$>' target=_blank><$BlogItemAuthorEmail$></a><br>")
document.write(" <$BlogItemDateTime$> eastern standard time<br></p>")
document.write("<p class='justify'><$BlogItemBody$></p>")
<BlogDateFooter>
document.write("<hr color='#990000' size=0 width=200 align='center'>")
</BlogDateFooter>
</Blogger>




i then set blogger to publish blog files as .js as opposed to html. to include this on a page, you just insert the following tag:


code:
------------------------------------------------------------------------

<script src="blogs/links.js" language="JavaScript"></script>
------------------------------------------------------------------------
a few things to be careful with... you've got to watch your double quotes [ " ] and single quotes [ ' ] in your template. anything that would normally be a double quote in your html becomes a single, and the whole line is wrapped in double quotes within the document.write(" ") javascript statements. also, you can't include a double quote within the body of your blog entries, or it'll throw off the javascript and most likely cause the entire blog to appear blank. you can use single quotes in your entries, however... which i do.
have fun."





sooo... im curious more now...

so he goes to blogger.com.. signs up to have his own blog... and then through this code it automatically goes to his website? i dont get it. please enlighten me.
 

jvaska

macrumors 6502
Feb 18, 2002
432
18
Haiti/NYC
?

yeah...me too...how does he get the info from the blogger site to his? or maybe...he's installed blogger on his own server?

if that's all the code he's got...then i would guess he's got it on his server...

back to my point...most blogs are UGLY...i'm guessing that this was his motivation to do this...jv
 

krossfyter

macrumors 601
Original poster
Jan 13, 2002
4,297
0
secret city
why is the page so wiiiiiiiiiiiiiiide?????



yeah so i posed that question to him... he said this...

"actually, blogger publishes all the files via ftp to my server. i give it my ftp username and password, and in the blogger options, define where the files should go, and how they should be named. it uses the above template code to determine the formatting of the files when it publishes."
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.