Popup Issue

J

JCO

The only part I don't understand is this:

Your function (NewWindow), as a script takes 5 parameters.
When you call the function, from the onload, you are passing 6 parameters
(where "front" is the 6th parameter).

I don't understand how your function makes use of this 6th parameter?

Thanks
 
J

JCO

Can anybody answer my question?


cookoonest said:
I had same problem and then found this script which seems to stop popup from
going to the back. Give it a try.

Put between <head> tags.

<script type="text/javascript" language="javascript">

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit
http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollba
rs='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

</script>


Put in <body> tag.

onLoad="NewWindow('http://www.yourpopup.htm','popup','475','410','center','f
ront')"

You can change width and height.

Don't know much about Javascript but it works in both IE and Firefox.
 
T

Thomas A. Rowe

You would have to set the focus on the page that is being loaded in to the popup.

Add the following to the body tag:

onLoad="focus();"

Keep in mind that you can not control the blocking of onLoading pop-ups being blocked by Windows
SP-2 and other popup blockers that users may have installed.

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
J

JCO

Right! I understand what you are saying about focus()

But my question was this:
The function, when being called passes the paramether 'front' as a 6th
parameter.
By looking at the function, it only takes 5-parameters, therefore, 'front'
does nothing.

I just want to make sure I understand. This appears to be an error.
Thanks Thomas
 
T

Thomas A. Rowe

You would need to check with the author of the script regarding "front" parameter.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
R

Robert Smith

I've seen in the past web input fields that included a mini text editor for
input into that field and when the data was submitted, the formatting went
with it (in html I assume) (This would be found in an admin section of the
site on an editor/add page)
 
J

JCO

Okay! Then that answers my question.
I didn't understand because I'm use to C++ Programming. While it is very
similar, I wasn't clear on that last parameter. Basically, if the parameter
is not used for the function, it defaults to be handled by HTML (most
likely).
 
Top