I'm writing an .js with the aim of exporting mesage areas to a PHP forum based.
On my .js I have:
var msg_header = msgbase.get_msg_header(6); console.print("\r\n\1n"+msg_header);
Instead of the header of the message 6, what I get on the screen is:
[object MsgHeader]
Please, could somebody point me to the right direction? What I'm doing wrong? Thanks a lot.
Re: msgbase.get_msg_header
By: datavase to All on Fri Mar 26 2010 09:50 am
I'm writing an .js with the aim of exporting mesage areas to a PHP forum based.
On my .js I have:
var msg_header = msgbase.get_msg_header(6); console.print("\r\n\1n"+msg_header);
Instead of the header of the message 6, what I get on the screen is: [object MsgHeader]
Please, could somebody point me to the right direction? What I'm doing wrong? Thanks a lot.
msg_header is an object. To view the properties of an object, you need to reference them (like msg_header.from). See http://synchro.net/docs/jsobjs.html#MsgBase_methods save_msg() method for a complete list of header fields (properties). You can also enumerate through the properties and display them all using code such as:
for (p in msg_header)
print(p +'='+ msg_header[p]);
And see the examples .js files in your exec dir.
digital man
Snapple "Real Fact" #148:
The tallest man was 8 ft. 11 in.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
Sysop: | Ree |
---|---|
Location: | Toronto, ON |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 01:27:37 |
Calls: | 369 |
Files: | 2 |
Messages: | 38,903 |