Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

Javascript Problem


  #1  
Old Sep 10, 2011, 11:43 AM
bvimusic
 
25 posts · Jul 2010
Javascript Problem

I am trying to put a countdown timer on a page in atahualpa.
This is the script I am trying to use:

http://www.dynamicdrive.com/dynamici...lcountdown.htm

I pasted the top part of the code into the "HTML Inserts: Header" section and then the other snippet into a post and it doesn't show up.

Can anyone give me an idea as to what I can do to make this work?
  #2  
Old Sep 10, 2011, 12:18 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
good luck, part of the problem is that Wordpress likes to put a <p> in the text even when you don't want it. I would suggest making this into a plugin if you really need it or looking for an existing plugin
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Sep 12, 2011, 02:42 PM
bvimusic
 
25 posts · Jul 2010
alright. I don't really have an idea how that is done but I will research it.
Thank you.
  #4  
Old Sep 12, 2011, 02:43 PM
bvimusic
 
25 posts · Jul 2010
This explains in further detail what is causing the problem.

I am trying to add a javascript countdown to my page.
This should be simple enough but I've been struggling with it for way too many hours to even admit.

So, if I make a test .php page on my server with the script in the <head> tag and run it, it runs fine. When I then create a .js file and place that code in the ATO Theme Options > HTML Inserts: Header, it is returning an error. As a result, I feel like something is breaking between atahualpa and my page.. I don't really know what's happening.

Here is the page I'm working on:
http://www.hoodielife.com/time1.php

This code has a debug mode so I can see that it's a problem with acquiring the date / time from the server.. but this isn't the case when the code is part of the original .php page, only when I move it to a separate .js file.

Can someone please help?
  #5  
Old Sep 12, 2011, 03:07 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Wordpress is adding extra html to the script causing it not to work. If you want this to work, I suggest you build a plugin to add the functionality or look for another plugin that will add a timer.

This is not a theme issue.

You can try asking the question at WordPress.org
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Sep 12, 2011, 04:25 PM
bvimusic
 
25 posts · Jul 2010
Alright. I do appreciate the response.
There's no chance I can build a plugin for this, I just don't have the experience to do so... I was reading about it but it's not an option.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript in a page cway Center area post/pages 1 Apr 30, 2011 03:03 PM
[SOLVED] problem with JavaScript in pages marek91 Center area post/pages 7 Nov 28, 2010 09:29 PM
help: add javascript banner in header irynas Header configuration & styling 0 Mar 8, 2009 03:06 AM


All times are GMT -6. The time now is 03:24 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.