Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Opening a new window with javascript

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
richfed Posted - 27 June 2010 : 09:33:28
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"?
9   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 28 June 2010 : 09:36:33
openWindow5 is used to display the pop_printer_friendly page from topic.asp (in a standard snitz install)
richfed Posted - 28 June 2010 : 09:24:22
I have done just that. Blended your two suggestions. All is good!!
bobdsw Posted - 28 June 2010 : 08:22:07
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.
richfed Posted - 27 June 2010 : 15:40:09
quote:
Originally posted by bobdsw

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




Perfect! Thanks!

And, thank you, too, Leatherlips!
leatherlips Posted - 27 June 2010 : 11:44:13
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 & _
bobdsw Posted - 27 June 2010 : 11:10:16
add this bit in red in inc_header:
toolbar=yes,location=1
richfed Posted - 27 June 2010 : 11:04:00
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 & _
bobdsw Posted - 27 June 2010 : 10:30:07
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




leatherlips Posted - 27 June 2010 : 10:02:17
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.

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07