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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embed constant in a input var syntax

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
Hi

Have some jscript i'm trying to tweak but I'm not succeeding. Pbly because I rarely use it
I have a var declare

var btype = $("input[name=btype]:checked").val();

I also have an input field that's passed in on a submit button

<input type="radio" name="btype" id="code39" value="code39" checked="checked">

I want to just embed the "code39" and that it's checked in the statement "var btype = $("input[name=btype]:checked").val();"
Not having any luck.

I've tried
var btype = $("input[name=code39]:checked").val();
var btype = $("code39:checked").val();
and a variety of others without success.

Any help would be appreciated
 
Have it working now. There was a rendering function further down the script that was casing my issue. All is well now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top