--nextPart1760213.LhHTNVu6d8
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit
hi im still playing with js and the webserver
im still write the search for messajes
i use three steps
1)search.ssjs (main page, it have one form with a select control for the areas and text control for user input)
2)search_result.ssjs (it show brief from the messages founds)
3)showmsg.ssjs (it show the select message)
i make a "search" directory on /sbbs/web/html
and /sbbs/web/templates/default/ too
the templates are same name with .inc extension. (templates seems to work for me)
step 1 and stem 2 work fine, in step 2 y make a url "showmsg.ssjs?sub=sub_name&id=numbre_of_message" (you can see it in action http://bbs.docksud.com.ar:8088/search/search.ssjs)
in step 3 im get the id of message from a http get var and save it in var called idx
but if i use this var on msg_get_header, it fails (line 43)
(i test with more pass from more variables (template.msgid)but the issue is same)
hdr = msgbase2.get_msg_header(true,idx);
if i print idx it contain the number correctly.
if i force the value to var idx to some value its work.
The ID of a message is a string.idx are from hdr.number (hdr = msgbase.get_msg_header())
"idx" usually refers to the message's index record (an object).
You're calling get_msg_header() with "by_offset" set to "true" and passingi want to pass a message number (is hdr.number correct?)
either an index record or a string (I can't tell). Either way, it's incorrect.its true, the idx is a number.
if i print idx it contain the number correctly.
If idx is a number, then it's not the message ID.
if i force the value to var idx to some value its work.
What's "idx" stand for?
digital man
Snapple "Real Fact" #49:
Despite its hump...camel's have a straight spine.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
ok seems to found the mistake here
i was think that the message id is a number.
The ID of a message is a string.idx are from hdr.number (hdr = msgbase.get_msg_header())
"idx" usually refers to the message's index record (an object).
You're calling get_msg_header() with "by_offset" set to "true" andi want to pass a message number (is hdr.number correct?)
passing
i want to identify the message in my 2d stage to pass to the 3th stage
i want to search by the number (i think)
either an index record or a string (I can't tell). Either way, it'sits true, the idx is a number.
incorrect.
if i print idx it contain the number correctly.
If idx is a number, then it's not the message ID.
if i force the value to var idx to some value its work.
ok seems to found the mistake here
i was think that the message id is a number.
The ID of a message is a string.idx are from hdr.number (hdr = msgbase.get_msg_header())
"idx" usually refers to the message's index record (an object).
You're calling get_msg_header() with "by_offset" set to "true" and passingi want to pass a message number (is hdr.number correct?)
i want to identify the message in my 2d stage to pass to the 3th stage
i want to search by the number (i think)
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 578 |
Nodes: | 8 (0 / 8) |
Uptime: | 28:57:28 |
Calls: | 10,736 |
Calls today: | 1 |
Files: | 5 |
Messages: | 443,184 |
Posted today: | 1 |