SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy JS, split parameteras

    halo there..need some help on the javascript..i m using asp with javascript,i have a radio button..when onclick, i pass two parameters to the javascript function:
    Code:
    <input type="radio" name="custtype" value="" onclick="return chkValue('<%=rsSearch("customerMasterID") %>,<%=rsSearch("customertype") %>')"/><%=rsSearch("customerMasterID") %>

    then inside my Js function, i wan to assign that 2 parameters to 2 hidden field in my form..
    <input type="hidden" name="hiddcustid">
    <input type="hidden" name="hiddcusttype">

    how can i write in the JS fucntion? how can i split that two parameters into the two hiddent field?

    how can i do it?plz help..thank you

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In your function, use getElementsByTagName to get a reference to each of your two hidden inputs. Then use setAttribute to set the value attribute for each.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi there...i have solve it..i have did some careless mistake!..thanx for help and response..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •