TinyPortal

Development => Support => Topic started by: srmmedia on November 25, 2009, 10:59:44 PM

Title: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 25, 2009, 10:59:44 PM
I am trying to get the following code to work in a block on my page here: http://420movement.com

you can see it on the lower left  panel

its not loading , i tried it on my same server with Wordpress and it worked.


Code:


<script>if (WIDGETBOX) WIDGETBOX.renderWidget('eeec449b-4f1d-4e3e-b36d-7548ff00de64');</script><noscript>Get the &lt;a href="http://www.widgetbox.com/widget/findrep"&gt;Find Your U.S. Representative&lt;/a&gt; widget and many other &lt;a href="http://www.widgetbox.com/"&gt;great free widgets&lt;/a&gt; at &lt;a href="http://www.widgetbox.com"&gt;Widgetbox&lt;/a&gt;! Not seeing a widget? (&lt;a href="http://docs.widgetbox.com/using-widgets/installing-widgets/why-cant-i-see-my-widget/"&gt;More info&lt;/a&gt;)</noscript>


End
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: IchBin on November 25, 2009, 11:21:20 PM
That code is not correct. Some of your characters have been changed to html entities. When you paste the html code into the editor, you must select the <> button first. This puts the editor into a code mode where you can then paste the HTML into the box, and then save it.
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 25, 2009, 11:37:10 PM
hmmm

yeah i did click the <> button and insert the code obtained Here: http://www.widgetbox.com/widget/findrep

still not working
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: JPDeni on November 25, 2009, 11:44:07 PM
This is the code you should be using:


<div id="cqp-findrep"></div><script src="http://widgets.cqpress.com/findrep/
getfindrep.ashx" type="text/javascript"></script>
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 25, 2009, 11:56:13 PM
Quote from: JPDeni on November 25, 2009, 11:44:07 PM
This is the code you should be using:


<div id="cqp-findrep"></div><script src="http://widgets.cqpress.com/findrep/
getfindrep.ashx" type="text/javascript"></script>

thats still not working, i thank you for your effort....but jeesh what gives here?
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 25, 2009, 11:58:23 PM
Quote from: JPDeni on November 25, 2009, 11:44:07 PM
This is the code you should be using:


<div id="cqp-findrep"></div><script src="http://widgets.cqpress.com/findrep/
getfindrep.ashx" type="text/javascript"></script>

whenever i insert that code , i click "save" then go back to the <> and the code is not there anymore
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: JPDeni on November 26, 2009, 12:36:29 AM
I'm not sure if that's a bug with the editor or not.

Try turning off the editor altogether and see what happens.
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 26, 2009, 12:46:44 AM
Quote from: JPDeni on November 26, 2009, 12:36:29 AM
I'm not sure if that's a bug with the editor or not.

Try turning off the editor altogether and see what happens.
how do you turn off the editor? im sorry im a novice here but doing the best i can.
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: ZarPrime on November 26, 2009, 01:03:44 AM
That code that JPDeni posted works fine in an HTML and Javascript block.  See my beta 4 test site, top block on the left panel ...
http://talesofthehavenexpanse.com/smf1test/index.php

What kind of block are you using and what is happening with the block?

ZarPrime
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 26, 2009, 09:45:08 AM
Quote from: ZarPrime on November 26, 2009, 01:03:44 AM
That code that JPDeni posted works fine in an HTML and Javascript block.  See my beta 4 test site, top block on the left panel ...
http://talesofthehavenexpanse.com/smf1test/index.php

What kind of block are you using and what is happening with the block?

ZarPrime
im also using an html javascript block.  I dunno when i insert her code then click save , it doesnt show anything in the block , then when i go back to the block to view it the code is gone .  and yes i am clicking into the <>
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 26, 2009, 09:50:38 AM
nothing ever works for me. why?
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: ZarPrime on November 26, 2009, 01:37:13 PM
No need to get frustrated Bro'.  Chances are it's just something small and silly.  Though I don't normally ask members to setup a temp Admin account for me to look closer at it, this is the second time I'm doing this today.  Go ahead and setup a temp Admin account and PM me the details and I'll take a look at it.

ZarPrime
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 26, 2009, 04:25:06 PM
Quote from: ZarPrime on November 26, 2009, 01:37:13 PM
No need to get frustrated Bro'.  Chances are it's just something small and silly.  Though I don't normally ask members to setup a temp Admin account for me to look closer at it, this is the second time I'm doing this today.  Go ahead and setup a temp Admin account and PM me the details and I'll take a look at it.

ZarPrime
done
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: ZarPrime on November 26, 2009, 08:46:04 PM
Fixed.

You are using TinyPortal 1.0 beta 3, which had some bugs in the way the editor worked (fixed in beta 4).  I had to change the block into a php block, paste the code, and then change it back to an html and javascript block.  Works now.  Marked solved. :up:

ZarPrime
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: srmmedia on November 27, 2009, 01:48:58 AM
Quote from: ZarPrime on November 26, 2009, 08:46:04 PM
Fixed.

You are using TinyPortal 1.0 beta 3, which had some bugs in the way the editor worked (fixed in beta 4).  I had to change the block into a php block, paste the code, and then change it back to an html and javascript block.  Works now.  Marked solved. :up:

ZarPrime
should i upgrade to a newer version to avoid this problem again?
Title: Re: trying to get a "contact your state rep" script to work in an html & javascript
Post by: IchBin on November 27, 2009, 05:37:50 PM
That would depend on whether you want to avoid the problem I guess.