From: Rob Christiansen on 30 Apr 2010 11:09 Seriously, have you even tried searching for this? <-- You bet I do. I work at this 9-10 hrs a day. OK, now I can pass variables between scripts (<input type=hidden . . . and request.queryString, etc) but how about arrays - hundreds of subsets? I've tried catting all the subs into a string and then passing the string (and then var RecordsToPrint = String( Request.QueryString("string" ) ); and RecordsArray = RecordsToPrint.split(" " ); ). It works, but not when I use xxxx.redirect(); crazyswede *** Sent via Developersdex http://www.developersdex.com ***
From: Evertjan. on 30 Apr 2010 13:00 Rob Christiansen wrote on 30 apr 2010 in comp.lang.javascript: > Seriously, have you even tried searching for this? Non of your business! This is about Javascript here, not about what we do with our time. Probably most of us know tha answer already, but your exact Q is another matter. most of us stop and think, then try and debug the logical outcome of the thought-process. Building javscript scripts form seaching the scripts of others seems a nice shortcut, but as you lacked the thought and debugging cyclus you ware boud to get into trouble later, when you are using lines you do not realy understand. <-- You bet I do. I No, we are not that interested in what you do. and betting is not a subject of this NG. > work at this 9-10 hrs a day. OK, now I can pass variables between > scripts > (<input type=hidden . . . and request.queryString, etc) That is not between scripts, Javascript-scripts I presume you mean, but between html-pages. Lots of info can be passed that way, but there is a limit to the form-get/querystring(), that is absent in the form-post/form() method. I suggest you use the latter. You are not confined to a real input-hidden method, you could also use a virtual dom-form directly with clientside Javascript. [virtual in the sense that the form is not appended to the dom-tree] This was discussed recently in this NG: var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", destinationUrl ); // form.setAttribute("target", "resultTarget"); var hiddenField = document.createElement("input"); hiddenField.setAttribute("name", "t"); hiddenField.setAttribute("value", allTheInfoAsPuppetsOnAString ); form.appendChild(hiddenField); form.submit(); > but how about arrays - hundreds of subsets? Does the amout matter? an array is just a number of variables. > I've tried catting I prefer dogging, and debugging ofcourse. > all the subs into a What subs, subroutines, perchance? > string Ah, do you mean members of an array into a concatenated string, as we told you? but that was for conversion between vbs and js, I seem to remember. > and then passing the string (and then > var RecordsToPrint = String( Request.QueryString("string" ) ); This is stange. Why this capitation and why converting a string into a string? > and > RecordsArray = RecordsToPrint.split(" " ); ). error, second ")". > It works, It cannot, gave an error. but not when I use xxxx.redirect(); Yes? What would you like to have worked? Read up on "does not work" crazyness. ================================ I do send lots of information tot the server where the allTheInfoAsPuppetsOnAString even could be a whole html-page to be parsed on the server. If you define the "target" as another window, a page's javascript could also send these form-data repeatedly, say a 1000 times, without interruption, given a reasonable time-out and error-recovery where data is missing. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
|
Pages: 1 Prev: Komodo Edit: Editor settings? Next: Emulating the <Tab> Key operation ? |