• template/javascript vars

    From Ragnarok@VERT/DOCKSUD to DOVE-Net.Sync_JavaScript on Mon Nov 28 19:14:00 2005
    --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 server log do not say any error messagesãi think that is a runtime problemããsorry my long explanation, it difficult for my write this behavior inãenglish =)ã ãim attach a zip file that contain the 3 files ssjsã--nextPart1760213.LhHTNVu6d8ãContent-Type: application/x-zip; name="files.zip"ãContent-Transfer-Encoding: base64ãContent-Disposition: attachment; filename="files.zip"ããUEsDBBQAAAAIAE6WfDNT8pq6zwIAAG4HAAASABUAc2VhcmNoX3Jlc3VsdC5zc2pzVVQJAAOje4tDãq3uLQ1V4BAAAAAAAjVVNb9swDD3Xv4I1CsRpUzv7OmUp0AE77LB12I7FECg2HauTrUxS1gZr//tIãS3aTtC6ag2LR75GPH5KzUzj5UpzAaRZFSosiidM0u8VlpuQyc1ivlXCYWntj4/EsinqLk07hHOzWãkiltRI1wBjGcw08UJq/gB9qNcjbe5aAx2sAcRqNZVInt57AthbI4i2QJSeXcemHwzwatS2k12+uRã3SxHv2A+h01TYCkbLMb/IqDfE7+xfyB/TkAu6rU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3Nqc1VUBQADp3mLQ1V4AABQSwECFwMUAAAAãCAARl3wzqwySfjwCAADyBQAADAANAAAAAAABAAAApIFBBAAAc2hvd21zZy5zc2pzVVQFAAMSfYtDãVXgAAFBLBQYAAAAAAwADANoAAAC8BgAAAAA=ã--nextPart1760213.LhHTNVu6d8--ãã---ã þ Synchronet þ Dock Sud BBS TLD 24 HS - www.docksud.com.arã
  • From Digital Man@VERT to Ragnarok on Mon Nov 28 17:36:58 2005
    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.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ragnarok@VERT/DOCKSUD to Digital Man on Tue Nov 29 02:47:00 2005
    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" usually refers to the message's index record (an object).ãidx are from hdr.number (hdr = msgbase.get_msg_header())ãã> You're calling get_msg_header() with "by_offset" set to "true" and passingãi 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)ãã> 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.ãits true, the idx is a number.ã> ã> > 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ãã---ã þ Synchronet þ Dock Sud BBS TLD 24 HS - www.docksud.com.arã
  • From Ragnarok@VERT/DOCKSUD to Ragnarok on Tue Nov 29 03:32:00 2005
    Ragnarok wrote:ãã> 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" usually refers to the message's index record (an object).ã> idx are from hdr.number (hdr = msgbase.get_msg_header())ã> ã>> You're calling get_msg_header() with "by_offset" set to "true" andã>> passingã> i 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)ã> ã>> 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.ã> its true, the idx is a number.ã>> ã>> > if i force the value to var idx to some value its work.ã>> ããyeah all of mi nightmare was a bad cast from string to intenger i useãparseInt() and all work fine.ãi go to sleep now =)ãtnx dm!ãã---ã þ Synchronet þ Dock Sud BBS TLD 24 HS - www.docksud.com.arã
  • From Digital Man@VERT to Ragnarok on Tue Nov 29 13:12:55 2005
    Re: Re: template/javascript vã By: Ragnarok to Digital Man on Tue Nov 29 2005 02:47 amãã > 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" usually refers to the message's index record (an object).ã > idx are from hdr.number (hdr = msgbase.get_msg_header())ã > ã > > You're calling get_msg_header() with "by_offset" set to "true" and passingã > i 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)ããYes, hdr.number is the message number (not its offset).ãã digital manããSnapple "Real Fact" #97:ãA turkey can run at 20mph.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã