Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


2D scan problem 300 times VBcode?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,37483
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 2D scan problem 300 times VBcode?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 2D scan problem 300 times VBcode? - 9/3/2006 5:36:57 PM   
  master55

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
Hi,

I've created a functionality which give me the required functioncality. (hehee :)
Function is that if i scan a 2D barcode all the dividers are replaced by the | sign.
Now this works like a charm, but what i want is that this is for all the textfields which start with 'bar'.

The following code will do this for 1 textfield:
-----------------------------------------------------------------------------

Sub bar1_onkeydown() ' the 2d case
   Dim kd
   kd= window.event.keyCode
   If flg Then
       flg = False
       Select Case kd
       Case &h44
       Case &h36, &hDD
           window.document.all("bar1").value = window.document.all("bar1").value & "|"
       End select
       window.event.returnValue = False
   End if
   If kd = &h11 Then
       window.event.returnValue = False
       flg = True
   End If
End Sub
---------------------------------------------------

Now to create 300 times the same code with only change is (change bar1 to, bar2, bar3, bar4, etc)
will ofcourse cause alot of slow websites....

Does anyone know how to do this?
I am not into VBscript only PHP and ASP... 

kind regards,
john



 
 
Post #: 1
 
 RE: 2D scan problem 300 times VBcode? - 9/4/2006 11:38:35 PM   
  ebgreen


Posts: 4969
Score: 31
Joined: 7/12/2005
Status: offline
You have 300 text fields on your page? I'd say that your problem is with the page design than anything else. Is the page static HTML, or is it being generated on dynamically?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to master55)
 
 
Post #: 2
 
 RE: 2D scan problem 300 times VBcode? - 9/5/2006 4:53:03 PM   
  master55

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
Hi ebgreen,

Yes it could happen that i need 300 textboxes. The site is completely PHP scripting and generated
witch includes, insert other codes etc.


What we do is scan in all labels, and they need to be all on 1 page and all into a seperate textbox.
The page functions like it should be but when we scan in the 2D barcode we don't get the seperators visible.
Therefor the vbscript will do the trick, which we need.


I am trying to loop this piece of code, but since i only am experiences with
php, <?php ?> into vbscript will not work.

I also tried to do this in a vbscript loop, but nevertheless, i don't know how vbscript works.


rgsd,
John

< Message edited by master55 -- 9/5/2006 10:14:37 PM >

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: 2D scan problem 300 times VBcode? - 9/6/2006 1:06:40 AM   
  ebgreen


Posts: 4969
Score: 31
Joined: 7/12/2005
Status: offline
I would really need to see an example of the HTML for the page to provide really meaningful assistance, but there are a couple of ideas that come to mind. The first would be to have a single handler for all fields. Then the onkeydown event for the specific field could call the handler passing it the name of the field. The second would be a function that iterates all of the fields making whatever chages are needed.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to master55)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 2D scan problem 300 times VBcode? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts