Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


cannot use parenthesis when calling a sub?

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> cannot use parenthesis when calling a sub?
  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 >>
 cannot use parenthesis when calling a sub? - 11/7/2008 10:00:09 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline

      


"[<span class=""clsPgNo"" onClick=""loadPhotos('" & nIdx & "','" & nGrpLimit & "')"">" & nIdx & "</span>]"
loadPhotos(Arg1,Arg2)

The code works fine when I eliminate these above parts and change Arg2 to 10 in bellow parts...

If I < (Arg1 - 1) * Arg2 Then
Elseif I < (Arg1 * Arg2) Then
Window.document.getElementById("idPhotoDump").innerHTML = window.document.getElementById("idPhotoDump").innerHTML &_
"<img src=""" & objFile.Path & """ /><br/>"
Elseif I = (Arg1 * Arg2) Then Exit For

I know the problem, just dont know how to solve it.
 
 
Post #: 1
 
 RE: cannot use parenthesis when calling a sub? - 11/7/2008 10:08:55 AM   
  dm_4ever


Posts: 2728
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Did you try

"[<span class=""clsPgNo"" onClick=""loadPhotos '" & nIdx & "','" & nGrpLimit & "'"">" & nIdx & "</span>]"

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)
 
 
Post #: 2
 
 RE: cannot use parenthesis when calling a sub? - 11/7/2008 10:15:12 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
Ahhhhhhhhhhhhhh cannot use parenthesis......... soooooo........just take parenthesis away!

k it works now

(in reply to TKS)
 
 
Post #: 3
 
 RE: cannot use parenthesis when calling a sub? - 11/7/2008 10:16:41 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
haha we must have replied at the same time dm. i just tried it now. works supurbly.

(in reply to dm_4ever)
 
 
Post #: 4
 
 RE: cannot use parenthesis when calling a sub? - 11/7/2008 10:25:37 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Don't put code inside your tags. It can leads to memory leaks and it makes it harder to separate you logic from your design.

For example. instead of doing this:


      

consider doing this:


      

also, change this:

<script language="vbscript">

to this:

<script type="text/vbscript">

Put a doctype at the top of your page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and add a meta tag in the head:

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

More tips:

http://www.visualbasicscript.com/m_58515/tm.htm

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TKS)
 
 
Post #: 5
 
 RE: cannot use parenthesis when calling a sub? - 11/7/2008 11:32:24 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
^^^ bookmarked!!

(in reply to TNO)
 
 
Post #: 6
 
 
 
  

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 >> cannot use parenthesis when calling a sub? 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