Mr. Wilkenson - Lend me your logic

Results 1 to 3 of 3

Thread: Mr. Wilkenson - Lend me your logic

  1. #1
    Steve Adamo Guest

    Default Mr. Wilkenson - Lend me your logic

    *re-post out of dire neccesity*<BR>*this is a request for button / new browser / variables*<BR><BR>OK,.. a little clarification is called for,... I will try to break down the layout of my entire asp page below: <BR><BR>&#060;opening vbscript language setting&#062; <BR><BR>&#060;various vbscript sub routines, form gathering routines, etc.&#062; <BR><BR>&#060;vbscript mixed with html to generate different things, such as my button, which calls below&#062; <BR><BR>&#060;open html tag&#062; <BR>&#060;head tag&#062;<BR>&#060; routine&#062; <BR>&#060;head tag&#062;<BR>&#060;if then statements calling various sub routines from above, based on variables sent to the page, one of which generates the launch button, which will call the new browser instance&#062; <BR><BR>&#060;close html tag&#062; <BR><BR><BR>ok,.. this is obviously VERY generic, but i wanted to layout my basic design,.. <BR><BR>the problem comes when i try to send variables from the subroutine at the top of the page to the script inside my head tags,.. the script cant seem to recognize them,.. <BR><BR>please let me know if i should approach this from a completely different angle,... <BR><BR>just for additional emphasis, i need to have a button, that is generated with vbscript, that will spawn a new browser instance, and sends variables to that new instance,... <BR><BR>thanks amigo! <BR><BR>Steve

  2. #2
    Join Date
    Dec 1969

    Default Sure it's not just a language usage problem?

    Where do you *FIRST* declare the variables that you want to send "from the subroutine at the top of the page to the script inside my head tags"??<BR><BR>And *how* do you "send" those variables?<BR><BR>If you send them by making them the return values of functions, then I&#039d need to see your code.<BR><BR>But...<BR><BR>To *GUESS*: Do you perhaps *first* use these variables inside a SUB or FUNCTION? Are you aware that if the DECLARATION of a variable occurs inside a SUB or FUNCTION, then that variable is *LOCAL* to the SUB/FUNCTION and *disappears* (goes on the garbage pile, actually) when you leave the SUB/FUNCTION?<BR><BR>To solve this, simply DIM the variable(s) *outside* any SUB/FUNCTION. <BR><BR>In other words, if you are doing this:<BR><BR>&#060;%<BR>Sub mySub( )<BR>&nbsp; &nbsp; valueForButton = 17<BR>&nbsp; &nbsp; ...<BR>End Sub<BR>%&#062;<BR><BR>Then the variable "valueForButton" can NOT be seen later.<BR><BR>But simply do this:<BR><BR>&#060;%<BR>Dim valueForButton<BR><BR>Sub mySub( )<BR>&nbsp; &nbsp; valueForButton = 17<BR>&nbsp; &nbsp; ...<BR>End Sub<BR>%&#062;<BR><BR>and it can be.<BR><BR>Is *that* the problem???<BR><BR>As to creating a new browser instance: That&#039s just a, right? And to send "variables", you could simply use a URL name that includes a querystring with the variable values. (*OR*, from the spawned window, you could look back into the original window to get the values.)<BR><BR>All this is, in my opinion, much easier done with JavaScript (VBScript has some strange and arcane rules). And of course VBS won&#039t work in any browser but MSIE. But that&#039s all your choice(s).<BR><BR>

  3. #3
    Steve Adamo Guest

    Default RE: Sure it's not just a language usage proble

    Thanks amigo,..<BR><BR>I need to get some rest,.. i would love to take this up with you tomorrow after i try a few new things,..<BR><BR>since i always see you around here, i&#039ll drop a line tomorrow afternoon if i am still stumped,..<BR><BR>as always, thanks for your help!<BR><BR>Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts