Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE fine - NS no - why this IM script does nothing in NS?

Status
Not open for further replies.

easonc52

Technical User
Apr 21, 2001
14
US
Thanks in advance :)

The following script opens an AIM (aol instant messenger) window with the screename and message populated from variables (same as a MAILTO script).

It works fine in IE5.5, but does nothing (not even give error) in NS4.76 (which is used at work where I want to implement).

Can anyone see what the problem might be?

Code:
<html>
<title>Some Title</title>
<head>

<script language=&quot;JavaScript&quot;>
<!-- hide me

function popupMessage() {
  // SET MESSAGE VALUES
  var goim = &quot;goim&quot;
  var screenname = &quot;easonc52&quot;;
  var message = 
&quot;from%20[Chuck%20-%20ext/55502%20-%20dsk/246]%20%20&quot;;

  // BUILD AIM MESSAGE COMPONENTS 
  var doc = &quot;aim:&quot; + goim + 
  &quot;?screenname=&quot; + screenname + 
  &quot;&message=&quot; + escape(message); 

  // POP UP AIM MESSAGE WINDOW
  window.location = doc;
}
// show me -->
</script>
</head>

<body>

<FORM> 
<INPUT TYPE=&quot;button&quot; NAME=&quot;Test&quot; Value=&quot;Test AIMto: URL&quot; onClick=&quot;popupMessage()&quot;> 
</FORM>
</body>
</html>

Thanks again,

Chuck &quot;Uh, honey, a P5 with a 20&quot; monitor is perfect for email&quot;
 
-> try using the javascript console : does it tell you anything (to use it, just type &quot;javascript:&quot; in the url bar) ?
-> the error can't come from the string building part, so it has to come from &quot;window.location=doc;&quot;
--> try window.location=&quot;somepage.htm&quot; - does it work as you wish ?
* if yes, try to alert(doc) to see if it's the correct adress
* if no, then try document.location or this.location or location.href ... any combination of those ...

let me know !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top