Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling vbscript function in ASP - fairly simple - please help

Status
Not open for further replies.

Technos

Programmer
Mar 15, 2002
47
US
Hi All,

I have a vbscript function which is returing value of combobox selection like this.

function GetStrProduct
dim strProduct
strProduct = document.all("cboProduct").value
GetStrProduct = strProduct
end function

now how can I retrieve this value in my ASP

I'm doing this

<div>
<%
dim product
product = GetStrProduct
Response.write(product)
%>
</div>

and its returning blank. Please help. I'm badly stuck.

Wondering how is it possible???

Thanks.
 
If your VBScript Function is on the client side, then you CAN NOT access it from ASP. ASP is processed on the server side.

If you want to access your cboProduct Value then you'll have pass that along with your url to the asp page.

&quot;YourASPpage.asp?ProductValue=&quot; & document.getElementById(&quot;cboProduct).options(document.getElementById(&quot;cboProduct).selectedIndex).value

then on ASP side:

dim ProductV

ProductV=request(&quot;ProductValue&quot;) &quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
My FAQ might help...faq333-3228 ________________________________________________________________________
Are you trying to debug your ASP applications? See faq333-3255 for more details

regards,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top