Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7991689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:21:51+00:00 2026-06-04T13:21:51+00:00

In my jsp on readyfunction i am setting value for some variables $(document).ready(function() {

  • 0

In my jsp on readyfunction i am setting value for some variables

$(document).ready(function() {
........////some code.......
var compCode=$('#companyCode').val();
........////some code.......
$("#countrySectorinMemInfo").val(countrySec);   
........////some code.......
});

my controller is returning one value say ABC and i am accessing this value using ,

<input type="hidden" value="${ABC}" id="companyCode">

suppose , if my jsp has more than two fields having same id as “countrySectorinMemInfo”

then how ” $(“#countrySectorinMemInfo”).val(countrySec);” will work……

can anybody explain me …???

both vaues will get set or only last value will be set …?????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:21:54+00:00Added an answer on June 4, 2026 at 1:21 pm

    Multiple elements with the same ID is illegal in HTML. The browser behaviour is unspecified. Give them a different ID. If you need a common selector, use name or class instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jQuery(document).ready(function(){ $(#button).submit(function() { { var email_id=document.getElementById('textfield').value; var password=document.getElementById('textfield2').value; var utype=document.getElementById(utype).value; var url=login_check.jsp?&email_id=+encodeURIComponent(email_id)+&password=+encodeURIComponent(password)+&utype=+encodeURIComponent(utype); $('form').get(0).setAttribute('action',url); alert(document.form1.action);
This is my Jquery script $(document).ready(function() { $('#form').submit(function() { var number = $('#number').val(); $.ajax({
Here is the script: var currentCat = all; $(document).ready(function(){ $(.categoryItem).click(function(event){ $(#browseBookArea).fadeToggle(100); currentCat = $(this).attr(id);
In JSP, I want to compare two variables If I do: <c:set var=pagerTotDisp value=9/>
My jsp file contains the following code: <portlet:actionURL var=patientProfileURL name=editPatientProfile> <portlet:param name=jspPage value=/patientProfile.jsp />
My HTML looks like this: <script type=text/javascript src=jquery-1.4.2.js></script> <script type=text/javascript> $(document).ready(function(){ $(#btn).click(function(){ $.post(test.jsp, {
JSP CODE: Upload File: <input name=file type=file id=file><br><br> <input type=submit name=Submit value=Submit/><br><br> <input type=reset
I have in simulation.jsp the following code, by which I receive some simulation data
Begining with JSP and servlet development, I have some problems with a bodyless custom
I have this JSP code snippet: <%@ taglib uri=http://java.sun.com/jsp/jstl/core prefix=c%> <c:choose> <c:when test=${var1.properties[\Item Type\]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.