Jump to content

[SOLVED] fixed popup? On halfway through page? (Already have script)


A2xA

Recommended Posts

Okay, I have a script that makes a popup form a form.  I want the popup fixed on a portion of a page.  Say the middle of the page scrolled down.  Automatically once the popup is opened. 

 

Here's the script I need to edit to say that:

 

window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300')

 

is it in location?

Link to comment
Share on other sites

nevermind, that's what I need. Just I don't know what function I need to define for the custom window?:

 

 

 

<html>
<head>
<script language="javascript">
// Author: Eric King Url: http://redrival.com/eak/index.shtml
// This script is free to use as long as this info is left in
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
var win = null;
function WHAT FUNCTION HERE(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+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
<script language="javascript">

function popUp() {
day = new Date();
id = day.getTime();
var textInput = document.getElementById("urlselection").value
var URL = "http://wiicharged.com/index.php?action=pm;sa=send;"
window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=375,height=400')
}

</script>

</head>
<body>
<div style="text-align: left;"><a href="http://wiicharged.com/index.php?action=hubs"><img style="border: 0px solid ; width: 656px; height: 125px;" alt="Wii forum friend codes" src="http://i27.tinypic.com/2n24pag.png"></a><br>

<br><br>
<h3>Challenge Another Member to an Online Match!<h3>
<form onsubmit="popUp(); return false">
<input type=button value="Challenge!" onClick="popUp()" id="urlselection">
</form>

</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.