Randomize The URL In An Embedded Link?
Sep 28, 2011
I was hoping someone might have a solution to randomizing a URL in javascript... in this case for an embedded Simpleviewer link?At the moment the link is http://timperceval.com/guiran/intro1/ but I would like to have the site randomly choose from four URLs.
The embedded code is as follows:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://timperceval.com/guiran/intro1/svcore/js/simpleviewer.js">
[code]....
View 6 Replies
ADVERTISEMENT
Sep 4, 2009
Industry feedback in 'advertising world' is that I really could do with moving mini flash vids as thumbnail links, not static thumbnails if possible. This is where I am up to for you kind folk to see - [URL] The playback of the flash vids (in the big playback area right/mid of screen) from the JPG thumbnail links on the TOP ROW works FINE, but how do I similarly call that 'BIGFLASH' function to display the video right-centre linking from the JW Flash Player vid thumbnail equivalents on rows TWO and THREE?
Do Flash vids defo overide all other functionality (and thus the 'linking hand' hovering icon) we could otherwise use to "couch" the object (ie, in this case, the calling of the flash routine) like using javascript OnClick, etc or do we need to try and "con" the FLASHVARS within the flash player using the flashvar "DISPLAYCLICK:" ( http://developer.longtailvideo.com/trac/wiki/FlashVars ) to do something javascripty and invoke the 'BIGFLASH' function? The parameter options seem limited though don't they... as far as I can tell you can't use the DISPLAYCLICK flashvar to call a bespoke JS routine. I wonder if it is possible to put a transparent layer OVER the flash vid in JW Player and use that as the link, or does flash not allow other layers superimposed over it?
My hands seem to be bound unless I am not seeing the wood for the trees! I really like the layout as it is and the coding and the fact I'm nearly there so I would hate to have to do something radically different at this stage. Why is such an obvious function so difficult to achieve?!
View 1 Replies
View Related
Aug 8, 2010
I've been banging my head for two days now trying to figure out how i can swap td cells. There are a lot of examples of how to order rows, but i can seem to find any on how to swap td cells. Has anyone a good referal for this.
View 4 Replies
View Related
Feb 25, 2006
but i need one to display 1 text massage of, lets say, 5 whole messages, randomized.
View 1 Replies
View Related
Sep 22, 2006
I found this javascript to randomize an image on a page...
Code:
<script language="JavaScript" type="text/javascript">
<!--
function random_img(){
var ranimage = new Array();
ranimage[1] = "photo1.jpg";
ranimage[2] = "photo2.jpg";
ranimage[3] = "photo3.jpg";
var ry = Math.floor(Math.random()*ranimage.length)
if (ry==0)
ry=1
document.write('<img src="'+ranimage[ry]+'" border=1>');
}
random_img();
// -->
</script>
I have some images that are dynamically generated and i want these images to randomize every few seconds (at the moment the images change when the user goes to a different page on the site)...can anyone give me any ideas as to whether this is possible??
The PHP code i'm using is below...
<?php
// read image dir
$dir="../../admin/uploads/";
// Open directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (filetype($dir . $file)== "file"){
$counter++;
$selectSQL = "SELECT id, url, imagefile from images";
$result=mysql_query($selectSQL);
#print $result . " - " . mysql_error();
$nameStack=array();
$urlStack=array();
while ($row = mysql_fetch_assoc($result)){
$thisurl= $row['url'];
$thisid= $row['id'];
array_push($nameStack, $row['imagefile']);
array_push($urlStack, $row['url']);
}
}
}
closedir($dh);
}
}
// load each image into array echo rand(5, 15);
// get count of total no. of images
$lastNo=sizeof($urlStack)-1;
$imageToUse=rand(0,$lastNo);
#print "using image $imageToUse of $lastNo";
$imageName=$nameStack[$imageToUse];
$imageUrl=$urlStack[$imageToUse];
#print "got $imageUrl and $imageName
";
//
?>
<a href="<?php echo $imageUrl; ?>"><img src="http://mywebsite.com/admin/uploads/<?php echo $imageName; ?>" alt="click here for our special offers" border=0 /></a>
View 6 Replies
View Related
Jun 5, 2010
Here is what I want to do. Create four or five different versions of my site and when someone goes to it a randomly chosen version is displayed. The way I was thinking of doing this is to have the index page of each version in a frame, the containing would run a javascript that choose one of the versions of the site. I figure the container would not display anything and just be a tiny portion of the screen with no visible frame.
That said, I don't know anything about javascript. I just assume this is what I would use to do something like this. Does anyone have a better ideas as to what I would use for this or ideas on how I would go about doing it?
View 3 Replies
View Related
Sep 7, 2011
I have an array of 6 items. I want to select 2 at random and then add an item to the start. Here's my randomiser [code]
View 2 Replies
View Related
Apr 8, 2010
I'm using a very nice jQuery content slider called Easy Slider on my site that I downloaded from Css Globe. The script is excellent and does just what I want - except I can't make it randomise the list, it always scrolls from left to right or right to left! I'm far from good with JavaScript, so my attempts at solving this have been feeble. Although I'm sure it must be an easy fix! I've tried contacting the original plugin developer but have had no response yet. The comments on the Easy Slider page didn't bear much fruit either unfortunately. I've pasted the script I'm using on my site below:
[Code]....
View 20 Replies
View Related
Feb 13, 2011
I know how to randomize an array but how do I randomize the array below and keep the questions and answers together.
Code:
View 14 Replies
View Related
Feb 4, 2010
I'm trying to make what is hopefully a fairly simple script to randomize font size, font family, image sizes etc. on a page using a.click and disabling the normal hyperlink function.
Essentially looking to "destroy" the page randomly each time a link is clicked.
View 4 Replies
View Related
Feb 22, 2010
What I am trying to do is randomize the position of a div that slides in from the left when you hover over an image.
Here is the script I am working with courtesy of Build Internet
Here is the css that goes with it
I would like to randomize the value of the top position in the css and the value of right:'30%' with values in a preset range.
View 2 Replies
View Related
Mar 4, 2010
I am using javascript to run couple of video on my web page with wmp embedded on the web page. The script and the code works ok when when I am running on my computer but as soon I download files and web page to a remote server the video files dont play. I am puting the code below:
<script type="text/javascript">
function play(media){
document.getElementById('mediaplayer').innerHTML=
'<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"'
[Code].....
View 1 Replies
View Related
Jul 23, 2005
In a document there is iframe (id="frame0"). Into it there is loaded file
only with form (id="form"). On main document there is also a form
(id="form0") with several input fields and buttons. How to copy all input
fields with their values form form0 to form1? And how to add a submit to
form1 and then press it?
View 2 Replies
View Related
Mar 24, 2009
I`m trying to write XML in HTML and read it with JavaScript, but it`s not working.
my XML in HTML.
Code:
<xml id="xmldata" style='display:none;'>
<markers>
<marker lat="50.895842" lng="-1.4051" html="text"/>
[Code]....
View 1 Replies
View Related
Dec 28, 2006
I'm using CDO to send information by e-mail to the users of an intranet system.
By embedding a asp page via objMail.CreateMHTMLBody, I can send them dynamic content like info on db..
The point is: Since I tested and realized the embedded page can't perform a recordset to populate itself with db content, I'm sending this info as parameters and retrieving at the embeeded page before beeing attached on e-mail by quesrystring.
The tests I'm doing is gathering info from recordset (on a CDO page) like this:
Do while not rsemprestimos.eof Code:
View 1 Replies
View Related
Jun 7, 2010
I've created an ad unit which is to be embedded on other sites. In this ad unit are links which when clicked upon, as supposed to lightbox the link using lightview over the whole page, not just inside the ad unit embed.
I've used iframe and object tags and the result is that the content always opens inside the object frame. Is there any way, other than a flash embed which expands, to do this? Basically, what I'm looking for is a non-Flash ability to overlay something over the whole page (or at least expanded outside of the embed)
View 2 Replies
View Related
Jun 7, 2010
[URL] If you visit that page, it has 2 drop down menus embedded in each other. One is under the name "destination weddings" and within that, there is one named "Historic Wessex Packages". It runs on a JS script (which I am currently modifying) called slide.js. The problem is that if you go to one of the other pages (like Contact Us) then slide down the destination one, then the historic one, it doesn't cope with the dynamically changing height and fails.
View 3 Replies
View Related
Feb 16, 2009
I need a counter that will display beside a link, with the number of times the same link has been clicked. I do not have FTP access to the site, since it is based on a CMS.
View 1 Replies
View Related
Oct 5, 2009
I have a page that displays a modal dialog, using the following code to initialize it. This is working just fine:
// code in page1.html
jQuery(document).ready( function()
{ jQuery("#myButton").click( showDialog );
//variable to reference window
[Code]....
The contents of test2.html is displayed perfectly, but no javascript from test2.html is called.
View 2 Replies
View Related
May 11, 2010
<ul
id
=
[code]...
View 4 Replies
View Related
Aug 30, 2011
I currently use Google's and Quantcast's javascript includes on my site. I want to do the same thing for users of my site except on a much easier level. I want users to include a javascript that detects the URL of the page where the script is included... Should be easy but I don't know where to start.
View 4 Replies
View Related
Aug 4, 2009
I currently using the <object> tag to display a webpage in another webpage... essentially. I read that <iframe> is basically deprecated and <object> should be used to replace it.
Thus my code breaks down basically to this: <object data="mywebpage.php"></object>
I'm using FF3 and the question I have is how do I print the contents of the object only? Currently, I have to right click the object and under "This Frame" click Print.
How can I use a print button to resolve this?
View 2 Replies
View Related
Apr 28, 2011
I have an embedded font in my CSS however somtimes the texts loads before the font loads (i.e. the text is loaded in a normal font the it changes after). Is there anyway i can say dont load page until the font file is loaded, or maybe dont show the div until the font is loaded?
View 2 Replies
View Related
May 18, 2011
I have a javascript sound board that I've made for a Church skit but I'm wanting to be able to smoothly fade out the longer SFX without having to do it manually with the volume slider.
The Object: <span id="player_holder"><embed id="player" hidden="true" autostart="true" loop="false" volume="100"/></span>
How do I modify the volume value from: document.getElementById('player')
View 4 Replies
View Related
Jan 19, 2011
I wrote this to trigger the video when an image is clicked, but it doesnt work.
Code:
<head>
<style>
#movie {}
#img {}
</style>
[Code]...
View 1 Replies
View Related
Mar 24, 2009
I`m trying to write XML in HTML and read it with JavaScript [code]...
View 1 Replies
View Related