> Can somebody help me, We have multiple (virtual) domain in the same
machine.
> How to login to Sqwebmail with multiple domain without type domain (just
> abcd without @domain.com).
> Like Hotmail or MSN, user just type user id and chose domain hotmail or
MSN.
>
> We use qmail and vpopmail for virtual domain.


i do just that at http://www.hipsound.com
I've altered the html in /usr/local/share/sqwebmail/html/login.html
to use 4 input fields, 1 of which is hidden, and then a simple javascript
function to update the hidden field with the contents of the user and domain
fields.


here is the javascript:

<SCRIPT language=javascript>
function update_username() {
document.logon.username.value=document.logon.user.value + "@" +
document.logon.dom.value;
}
</SCRIPT>


and here is the html :

<input type="text" name="user" onchange="update_username">
<select name="dom" onchange="update_username()">
<option value="hipsound.com" selected>hipsound.com</option>
<option value="twista.com">twista.com</option>
</select>
<INPUT TYPE="hidden" NAME="username" VALUE="">


as you can see, i stripped the html down quite a bit so you can get an idea.
anytime contents change in the "user" field or the "dom" field,
update_username() gets called to concat user+dom to make "username" which is
the field that you must pass to sqwebmail to log in.  the javascript assumes
your form is name=logon

hope this helps you with what you are trying to accomplish.

dallas




Reply via email to