/    Sign up×
Community /Pin to ProfileBookmark

This is our first post:

We have designed a web system that allows people to search the Internet using Google, there is a page that when activated brings up a new window, this window refreshes every 2 Minutes.

Our question: is there a way of making the activation page choose at random a different window from say a list of 6.

I may not have described what we are doing very well if so please see our site to get the idea, [url]http://www.emergencyrescue.com/volunteer_rescue_uk.htm[/url]

This is NOT a site plug we really would like to do this, and If this question has already been covered and we have missed it, our apologies.

Association of Volunteer Rescue Engineers
Admin Team
Essex
UK

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JFeb 20.2006 — Please try the following example, amend the array with the appropriate urls

[code=php]
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>

<script type="text/javascript">
<!--

url=new Array()
url[0]="http://www.emergencyrescue.com/vruksearch.htm"
url[1]="http://www.emergencyrescue.com/vruksearch.htm"
url[2]="http://www.emergencyrescue.com/vruksearch.htm"
url[3]="http://www.emergencyrescue.com/vruksearch.htm"
url[4]="http://www.emergencyrescue.com/vruksearch.htm"
url[5]="http://www.emergencyrescue.com/vruksearch.htm"

function getUrl()

num=Math.floor(Math.random()*url.length)

newWin=window.open(url[num],'newwindow',config='height=600,width=790,toolbar=yes,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no')

}

-->
</script>


</HEAD>
<BODY>

<a href="http://www.emergencyrescue.com/vruksearch.htm" onclick="getUrl() ; return false">Link</a>

</BODY>
</HTML>
[/code]
Copy linkTweet thisAlerts:
@Rescue_EngineerauthorFeb 23.2006 — Mr J

Many Thanks for your help with our problem

However, we must be doing something wrong as we cannot get it to do what we require, it just brings up the original search page all the time.

As we are in the process of publishing the next phase of our search a site fore Volunteer Rescue UK we will have to shelve the idea for now.

Thanks again for trying to help.

Regards

AVRE

Admin Team

Essex

http://www.emergencyrescue.com/volunteer_rescue_uk.htm


.
Copy linkTweet thisAlerts:
@Mr_JFeb 23.2006 — Did you put the appropriate urls in the array?

Post your code so that I can take a look
×

Success!

Help @Rescue_Engineer spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...