I am making a contact list for one of the websites I'm working on and given most of the users rely on a combination of AIM and MSN, I've run into this particular problem.
There is a javascript code which allows you to make a link that when clicked, (and if you have AIM open at the time) loads an AIM window addressing that X user with a default message like "Hello are you there". Here is the code:
That's for the header and this is for the link itself:
However, I am concerned with doing exactly this in MSN. I'm unsure if you can go as far as adding a message, but at least being able to load the window addressing that X username, or adding the username to your messenger contacts list would be phenomenal.
Help is much appreciated.
There is a javascript code which allows you to make a link that when clicked, (and if you have AIM open at the time) loads an AIM window addressing that X user with a default message like "Hello are you there". Here is the code:
Code:
<script language="JavaScript">
<!-- Begin
function doAIM() {
var action;
var msg = document.frmAIM.txtMessage.value;
var newMsg = "";
var charSpec = "N";
var specials = "&? @%";
for(var i = 0; i < msg.length; i++) {
for(var q = 0; q < specials.length; q++) {
if(msg.charAt(i) == specials.charAt(q)) {
charSpec = "Y";
break;
} else {
charSpec = "N";
}
}
if(charSpec == "Y") {
newMsg += "+";
} else {
newMsg += msg.charAt(i);
}
}
action = "aim:goim?screenname=";
action += document.frmAIM.txtName.value;
action += "&message=";
action += newMsg;
document.frmAIM.action = action;
document.frmAIM.submit();
}
// End -->
</script>
That's for the header and this is for the link itself:
Code:
<form method=post name="frmAIM">
ScreenName to Send to: <input type=text value="Screenname" onFocus="this.select();" name="txtName"><br>
Message:<br>
<textarea name="txtMessage" rows="5" cols="32" wrap="virtual">Geben Sie hier Ihre Nachricht ein!</textarea><br>
<input type=button onClick="doAIM();" value="Send Message!">
</form>
or<br>
<br>
<a href="aim:goim?screenname=Screenname&message=Hi,+Are+you+there?">Click</a>
However, I am concerned with doing exactly this in MSN. I'm unsure if you can go as far as adding a message, but at least being able to load the window addressing that X username, or adding the username to your messenger contacts list would be phenomenal.
Help is much appreciated.