TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 317
  • Total: 317

Creating new pages using links in a HTML block

Started by ranger, July 04, 2010, 06:33:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZarPrime

ranger,

OK, give me a day or so to work on this and I will get back to you on it.

ZarPrime

ZarPrime

Ranger,

OK, try this code  in the block (HTML & Javascript code type block) instead of what you are using now.  If I have done everything right, clicking on any of the images should open up an 800px by 650px popup window with the correct content.  It works fine on my test site (scroll to the bottom) --> http://talesofthehavenexpanse.com/smf2test/index.php

Here's the code (I've left some gaps in the code so that you can figure out what's going on) ...

<script type="text/javascript">
<!--
var newwindow;
function poptastic(url)
{
   newwindow=window.open(url,'name','height=650,width=800,left=50,top=50,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
   if (window.focus) {newwindow.focus()}
}
// -->
</script>

<P>Our Motorcycle reviews are based on real members owning, riding &amp; maintaining the motorcycles they review, Giving you an all over perpestive of what the motorcycle is like.</P>
<P>Remember a 5 minute test ride is not enough to get a real insight into the motorcycle your about to purchase.</P>
<P>Hopefully these reviews with aid you in your choice of buying a new motorcycle that suits your style of riding &amp; needs.</P>
<P>Please click on a motocycle manufacturer below to see the reviews:-</P>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/forum/index.php?page=aprilia_motorcycle_reviews');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Aprilia Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Aprilia-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/forum/index.php?page=bmw-motorcycle-reviews');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers BMW Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/BMW-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/forum/index.php?page=Ducati-Motorcycle-Reviews');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Ducati Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Ducati-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Harley-Davidson-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Harley Davidson Reviews By Real Members That own the Motorcycles" src="http://www.welshbikers.co.uk/images/Harley-Davidson-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Honda-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Honda Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Honda-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Kawasaki-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Kawasaki Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Kawasaki-Reviews.gif"></a>

<P></P>
<P></P>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/KTM-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers KTM Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/KTM-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Moto-Agusta-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Moto Agusta Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Moto-Agusta-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Moto-Guzzi-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Moto Guzzi Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Moto-Guzzi-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Norton-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Norton Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Norton-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Suzuki-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Suzuki Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Suzuki-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Triumph-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Triumph Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Triumph-Reviews.gif"></a>

<a href="javascript:poptastic('http://www.welshbikers.co.uk/Yamaha-bike-reviews.php');"><IMG style="BORDER-BOTTOM: 0px solid; BORDER-LEFT: 0px solid; MARGIN: 10px; BORDER-TOP: 0px solid; BORDER-RIGHT: 0px solid" alt="Welsh Bikers Yamaha Reviews By Real Members That Own The Motorcycles" src="http://www.welshbikers.co.uk/images/Yamaha-Reviews.gif"></a>

<P></P>
<P></P>
<P></P>
<P>If you'd like to review a motocycle that you own or have owned then please <A href="http://www.welshbikers.co.uk/forum/road-motorcycle-reviews/"><FONT color=#660000>click here</FONT></A></P>

ranger

OK I've tried it & get an error "error on page" object expected line: 1 Char: 1

DO you think it's the theme javascript messing it up?

**UPDATE**
I seemed to have found the problem everytime I place the html in the block & save TP deletes this part
<script type="text/javascript">
<!--
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=650,width=800,left=50,top=50,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
if (window.focus) {newwindow.focus()}
}
// -->
</script>



lurkalot

#13
Quote from: ranger on July 08, 2010, 07:31:23 PM

DO you think it's the theme javascript messing it up?

**UPDATE**
I seemed to have found the problem everytime I place the html in the block & save TP deletes this part



Wasn't this a known problem with TP 1.0 Beta 5-1?  Ranger, what version of TP are you running?

Actually it was for a php block, found the bugtracker thread, (sorry).

http://www.tinyportal.net/index.php?topic=32515.msg261360#msg261360

ZarPrime

Ranger,

Sorry, I was out for most of the day.

If you are using the editor on the Block edit screen, look for the HTML button and click it.  It looks like this --> <>

Then put the code in and immediately save the block.  It should save properly then.  LMK if it doesn't.

ZarPrime

ranger

Nah still the same >:(

I'm using 5.1 so I'm going to upgrade later today & see if that makes a diference O0

ZarPrime

OK, LMK what happens.  You shouldn't have a problem with it but, if you do, try setting up a php block and putting the code in that instead.  The first time you save it, you'll get a php error.  Just go back in and change the block type from php to an HTML and Javascript block and save, and then it should be cool.

ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.