| | |
Using Client(JS) to get Server(VBS) value.
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I have an ASP page that uses VB to make the url that would be used on a page. I also have a Javascript function that when activated would change a form around. Now what I want to do is using JS when an image is clicked to get the url that the VB made to a JS function. My problem is that the url is saved through the use of a variable(url2), Im having problems passing that variable into the JS function. If any one knows how to do this it would be greatly apreciated.
•
•
Join Date: May 2007
Posts: 20
Reputation:
Solved Threads: 2
you try to understand below code, it maybe can help u.
<html>
<head>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2)
end sub
%>
<script language="javascript" runat="server">
function jsproc(num1,num2)
{
Response.Write(num1*num2)
}
</script>
</head>
<body>
<p>Result (call vbscript function): <%call vbproc(3,4)%></p>
<p>Result (call javscript function): <%call jsproc(3,4)%></p>
</body>
</html>
<html>
<head>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2)
end sub
%>
<script language="javascript" runat="server">
function jsproc(num1,num2)
{
Response.Write(num1*num2)
}
</script>
</head>
<body>
<p>Result (call vbscript function): <%call vbproc(3,4)%></p>
<p>Result (call javscript function): <%call jsproc(3,4)%></p>
</body>
</html>
![]() |
Similar Threads
- "Cannot find server or DNS Error" (Viruses, Spyware and other Nasties)
- "Cannot find server or DNS Error" (Viruses, Spyware and other Nasties)
- "Cannot find server or DNS Error" (Web Browsers)
- I could kill for help with prosearching (Viruses, Spyware and other Nasties)
- Help! C:\WINNT\system32\bridge.dll error message (Viruses, Spyware and other Nasties)
- The worm may be gone but ?? (Viruses, Spyware and other Nasties)
- IE hijacked (Viruses, Spyware and other Nasties)
- xp - svchost using 100% - steps to diagnose problem? (Windows NT / 2000 / XP)
Other Threads in the ASP Forum
- Previous Thread: why isn't this booking form working.
- Next Thread: what exactly is a webhosting company?
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit web webserver windows7





