Javascript runs locally but not when deployed

47 views
Skip to first unread message

NeoToren

unread,
Feb 13, 2014, 8:16:06 PM2/13/14
to web...@googlegroups.com
I am trying to run a simple javascript that needs to fetch an external URL:


When locally - it works great. 
When deployed on PythonAnywhere - it doesn't work and it doesn't throw an error.

I have tried wrap a <div> container around it - didn't help
I have tried sanitize True or False it in an XML - didn't help

There was some discussion on this group more than 2 years ago about this - but no conclusion

To make it more interesting...
another kind of javascript widget such as :

<div align="center" style="margin: 15px 0px 0px;"><noscript><div align="center" style="width: 140px; border: 1px solid rgb(204, 204, 204); text-align: center; color: rgb(249, 249, 255); font-weight: bold; font-size: 12px; background-color: rgb(4, 2, 68);"><a href="http://mycountdown.org/tag.php?tag=icd" style="text-decoration: none; font-size: inherit; color: rgb(249, 249, 255);">Icd </a></div></noscript><script type="text/javascript" src="http://mycountdown.org/countdown.php?cp2_Hex=040244&cp1_Hex=F9F9FF&img=1&hbg=&fwdt=170&lab=1&ocd=conference&text1=ICD-10&text2=My Countdown&group=Event&countdown=conference&widget_number=3010&event_time=1412121600&timezone=America/New_York"></script></div>

again - works locally but not when deployed.

Now comes the rub....
If a widget is in the format of:

<iframe width="350" height="240" src="//w2.countingdownto.com/468181" frameborder="0"></iframe><p><a href="http://countingdownto.com">Countdown Clocks</a></p>
It works both locally AND on hosted machine / deployed
It doesn't have any mention of JS...and it is wrapped in <iframe>....
still...interesting bug or I am doing something wrong ?


Leonel Câmara

unread,
Feb 14, 2014, 5:17:04 AM2/14/14
to web...@googlegroups.com
What appears in the browser console when you see the deployed version?

Alex

unread,
Feb 14, 2014, 10:12:32 AM2/14/14
to web...@googlegroups.com
Everything on the page appears correctly except the widget which does not show at all. Nothing. No hint no error...

On Feb 14, 2014, at 5:17 AM, Leonel Câmara <leonel...@gmail.com> wrote:

What appears in the browser console when you see the deployed version?

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/OvDhm_6Ks5s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Leonel Câmara

unread,
Feb 14, 2014, 10:31:00 AM2/14/14
to web...@googlegroups.com
There are no errors at all on the browser javascript console?

Marin Pranjić

unread,
Feb 14, 2014, 10:35:32 AM2/14/14
to web2py-users
Do you use http or https? What if you try another one?

Marin


On Fri, Feb 14, 2014 at 4:31 PM, Leonel Câmara <leonel...@gmail.com> wrote:
There are no errors at all on the browser javascript console?

--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.

NeoToren

unread,
Feb 14, 2014, 10:42:02 AM2/14/14
to web...@googlegroups.com
Glenn from PythonAnywhere suggested on StackOverflow it may happen since page is https while widget is http...

Leonel Câmara

unread,
Feb 14, 2014, 12:21:33 PM2/14/14
to
It could, as browser would block it.

Just change:

NeoToren

unread,
Feb 14, 2014, 5:39:16 PM2/14/14
to web...@googlegroups.com
Tried it. Does work locally - does NOT work when deployed...


On Friday, February 14, 2014 12:21:13 PM UTC-5, Leonel Câmara wrote:
It could, as browser would block it.

Just change:
Reply all
Reply to author
Forward
0 new messages