Subj : template/javascript vars To : Ragnarok From : Digital Man Date : Mon Nov 28 2005 05:36 pm Re: template/javascript vars By: Ragnarok to DOVE-Net.Sync_JavaScript on Mon Nov 28 2005 07:14 pm > --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); The ID of a message is a string. "idx" usually refers to the message's index record (an object). You're calling get_msg_header() with "by_offset" set to "true" and passing either an index record or a string (I can't tell). Either way, it's 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. What's "idx" stand for? digital man Snapple "Real Fact" #49: Despite its hump...camel's have a straight spine. .