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,966
  • Latest: safir45
Stats
  • Total Posts: 195,990
  • Total Topics: 21,323
  • Online today: 1,050
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 573
  • Total: 573

Some javascript help needed.

Started by gerrymo, February 27, 2006, 12:34:42 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

gerrymo

I am playing with a new affiliate page. The give me the code below, which will produce a set of links that change on a daily basis. However, tha open in the same window. I e-mailed them and the say they wont chance the default to opening them in a new window. They did say that using window.open would force a new window. How would I get this to work? So far all attempts have failed.


<script language="javascript" type="text/javascript"
src="http://www.*****.com/jsExtPromo.asp?U=171876&P=320"></script>


I know I could open a link from my site in a new window to show the page, but I'd like it within TP if possible.

Mitch

I am not sure about java but could you not through a target=self or something?

Eternity

#2
Quote from: gerrymo on February 27, 2006, 12:34:42 PM
I am playing with a new affiliate page. The give me the code below, which will produce a set of links that change on a daily basis. However, tha open in the same window. I e-mailed them and the say they wont chance the default to opening them in a new window. They did say that using window.open would force a new window. How would I get this to work? So far all attempts have failed.


<script language="javascript" type="text/javascript"
src="http://www.*****.com/jsExtPromo.asp?U=171876&P=320"></script>


I know I could open a link from my site in a new window to show the page, but I'd like it within TP if possible.

I found this on the web
Javascript

it makes the subject clearer for me and if you read this thread below, Ichbin has also explained it in detail, that you do not need to include the javascript arguments for this to work. 

Ichbin's Explanation

gerrymo

I know that, and tried it already. The page being displayed on my site comes from them. The links within it open in the same window. I'm trying to force them to open in new windows so I dont loose my members to surfing another site.

The way it is at the moment, members on my site can only click one link. They have to back up loads of pages to get back to pick another. I want the option for them to be able to close one window, select and view another link.

darthi8nt

I don't use tiny portal but enigma2.0 but i make a custom block and using gamepro website as an example on ps2 rss feed Code like this
<script language="JavaScript" src="http://jade.mcli.dist.maricopa.edu/feed/feed2js.php?src=http%3A%2F%2Fwww.gamepro.com%2Frss%2Ffeeds%2Fgp_ps2.xml&num=7&targ=\'popup\' " type="text/javascript"></script>

<noscript>
<a href="http://jade.mcli.dist.maricopa.edu/feed/feed2js.php?src=http%3A%2F%2Fwww.gamepro.com%2Frss%2Ffeeds%2Fgp_ps2.xml&num=7&targ=\'popup\' &html=y">View RSS feed</a>
</noscript>


where you see this http%3A%2F%2Fwww.gamepro.com%2Frss%2Ffeeds%2Fgp_ps2.xmlthis is your rss url info from the site you want. this is how many feeds you want to show just change the value to how many you want &num=7 and this is what produces your popup window so a user can minimize or click out of the window and their right back where they left off from your site &targ=\'popup\'  oh and about the src="http://jade.mcli.dist.maricopa.edu/feed/feed2js.php? this is just a php file from a website that has it( it calls as an rss reader function) you can download the feed2js.php file and ftp it to your server or just use this link one on all your feeds doesn't make a difference. Also there are other options available like having the full or partial description too but i just gave you an example. Here is a pic of it from site I wont post site link cause I'am not sure if it is allowed.

[attachment deleted by admin]

This website is proudly hosted on Crocweb Cloud Website Hosting.