This is in head section:
function edit(textarea) {
if (textarea == 0) {
thedata = document.loginForm.usrname.value
thenumber = 0
}
else if (textarea == 1) {
thedata = document.loginForm.pass.value
thenumber = 1
}
username = document.loginForm.user_name.value;
newwin =
window.open("ubaci_sliku.php?username="+username," ",width=800,height=850,resizable,scrollbars=1,stat us=1")
}
This is form code:
<form name="loginForm" id="loginForm" method="POST" action="#">
<input type="text" name="usrname" />
<input type="hidden" name="user_name" value="neka_vrijednost" />
<input type="button" class="button" value="Odaberi" onclick="edit(0);" />
</form>
You can have another text field with name = pass and onclick=edit(1);
In IE 6 and 7 it throws Invalid argument, and in FireFox works without any
problem.
How to solve this?
Thanks,
Zvonko