/    Sign up×
Community /Pin to ProfileBookmark

Need Help on This

This is the real login (i have it in iframe middle of page)
[IMG]http://merc77.info/uploads/img/copy.jpg[/IMG]

I have made this on my web page (Front Page top left corner)

[IMG]http://merc77.info/uploads/img/login2.jpg[/IMG]

I got the login on top to work
[URL=”http://mercdesigns.info/sbtv/Untitled-1.html”]http://mercdesigns.info/sbtv/Untitled-1.html[/URL]
so now how do i get it to show flashchat.php in the middle of the page after login. (After you press login the chat opens in a big window)

Added index.tpl into html page

[code=php]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<title>Space Box Tv</title>
<link href=”login.css” rel=”stylesheet” type=”text/css” />
<script type=’text/javascript’>
<!–
function formIsValid() {
// check to make sure a valid username has been entered
if ( document.login.username.value == ” ) {
alert(‘Please input a username.’);
return false;
}

return true;
}

// a small poupup window to show who’s in the chat at the current time
function showInfo() {
// the size of the popup window
var width = 400;
var height = 300;

// the x,y position of the popup window
// NOTE: this formula will auto-center the popup on the screen
var y = (screen.height – height) / 2;
var x = (screen.width – width) / 2;

var url = ‘info.php’;
var options = ‘width=’ + width + ‘,height=’ + height + ‘,top=’ + y + ‘,left=’ + x + ‘,resizable’;

// open the info window as a popup, instead of embedded in webpage
window.open( url, ‘info’, options );
}

function basicLogin() {
if (formIsValid()) {
document.login.submit();
}
}

function popupLogin() {
// check to make sure a valid username has been entered
if (!formIsValid()) return;

var username = document.login.username.value;
var password = document.login.password.value;
var lang = document.login.lang.value;

// the size of the popup window
var width = 800;
var height = 600;

// the x,y position of the popup window
// NOTE: this formula will auto-center the popup on the screen
var y = (screen.height – height) / 2;
var x = (screen.width – width) / 2;

var url = ‘flashchat.php?username=’ + username + ‘&password=’ + password + ‘&lang=’ + lang;
var options = ‘width=’ + width + ‘,height=’ + height + ‘,top=’ + y + ‘,left=’ + x + ‘,resizable’;

// open the chat window as a popup, instead of embedded in webpage
window.open( url, ‘chat’, options );
}
//–>
</script>
</head>

<body>
<div align=”center”>

<table width=”600″ border=”0″ cellpadding=”0″ cellspacing=”0″>
<td align=”right” valign=”baseline”>
<form action=”./sl/flashchat.php” method=”post” name=”login”>
user: vstyle01 pass: farrah7 Username: <input type=”text” name=”username”>
Password: <input type=”password” name=”password”>
<input name=”button” type=”button” onClick=”javascript:basicLogin();” value=”Login &gt;&gt;”>
<br />

<a href=”http://mercdesigns.info/sbtv/sl/profile.php?register=true” class=”style2″>register</a> |

<a href=”http://mercdesigns.info/sbtv/sl/profile.php?newpassword=true” class=”style2″>new password</a> |
<a href=”http://mercdesigns.info/sbtv/sl/profile.php?oldpassword=true” class=”style2″>current password</a>

</form>
</td>
<tr>
<td><img src=”../My Documents/test/g.png” width=”300″ height=”132″ hspace=”5″> </td>
</tr>
<tr>
<td>

<table width=”125″ border=”0″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td><img src=”../My Documents/test/images/menu.jpg” width=”169″ height=”551″ hspace=”5″></td>
<td>

<table width=”520″ border=”0″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td><p align=”top”><p>After login flashchat.php shows here!</p>
</iframe></p></td>
</tr>
<tr>
<td><a href=”http://mercdesigns.info/sbtv/nl/newsletter.php” class=”style1″>Subscribe to Our Newsletter</a></td>
</tr>
</table> </td>
</tr>
</table> </td>
</tr>
</table>
</div>
</body>
</html>

[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@SrWebDeveloperMar 18.2010 — so now how do i get it to show flashchat.php in the middle of the page after login
[/QUOTE]


I'm not sure what's wrong. I visited the link and after login it opened the chat in the middle, not a popup window. Your code, as posted, shows the same behavior (the form action calling flashchat.php, not the popupLogin JS method which opens a window with Flashchat in it).

Matter of fact, popupLogin is orphaned, meaning I can't find any code the invokes that function. Plus, it should be renamed to "popupChat" as that is what it really would do if used at all.

-jim

[COLOR=#000000][COLOR=#0000bb]

[/COLOR]
[/COLOR]
Copy linkTweet thisAlerts:
@michael1977authorMar 18.2010 — I change this:
[code=php]<form action="./sl/flashchat.php" method="post" name="login">[/code]

to this:
[code=php]<form TARGET="mainframe" action="./sl/flashchat.php" method="post" name="login">[/code]

then added this:
[code=php]<p><iframe id="mainframe" name="mainframe" width="100%" height="500"></iframe></p>
</iframe></p>[/code]


put it together:
[code=php]<form TARGET="mainframe" action="./sl/flashchat.php" method="post" name="login">form input</form>
<p><iframe id="mainframe" name="mainframe" width="100%" height="500"></iframe></p>
[/code]

now it iframes in the middle
×

Success!

Help @michael1977 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...