Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Opening a new window with javascript
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

richfed
Average Member

United States
999 Posts

Posted - 27 June 2010 :  09:33:28  Show Profile  Visit richfed's Homepage  Reply with Quote
In a particular instance, I am using javascript:openWindow5 to open a new window off the default.asp page. I am not too familiar with this, but I am thinking that the 5 is some sort of pre-set window. It works fine, except that there is no address bar with the back/forward/refresh, etc. buttons. How can I alter this so that a window opens "in full"?

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 June 2010 :  10:02:17  Show Profile  Visit leatherlips's Homepage  Reply with Quote
There are several preset window types. You can change the window type if you wish but you should know that any other windows in the forum that use that preset will also be affected and may not have the results you want.

Instead, you may want to create a new window type and add it with the others. You will find them in inc_header.asp. Look for javascript:openWindow5 and you will find its presets. Copy and paste it at the bottom of the preset list and change the 5 to something different and then play with the presets until you have what you want. Be sure to change the 5 in the page that is using that preset so it will look at your new preset.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

bobdsw
New Member

United States
62 Posts

Posted - 27 June 2010 :  10:30:07  Show Profile  Visit bobdsw's Homepage  Reply with Quote
If you're trying to just open up an entire new browser window, rather than a pop up you do not need JaveScript. You can use:
<a href="link" target="_blank">Link Name</a>


If you're trying to use a pop up you can search inc_header.asp for:
function openWindow5(url)
and in that function remove the 's' from toolbars - that syntax is incorrect:
...'width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes'); if (window.focus){popupWin.focus();}}


The if statement we added at the end (in blue) sets focus to the pop up so that it doesn't get lost behind the main window. We had an instance where the user would be going back and forth quite a bit and if the pop up was left open it would just flash in the start menu and not actually get focus. We added this to all the OpenWindow functions in inc_header.asp





Phoenix! - Ful site integration, CSS driven & XHTML compliant, MooTools, TinyMCE editor for posts & custom content management, , Visual Theme Designer, custom menus & pages, member galleries with ASP JPeg and ASPResize, ASP WordPress style Blog, web friends, FaceBook, Twitter & other social-sharing integration, ReCaptcha & Anti-Spam Registration...and much more.

Edited by - bobdsw on 27 June 2010 10:51:40
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 27 June 2010 :  11:04:00  Show Profile  Visit richfed's Homepage  Reply with Quote
OK -- removing the s did show all the toolbars, EXCEPT the one with the address field in it, which is the one I want. Using IE8.

To be clear, how do I change the following code to simply open a new browser window?

" <a href=""javascript:openWindow5('links.asp')""><acronym title=""Web Links of interest ... add your own!"">Web Links</acronym></a>" & vbNewline & _
" |" & vbNewline & _
Go to Top of Page

bobdsw
New Member

United States
62 Posts

Posted - 27 June 2010 :  11:10:16  Show Profile  Visit bobdsw's Homepage  Reply with Quote
add this bit in red in inc_header:
toolbar=yes,location=1

Phoenix! - Ful site integration, CSS driven & XHTML compliant, MooTools, TinyMCE editor for posts & custom content management, , Visual Theme Designer, custom menus & pages, member galleries with ASP JPeg and ASPResize, ASP WordPress style Blog, web friends, FaceBook, Twitter & other social-sharing integration, ReCaptcha & Anti-Spam Registration...and much more.

Edited by - bobdsw on 27 June 2010 11:32:20
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 June 2010 :  11:44:13  Show Profile  Visit leatherlips's Homepage  Reply with Quote
You could do this:

Change the part in red:

" <a href=""javascript:openWindow5('links.asp')""><acronym title=""Web Links of interest ... add your own!"">Web Links</acronym></a>" & vbNewline & _
" |" & vbNewline & _


To:

" <a href=""links.asp"" target=""blank""><acronym title=""Web Links of interest ... add your own!"">Web Links</acronym></a>" & vbNewline & _
" |" & vbNewline & _

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 27 June 2010 11:55:47
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 27 June 2010 :  15:40:09  Show Profile  Visit richfed's Homepage  Reply with Quote
quote:
Originally posted by bobdsw

add this bit in red in inc_header:
toolbar=yes,location=1




Perfect! Thanks!

And, thank you, too, Leatherlips!
Go to Top of Page

bobdsw
New Member

United States
62 Posts

Posted - 28 June 2010 :  08:22:07  Show Profile  Visit bobdsw's Homepage  Reply with Quote
My pleasure, glad to help... and I agree with Leatherlips original thought - I'm unsure what all calls openWindow5 - duplicating the entire function and renaming it openWindowX would ensure you aren't changing how the window pops up for other calls.

Phoenix! - Ful site integration, CSS driven & XHTML compliant, MooTools, TinyMCE editor for posts & custom content management, , Visual Theme Designer, custom menus & pages, member galleries with ASP JPeg and ASPResize, ASP WordPress style Blog, web friends, FaceBook, Twitter & other social-sharing integration, ReCaptcha & Anti-Spam Registration...and much more.
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 28 June 2010 :  09:24:22  Show Profile  Visit richfed's Homepage  Reply with Quote
I have done just that. Blended your two suggestions. All is good!!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 28 June 2010 :  09:36:33  Show Profile  Visit HuwR's Homepage  Reply with Quote
openWindow5 is used to display the pop_printer_friendly page from topic.asp (in a standard snitz install)

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.5 seconds. Powered By: Snitz Forums 2000 Version 3.4.07