O'Reilly Forums: Tweetshirt Not Able To Access Document From Updatetweets - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tweetshirt Not Able To Access Document From Updatetweets

#1 User is offline   michaellindahl 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-January 13

Posted 09 January 2013 - 09:57 AM

My update tweets function is exactly the same as listed on github. I am calling the updateTweets function from the script line as described in the book, and have updated the url. The following is that line:

	<script src="http://tweetshirt.wickedlysmart.com/?callback=updateTweets"></script>

However,
var tweetsSelection = document.getElementById("tweets");
will not work correctly. tweetsSelection will not be set and renames at null. If I call this line in another function (not called from the wickedlysmart.com script) it works fine. What is going wrong here?
0

#2 User is offline   michaellindahl 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-January 13

Posted 09 January 2013 - 01:14 PM

View Postmichaellindahl, on 09 January 2013 - 09:57 AM, said:

My update tweets function is exactly the same as listed on github. I am calling the updateTweets function from the script line as described in the book, and have updated the url. The following is that line:

	<script src="http://tweetshirt.wickedlysmart.com/?callback=updateTweets"></script>

However,
var tweetsSelection = document.getElementById("tweets");
will not work correctly. tweetsSelection will not be set and renames at null. If I call this line in another function (not called from the wickedlysmart.com script) it works fine. What is going wrong here?

That awkward moment when you put the script in the head instead of at the end of the body. ID-10-T Error: PEBKAC.
0

#3 User is offline   Beth Robson 

  • Advanced Member
  • PipPipPipPipPipPipPipPip
  • Group: O'Reilly Employee
  • Posts: 327
  • Joined: 17-September 08
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

Posted 10 January 2013 - 09:21 AM

:-)
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users