how do you have a default value of a hidden input based on a url?


I have a function that works great, but I need to add the ability of making a hidden input have a value of "6">

The name of the id of the input is" recipientId"  and here is the function.

Thanks for the help!

$(document).ready(function() { 

$('.show').click(function () {
    $('#div' + $(this).attr('target')).show();

$('.hide').click(function () {

Open in new window

Would it be somewhere that "lhash="#div6" is?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

So just


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:

<input type="hidden" name="yourHTMLControlName" id="recipientId" value="6" />
smfmetro10Author Commented:
Thank You!!
  Out of curiosity why doesn't $("#recipientId") = "6" work?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

That's not how jquery works.
$("#recipientId") is an object, you have to specify what you want to change which in this case is the value
smfmetro10Author Commented:
Ah! Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.