kfir
Oct 16th 2007, 12:12 am
Hello,
Well the first function that I would like to get some help about is this one:
var popup;
function openPopUp(mid,title){
var location = "blocks/watch.php?mid="+mid;
var title = "iLTv - "+title;
var propreties = "height=400px";
propreties += ",width=600px";
propreties += ",menubar=no";
propreties += ",location=yes";
propreties += ",resizable=no";
propreties += ",scrollbars=no";
propreties += ",status=no";
propreties += ",titlebar=no";
popup = window.open(location,title,propreties);
}
And this is how I activate the function
<a href="javascript:openPopUp('1','ruby')">
Now the problem is that this function doesn't work on IE for some reason... (On FF and OPERA it works perfectly fine so what's the problem here?)
Now another problem that I've encountered is about submitting forms (this time the function works fine in IE but doesn't work on FF and OPERA)
function check(){
var check = true;
var user = document.getElementById('user');
var userText = document.getElementById('userText');
var pass = document.getElementById('pass');
var passText = document.getElementById('passText');
userText.style.color="#838383";
passText.style.color="#838383";
if(user.value==""){
userText.style.color="#FF0000";
check = false;
}
if(pass.value==""){
passText.style.color="#FF0000";
check = false;
}
if(check)document.loginForm.submit();
}
And the form that goes with this function is
<form name="loginForm" action="" method="post">
<input type="hidden" name="tmp" value="login" />
<table cellpadding="0" cellspacing="0">
<tr>
<td id="userText">Username:</td>
<td>
<input type="text" name="user" maxlength="15" id="name" />
</td>
</tr>
<tr>
<td id="passText">Password:</td>
<td>
<input type="password" name="pass" id="pass" />
</td>
</tr>
<tr>
<td colspan="2" align="left">
<button onclick="check()">
Send
</button>
</td>
</tr>
</table>
</form>
Now here the problem is that in FF and OPERA the form will be submitted at any case. What's the problem here and how can I solve it?
Thanks in advance for the help
Well the first function that I would like to get some help about is this one:
var popup;
function openPopUp(mid,title){
var location = "blocks/watch.php?mid="+mid;
var title = "iLTv - "+title;
var propreties = "height=400px";
propreties += ",width=600px";
propreties += ",menubar=no";
propreties += ",location=yes";
propreties += ",resizable=no";
propreties += ",scrollbars=no";
propreties += ",status=no";
propreties += ",titlebar=no";
popup = window.open(location,title,propreties);
}
And this is how I activate the function
<a href="javascript:openPopUp('1','ruby')">
Now the problem is that this function doesn't work on IE for some reason... (On FF and OPERA it works perfectly fine so what's the problem here?)
Now another problem that I've encountered is about submitting forms (this time the function works fine in IE but doesn't work on FF and OPERA)
function check(){
var check = true;
var user = document.getElementById('user');
var userText = document.getElementById('userText');
var pass = document.getElementById('pass');
var passText = document.getElementById('passText');
userText.style.color="#838383";
passText.style.color="#838383";
if(user.value==""){
userText.style.color="#FF0000";
check = false;
}
if(pass.value==""){
passText.style.color="#FF0000";
check = false;
}
if(check)document.loginForm.submit();
}
And the form that goes with this function is
<form name="loginForm" action="" method="post">
<input type="hidden" name="tmp" value="login" />
<table cellpadding="0" cellspacing="0">
<tr>
<td id="userText">Username:</td>
<td>
<input type="text" name="user" maxlength="15" id="name" />
</td>
</tr>
<tr>
<td id="passText">Password:</td>
<td>
<input type="password" name="pass" id="pass" />
</td>
</tr>
<tr>
<td colspan="2" align="left">
<button onclick="check()">
Send
</button>
</td>
</tr>
</table>
</form>
Now here the problem is that in FF and OPERA the form will be submitted at any case. What's the problem here and how can I solve it?
Thanks in advance for the help