Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
New window - preset size
Old 09-05-2006, 08:54 AM New window - preset size
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
I have some RSS digest, on my website, but when someone clicks a headline, i want the RSS to open in a new window.

I have only added targe="blank" to the code.


The current code looks like this:


<tr><td valign="middle" style="font-size: 16px; color: #aaa;">%DAY%%MONTHSHORT%&nbsp&nbsp;</td><td><b><a href="%URL%" target="blank">%TITLE,70%</a></b><ifdescription><br /><small>%DESCRIPTIONPLAIN,250%</small></ifdescription></td></tr>


I need all the things u see in that code, but it can maybe be arrange differently... hope someone can ajust that code for me so link open in a new pre-set size... like 700x650
tomcat_fo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-05-2006, 12:47 PM Re: New window - preset size
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
You cannot specify a size when using target=_blank (note the underscore).
However, you could use window.open in JS to achieve this.

Try something like:
Code:
<a href="#" onclick="window.open('%URL%','window_name','width=700,height=650');">%TITLE,70%</a>
Note that if the URL contains inverted commas, they need to be escaped with a backslash.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 09-05-2006, 01:10 PM Re: New window - preset size
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
How would you get that in this HTML, so it still works:

I think i need all the things in that HTML (except _BLANK)

You can see my RSS news at Kikarin.com

There is a headline that is a link, and a short story... wich i belive is %DESCRIPTIONPLAIN,250% in the HTML

Other things that need to be there as well is:
%DAY%
%MONTHSHORT%
<ifdescription>
%title%
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 09-05-2006, 02:04 PM Re: New window - preset size
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
What I posted:
Code:
<a href="#" onclick="window.open('%URL%','window_name','width=700,height=650');">%TITLE,70%</a>
replaces this
Code:
<a href="%URL%" target="blank">%TITLE,70%</a>
in what you posted.

Nothing else needs to be changed.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 09-05-2006, 02:31 PM Re: New window - preset size
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
Thanks a lot, that did work.

But how do i get scrollbars in that windowm, and make it possible for users to change the size of the window with their mouse ?
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 09-05-2006, 02:37 PM Re: New window - preset size
tomcat_fo's Avatar
Ultra Talker

Posts: 275
Trades: 0
Never mind my last question - i added , resizable=1, scrollbars=1


Thanks again
tomcat_fo is offline
Reply With Quote
View Public Profile
 
Old 09-05-2006, 02:38 PM Re: New window - preset size
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
Add 'resizable' to the list of options:
Code:
<a href="#" onclick="window.open('%URL%','window_name','resizable,width=700,height=650');">%TITLE,70%</a>
A full list of options can be found here.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Reply     « Reply to New window - preset size
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61567 seconds with 12 queries