Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 01-04-2007, 01:03 AM   #1
joaoleitao
Junior Member
 
joaoleitao's Avatar
 
Join Date: Dec 2006
Location: Evora, Portugal
Posts: 24
joaoleitao will become famous soon enough
Send a message via MSN to joaoleitao
Default HELP: Make a random page switcher in iframe

Greetings,
I would like some help solving this thing i have on my mind.

I have a website that list hotels.

The website has 3 areas of showing clients:

1-quick view with pop-up windows ( calling example1.html file );
2-personal pages of each hotel ( calling example2.html file );
3-a few dozen of pages with information on several monuments in that specific town. these pages have iframes that call example3.html file;

What i need is:

to have a code to insert on example3.html file in order to call all the example1.html files randomly.

which means that the iframe calling example3.html file will show ramdomly all the other existing pop up pages ( now not in pop up ).

can i do it? I mean, i know i can but how can you help please?

one example of an .html file that pop's up from the homepage is here, and one of the example pages where i want the rotative ramdom adds is here;

I have a code to call ramdom images, or even a slide show ( example below) :

Quote:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 10;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/a.jpg'
Pic[1] = 'images/b.jpg'

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans (duration=10)";
document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply ();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play( );
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
<BODY onLoad="runSlideShow()" topmargin="0" leftmargin="0">
<img src="images/a-1.jpg" name='SlideShow' hspace="0" style="border-width: 1; " width="10" height="10">

So it got to exist one to call different .html pages.

thank you,
__________________

31 Best Riad Marrakesh MerzougaHotels Hotel Maroc
joaoleitao is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 01-04-2007, 07:57 AM   #2
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: HELP: Make a random page switcher in iframe

You could use PHP do call a random page.

Code:
<?php $random=mt_rand(1,3); //this gives a random number between 1 and 3 switch($random) { case 1: include('htmldoc1.html'); break; case 2: include('htmldoc2.html'); break; case 3: include('htmldoc3.html'); break; } ?>

You would put that code in the page that would be accessed by the user, and replace the included html files with your own.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 01-04-2007, 10:45 AM   #3
joaoleitao
Junior Member
 
joaoleitao's Avatar
 
Join Date: Dec 2006
Location: Evora, Portugal
Posts: 24
joaoleitao will become famous soon enough
Send a message via MSN to joaoleitao
Default Re: HELP: Make a random page switcher in iframe

hello

wow man you just solved one of my problems.

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<meta name="robots" content="noindex">
<link rel="stylesheet" rev="stylesheet" href="style.css" type="text/css" />
</head>

<body>
<?php

$random=mt_rand(1,3); //this gives a random number between 1 and 3

switch($random)
{
case 1:
include('riad-zara-marrakech.html');
break;

case 2:
include('riad-karmela-marrakech.html');
break;


case 3:
include('riad-catalina-marrakech.html');
break;
}
?>
</body>

</html>

this was enough.... i just made the iframe call a banner.php with the code and voila!!

thank you.
__________________

31 Best Riad Marrakesh MerzougaHotels Hotel Maroc
joaoleitao is offline  
Old 01-04-2007, 11:50 AM   #4
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: HELP: Make a random page switcher in iframe

Wow, I'm on a roll today....Glad to be of service.

The tough one is gonna be the iframe problem.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 01-04-2007, 11:56 AM   #5
joaoleitao
Junior Member
 
joaoleitao's Avatar
 
Join Date: Dec 2006
Location: Evora, Portugal
Posts: 24
joaoleitao will become famous soon enough
Send a message via MSN to joaoleitao
Default Re: HELP: Make a random page switcher in iframe

well i also think that is going to be a problem since the page will always open on the iframe. so tell me is there anyway i can make this work without the iframe? but has to be on html as the base window is already .html ...

can i call that .php with the ramdom .html from an html page?
__________________

31 Best Riad Marrakesh MerzougaHotels Hotel Maroc
joaoleitao is offline  
Old 01-04-2007, 12:28 PM   #6
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: HELP: Make a random page switcher in iframe

Unfortunately you must name the document .php in order for the server to know that there is php that needs to be parsed. Can you rename the .html page to .php? Or would that cause a problem?
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi - Hoping to Make It Big sss3d Introduce yourself 7 12-22-2006 06:06 AM
Profit Geek Giving $1000 Cash to Random Forum Member : YOU Can Win! SUP3RNOVA Website Reviews 1 12-19-2006 05:32 PM
Random Idea's LadyHoldem Adsense 2 11-02-2006 03:55 AM
veblo - unique, random, and curious things - a media blog compuXP Advertise your website 0 03-05-2006 11:33 PM
Resizing iframe from iwebtool SiCK Discuss iWEBTOOL 1 01-19-2006 04:21 AM


All times are GMT. The time now is 01:10 AM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.