PDA

View Full Version : Web designers! Need help please



Daniel san
13-10-2002, 20:24
Can someone give me html that will choose a picture at random AND work in Front Page. I can adjust the image size etc no probs, just need the script.



Cheers

GT
13-10-2002, 20:40
Hi Dan,

I think this page illustrates what you want to do, better than that it includes a solution too!!

http://javascript.about.com/library/scripts/blslideshow.htm

shadowninja
14-10-2002, 12:38
I cannot answer the question on professional grounds - you're asking about Frontpage :D

sroberts
14-10-2002, 12:41
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function random_img(){
var myimages=new Array()
myimages[1]='/Images/image_1.jpg'
myimages[2]='/Images/image_2.jpg'
myimages[3]='/Images/image_3.jpg'
myimages[4]='/Images/image_4.jpg'
myimages[5]='/Images/image_5.jpg'
myimages[6]='/Images/image_6.jpg'
myimages[7]='/Images/image_7.jpg'
myimages[8]='/Images/image_8.jpg'
myimages[9]='/Images/image_9.jpg'
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" WIDTH="100" HEIGHT="100" ALT="name" BORDER="0">')
}
random_img()
//-->
</SCRIPT>

Dan Just paste this script into a <TD></TD> and change the image links to suit, also change the number of 'myimages' in the array depending on how many random images you need.

PM me if you any more help

Simon

Oh yeah, why why why frontpage!

sroberts
14-10-2002, 12:43
That didn't work, try this...

//<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
//<!--
//function random_img(){
//var myimages=new Array()
//myimages[1]='/Images/layout/main_img/image_1.jpg'
//myimages[2]='/Images/layout/main_img/image_2.jpg'
//myimages[3]='/Images/layout/main_img/image_3.jpg'
//myimages[4]='/Images/layout/main_img/image_4.jpg'
//myimages[5]='/Images/layout/main_img/image_5.jpg'
//myimages[6]='/Images/layout/main_img/image_6.jpg'
//myimages[7]='/Images/layout/main_img/image_7.jpg'
//myimages[8]='/Images/layout/main_img/image_8.jpg'
//myimages[9]='/Images/layout/main_img/image_9.jpg'
//var ry=Math.floor(Math.random()*myimages.length)
//if (ry==0)
//ry=1
//document.write('<img src="'+myimages[ry]+'" WIDTH="371" HEIGHT="273" ALT="name" BORDER="0">')
}
//random_img()
//-->
//</SCRIPT>

sroberts
14-10-2002, 12:44
Dan I'll pm you OK, the BB is rendering the script!

Simon

andyf
14-10-2002, 12:58
my god you've mullered the thread! :D

sroberts
14-10-2002, 12:59
tell me about it... its all gone wrong, but what do you expect it's MONDAY!!!!!!!!!!!!!!!!!!!!!!!111

MunkeyMagic
14-10-2002, 14:06
//document.write('<img src="http://images-eu.amazon.com/images/G/02/uk-shared/logos/smile-amazon-logo-notag-new-200x45.gif" WIDTH="371" HEIGHT="273" ALT="name" BORDER="0">')

MunkeyMagic
14-10-2002, 14:07
Sorry about the last post, you can post images without being a member.

Daniel san
14-10-2002, 19:35
Sorry about the Front page guys but it's the only program I know how to use to some extent. I've got Dreamweaver and Fireworks too, but can't really get me head round them. Guess I could if I spent ages and ages but it's not like it's my job or anything, I'm just exploring.

What does everyone in the know suggest I use? and where can I get a copy? Spose Kazaa could come in handy:)

Cheers

andyf
14-10-2002, 19:49
Originally posted by MunkeyMagic
Sorry about the last post, you can post images without being a member.


I think you misunderstand

You can't post ATTACHMENTS without being a member

Images from other hosted sites shouldn't be a problem!!

Keith_C
14-10-2002, 20:27
That's right - we're quite happy for you to link to pictures held elsewhere (even if in this case it's hosted on our own server).

The attachments bit refers to uploading stuff directly into the BB as they post for people to then download.

We're pretty lax here, and TBH, I'd prefer to continue to allow people to post HTML and things, as long as it doesn't get abused. If it does, then we'll think again.

However, I'd quite like a discussion about this, so feel free to post comments.

andyf
14-10-2002, 22:24
Yeah being able to post and make signatures in HTML gives the ability to make nice little signatures and widgets and things :)

There's room for abuse, of course (how would you like to open a thread and find a video of matt-j starts autoplaying - yeek) but I don't think it will prove to be a problem.