Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


<%@LANGUAGE="VBSCRIPT"%> or <SCRIPT LANGUAGE="VBSCRIPT">

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> <%@LANGUAGE="VBSCRIPT"%> or <SCRIPT LANGUAGE="VBSCRIPT">
  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 >>
 <%@LANGUAGE="VBSCRIPT"%> or <SCRIPT... - 4/7/2006 9:16:42 PM   
  Pfishy

 

Posts: 4
Score: 0
Joined: 4/5/2006
From: Netherlands
Status: offline
I''m using Dreamweaver with ASP VBscript and ran into the following problem;

Dreamweaver puts <%@LANGUAGE="VBSCRIPT"%> in the header of each .asp file, when using vbscript in this file you type <% vbscript function %>

When I tried to use the function Msbox I got an errormessage, when Googlen for a solution I found that

<SCRIPT LANGUAGE="VBSCRIPT">
Msbox (......)
</SCRIPT>

works fine, problem is that other function that I used are only working with the <%...%> solution.

QUESTION

What is the difference between <%@LANGUAGE="VBSCRIPT"%> as first line and scripting between <%..%> and <SCRIPT LANGUAGE="VBSCRIPT"> ???

 
 
Post #: 1
 
 RE: <%@LANGUAGE="VBSCRIPT"%> or <SC... - 4/8/2006 8:48:11 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
To me it lookes like: server-side-processing vs client-side-processing

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to Pfishy)
 
 
Post #: 2
 
 RE: <%@LANGUAGE="VBSCRIPT"%> or <SCR... - 4/8/2006 10:03:25 PM   
  Pfishy

 

Posts: 4
Score: 0
Joined: 4/5/2006
From: Netherlands
Status: offline
Client vs Server, that might be te reason, thanks!

Now I need a solution ....

When processing requests to and from the database (server) i want to show a clear message like a msgbox(cllient), depending on the choice that was made (yes/no) and want to process some more data (server)

It's is no problem to use the client site stuff on a page, it seem however not possible to user server site stuff within the client or use variabeles in server stuff that where defined in the client stuff....
(does this make any sense??, I'm afraid not...)

Maybe I can show what I mean below

What i mean is...

THIS WORKS OKE

<%@LANGUAGE="VBSCRIPT"%>
html stuff
<% vbscript server stuff %>
<SCRIPT LANGUAGE="VBSCRIPT">
     vbscript client stuff
</SCRIPT>
more html stuff

THIS DOES NOT WORK

<%@LANGUAGE="VBSCRIPT"%>
html stuff
<% vbscript server stuff %>
<SCRIPT LANGUAGE="VBSCRIPT">
     vbscript client stuff
       <% vbscript server stuff %>
</SCRIPT>
more html stuff

AND THIS ALSO DOES NOT WORK

<%@LANGUAGE="VBSCRIPT"%>
html stuff
<% vbscript server stuff %>
<SCRIPT LANGUAGE="VBSCRIPT">
     vbscript client stuff setting a variabele ABC
</SCRIPT>
<% vbscript server stuff using variabele ABC%>
more html stuff

So again HELP

(in reply to Snipah)
 
 
Post #: 3
 
 RE: <%@LANGUAGE="VBSCRIPT"%> or <SCR... - 4/9/2006 8:10:02 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
WHAT TO DO:

1) Make several 'in between' pages or

2) use the new technology: AJAX (learn it at: http://www.w3schools.com/ajax/default.asp)


HOW IT WORKS:

1) client gives preferences, then loads new page with the preferences parsed by the server together with the server stuff

2) client gives preferences, AJAX communicates immediatly with the server and (still on the same page) refreshes with the server stuff aswell.

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to Pfishy)
 
 
Post #: 4
 
 RE: <%@LANGUAGE="VBSCRIPT"%> or <SC... - 4/12/2006 8:31:43 PM   
  L12

 

Posts: 22
Score: 0
Joined: 1/19/2006
Status: offline
I tend to use JavaScript for client side and VBScript for server side operations. You can pass server side variables to your client side script by writing them out to your form and then your JavaScript code can pick them up. For example I have a list with an onchange event:

onchange=""changestuff('" & javavar & "')

javavar is a variable whose value is determined by the server side stuff. In my JavaScript function it picks this up as an argument:

function changestuff(item) {
}

I'm pretty sure you could use the same technique if you were using VBScript as your client side language as well. It's not exactly elegant but it works well enough. Failing that, having a look at AJAX may be a good idea and I think I'll probably read up on it myself.

(in reply to Pfishy)
 
 
Post #: 5
 
 RE: <%@LANGUAGE="VBSCRIPT"%> or <SC... - 4/13/2006 5:49:41 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
quote:


onchange=""changestuff('" & javavar & "')
javavar is a variable whose value is determined by the server side stuff


Unfortunatly his scenario is:

1) usr fills out form
2) server processes it (so, onchange will never work, since the data must be processd first)
3) the VB-/Javascript must process the serverside processed items...

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to L12)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> <%@LANGUAGE="VBSCRIPT"%> or <SCRIPT LANGUAGE="VBSCRIPT"> 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