Home > Questions and Answers > General Questions

Using GEO & Countdown scripts. (14)


09-02-2011 04:33 PM #1 dpol (Member)
Using GEO & Countdown scripts.

Hi,

I'd like to use landing page template from http://stmforum.com/forum/showthread...-2%29-PSD-HTML

I am talking about Amazing Sushi Deals for PPV.

I found GEO & Countdown scripts on http://stmforum.com/2011/02/04/steal...-from-me-free/

How exactly do I use them in the code with this specific lander.

Is there recommended html editor? I am using NVU.

Thanks,
Dani


09-05-2011 06:48 AM #2 lavish (Member)

I have issues with the countdown script myself.

I know you declare the javascript at the end of the header tag (</head>) - <script type="text/javascript" src="countdown.js"></script>

Then I call the PHP script later on where I want the timer to display using:

<?php
@include("countdown.php");
?>

Problem is the formatting. While I want it to read Offer expires in: 2:00 it outputs like this:

Offer expires in:
2:00


I don't know why it breaks to a new line automatically. Any help would be appreciated. Hopefully you got something out of this too Dani.


09-05-2011 07:55 AM #3 constantin (Member)

lavish: post a bit more before and after that line. you may have a <.br> or a <.p> in there somewhere


09-05-2011 08:07 AM #4 lavish (Member)

Sure... this is more of the code where I call it in landingpage.php:


<br><br>
This offer expires in:
<?php
@include("countdown.php");

?>
</td>
And this is the code for countdown.php:

<script type="text/javascript" src="countdown.js"></script>

<form name="cd">
<input id="txt" readonly="true" type="text" value="02:00" border="0" name="disp" style="border:0px;">
</form>
I'd understand if I did have a break or paragraph somewhere... but I'm calling the function straight after writing "This offer expires in:"

I'm very confused


09-05-2011 09:52 AM #5 inversion (Member)

Is your table row wide enough?


09-05-2011 10:16 AM #6 lavish (Member)

Quote Originally Posted by inversion View Post
Is your table row wide enough?
Hmmm... it should be.


09-05-2011 07:40 PM #7 dpol (Member)

Finally, I ordered scripts integration on fiverr.com - the fastest solution.


09-06-2011 03:27 AM #8 lavish (Member)

Good idea! I'm on it.


09-06-2011 03:30 AM #9 constantin (Member)

it shouldn't be that difficult guys. are you having problems with other scripts (today's date or geolocation) or is it just the countdown? i'll post up some working examples in a minute.

COUNTDOWN SCRIPT

<.head>
<.script language="JavaScript" type="text/javascript">

<!--
var sec = 23; // set the seconds
var min = 04; // set the minutes

function countDown() {
sec--;
if (sec == -01) {
sec = 59;
min = min - 1; }
else {
min = min; }

if (sec<=9) { sec = "0" + sec; }

time = (min<=9 ? "0" + min : min) + " min and " + sec + " sec ";

if (document.getElementById) { document.getElementById('theTime').innerHTML = time; }

SD=window.setTimeout("countDown();", 1000);
if (min == '00' && sec == '00') { sec = "00"; window.clearTimeout(SD); }
}
window.onload = countDown;
// -->
<./script>
</.head>
<.body>
<.font color="#b02558"><center>Offer Expires In: <span id="theTime" class="timeClass"></span></center>

<./body>
just take out the dots in the tags and set var sec and var min to whatever you want the countdown to start at.

If you want examples for other scripts just ask.


09-06-2011 08:31 AM #10 lavish (Member)

Damn... constantin - you're a champ. That works perfectly. Thanks!


09-06-2011 11:09 AM #11 dpol (Member)

Thanks, constantin!
Yes, please post some examples with other scripts.
In addition, do you have example of how to integrate it into image? My original question was about Sushi landing page template from http://stmforum.com/forum/...-2%29-PSD-HTML


09-06-2011 11:16 AM #12 lavish (Member)

To echo dpol's thoughts - constantin I'm never going to refuse if you've got more scripts to share! Thanks man


09-06-2011 12:10 PM #13 constantin (Member)

np. lemme know if you need today's/tomorrows date or geolocation examples.


09-06-2011 04:40 PM #14 dpol (Member)

just share all of them
thanks


Home > Questions and Answers > General Questions