Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

A little help with the coding of this?


  • Please log in to reply
13 replies to this topic

#1 Nauticus

Nauticus

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 10 December 2008 - 01:05 PM

I've spent hours on trying to figure this out and I'm lost. I'm not that familiar with programming so I want to ask for help. Can anyone tell how the actual code should look like for this? Here's the link with the explanation: http://www.phpied.com/ajax-banner-rotation/

Thank you very much :thumbsup:

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 10 December 2008 - 01:31 PM

The actual code is on that page, so I'm afraid I don't understand what it is you are asking for sure. Are you asking how to use that code?

#3 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 10 December 2008 - 01:41 PM

Are you asking how to use that code?

Mhm that would be it :thumbsup:

Edited by Nauticus, 10 December 2008 - 01:51 PM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 10 December 2008 - 01:57 PM

First of all, you need a web server, such as Apache, and it needs to be running PHP. Have you got that?

#5 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 11 December 2008 - 12:05 PM

First of all, you need a web server, such as Apache, and it needs to be running PHP. Have you got that?

Eh sorry I haven't got a web server. Can you suggest something similar to that which incorporates a more simpler HTML?

#6 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 11 December 2008 - 12:41 PM

You can't do that with just HTML. If you want to use Ajax, then you need to use Javascript, since Ajax is a function of Javascript. If you don't have a web server, where are you going to get the banners to rotate between?

#7 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 11 December 2008 - 04:11 PM

You can't do that with just HTML. If you want to use Ajax, then you need to use Javascript, since Ajax is a function of Javascript. If you don't have a web server, where are you going to get the banners to rotate between?

Well it's obvious I'm not familiar with these things so I appologize in advance for the silly questions I'm asking. So in order to rotate banners (not necessarily using Ajax) I need a web server and a free or personal hosting won't do any good? Is getting a web server the only way?

#8 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 11 December 2008 - 04:55 PM

I'm sorry. Nobody said anything about silly questions. I certainly didn't think that they were silly. I was trying to understand what sort of set-up that you had. If you have free hosting, then you can do it. The banners are simply images, just like any other image. There is no other way that I know of to do banner rotation other than AJAX. :thumbsup:

I'm not sure if the Yahoo developer library has any code you can borrow,

#9 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 13 December 2008 - 06:08 PM

Bah didn't find anything in YUI. Thank you for supporting me :thumbsup:

I've looked around on the net and found this:

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

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
	this[i] = ' '

  }
}

image = new StringArray(10)
image[0] = '0.gif'
image[1] = '1.gif'
image[2] = '2.gif'
image[3] = '3.gif'
image[4] = '4.gif'
image[5] = '5.gif'
image[6] = '6.gif'
image[7] = '7.gif'
image[8] = '8.gif'
image[9] = '9.gif'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
	return(image[core])
}

document.write("<img src='" +ranimage()+ "'>")

//-->
</script>

I was able to randomize images, but I couldn't put links in them. Any ideas?

#10 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 13 December 2008 - 07:50 PM

Possible. What does the HTML look like that display the javascript?

#11 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 14 December 2008 - 07:13 AM

Possible. What does the HTML look like that display the javascript?

I'm not sure I understand your question. Can you explain a bit?

#12 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:28 AM

Posted 14 December 2008 - 09:25 AM

What does the code for your web page look like?

#13 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 14 December 2008 - 03:42 PM

Mhm I think I get it now. Well I'll paste you this part of the source code where I would like the rotation to be.

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

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nauticus' PTC Blog - Ideas For A Safe Earning! - Home</title>
<link rel="stylesheet" href="/files/main_style.css" type="text/css" media="screen" />
<meta name="description" content="A friendly blog for earning money online, with only safe and secure PTC sites!" />
<meta name="keywords" content="work from home, paid to click, online income, PTC blog" />
<script type='text/javascript' src='http://www.weebly.com/weebly/images/common/prototype.js' ></script>
<script type='text/javascript' src='http://www.weebly.com/weebly/images/common/effects.js' ></script>
<script type='text/javascript' src='http://www.weebly.com/weebly/images/common/weebly.js' /></script>
<script type='text/javascript' src='http://www.weebly.com/weebly/images/common/lightbox.js' /></script>
<link rel='stylesheet' href='/files/common.css' type='text/css' />
</head>

<body id="section-index">
 

<div id="navigation">

<ul>
	
<li id="active"><a href="/index.html">Home</a></li><li><a href="/earning-guide.html">Earning Guide</a></li><li><a href="/my-ptcs.html">My PTC's</a></li><li><a href="/cashback-offer.html">Cashback Offer!</a></li><li><a href="/payment-proofs.html">Payment Proofs</a></li><li><a href="/getting-referrals.html">Getting Referrals</a></li><li><a href="/contact.html">Contact</a></li><li><a href="/your-words.html">Your Words</a></li><li><a href="/forum.html">Forum</a></li><li><a href="/advertise-on-ptcs.html">Advertise on PTC's</a></li> 
</ul>

</div><!-- end id:navigation -->


<div id="container">


<div id="headertext">
<h1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nauticus' PTC Blog - Ideas For A Safe Earning!</h1>
</div><!-- end id:header -->

  
<div id="header-outer" class="weebly_header">
  <div>&nbsp;</div>
</div>
<!-- end id:headerimage -->

<div id="content">

<!-- WEEBLY_START_CONTENT --><div ><div id="511739501707094" align="left" style="width: 100%; overflow-y: hidden;"><MARQUEE><FONT face="Times New Roman" size=+1>Welcome to my PTC related blog, feel free to comment, suggest ideas or simply hang out at the forum! *** I've made some changes to the blog recently. If you're interested read more in the <a href="http://www.nauticusptc.com/forum.html">forum!</a> ***</FONT></MARQUEE></div>



</div>

I hope it's possible since the site is hosted at Weebly and I'm not the one doing it. The rotation code should be placed either before the <!-- WEEBLY_START_CONTENT --> or below it, both will work fine. Let's hope it can be made...

#14 Nauticus

Nauticus
  • Topic Starter

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Sofia, Bulgaria
  • Local time:07:28 PM

Posted 23 December 2008 - 06:16 AM

Can anyone help me, please? :thumbsup:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users