Link to home
Start Free TrialLog in
Avatar of swordfishsoup
swordfishsoup

asked on

How to insert asp vb recordset binding into javascript alert message?

Hi

I've made an alert that pops up when the quantity of a product in a shopping cart is more then the items in stock. I want to include dynamic text from the cart from that shows the quantity available. I've no idea how to do this, any suggestions? I think it must be some kind of set ID of the form field and then insert inner html in the javascript(I'm wondering if I've jst answered myown question here...?)
the javascript section that is in the page as part of an IF satement is:

<script language="javascript" type="text/javascript">
      alert("Sorry we only have (dynamic should go here) of those, please adjust the quantity required or add the item to your wish list for next time");
      </script>

The element from the form is:

<input name="frmstocklevel" type="hidden" value="<%=WA_eCart_DisplayInfo(magecart, "StockLevel")%>" />

Thanks

Dave
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swordfishsoup
swordfishsoup

ASKER

Your a star.

Thank you. Didn't assume languages would ever be that compatible.

Have a good one

Dave