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 9156491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:47:17+00:00 2026-06-17T12:47:17+00:00

i am trying to educate mysely with jQuery by converting some old javascript code

  • 0

i am trying to educate mysely with jQuery by converting some old javascript code into the jQuery syntax but i seam to have hit a stumbling block, i am not very experienced with this language so please be easy on me…..lol.

I am trying to convert this to jQuery:

function getData (id) {
    document.form1.numID.value = id;
    document.form1.submit();
}

The id is passed by a javascript onClick event, this is then added to a hidden field and submitted with the form. The problem i am having is that when i bind jQuery to the click event for the div that was clicked i only ever get the first item in the repeat region to work, the rest do nothing, i have included the jquery i have gathered so far, i am assuming its because the divs are all named the same within the repeat region?;

$('#Editor').click(function () {
    var id = $('#this').attr('value');
    alert('You Clicked Edit Job '+id+'..!!');
});

I have just echoed this to an alert whilst i figure how to do this, the rest i can do just cannot seam to figure this out even after googling. Once i figure this i am then going to convert the old asp app into an ajax event.

<div id="Editor" value="123">Some database info displayed on the page</div>
<div id="Editor" value="456">Some more data info displayed on the page</div>
<div id="Editor" value="789">Even more info displayed from the database</div>

I have edited all the data out from the database, these divs are created based on the number of records returned from the database, i want to pass the “value” to another page where the id is used to get the item clicked. Hope this explains my dilemma a bit clearer.

  • 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-17T12:47:18+00:00Added an answer on June 17, 2026 at 12:47 pm

    id should be uniq! and using value attribute in DIV it’s not standard..

    <div id="Editor">
        <div class="field" id="123">Some database info displayed on the page</div>
        <div class="field" id="456">Some more data info displayed on the page</div>
        <div class="field" id="789">Even more info displayed from the database</div>
    </div>
    
    
    
     $('#Editor').click(function (e) {
            var id = $(e.target).attr('id');
            alert('You Clicked Edit Job '+id+'..!!');
        });
    

    http://api.jquery.com/category/events/event-object/

    demo: http://jsfiddle.net/mnsJT/2/

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

Sidebar

Related Questions

I am trying to educate some people in the use of real unit tests
I am trying to write some vba code in Excel to query a table
I am a newbie for WCF, so please educate me. I am trying to
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
trying to figure out why this is happening - I have an input text
trying out upgrading antlr4, I have 2 lines in the grammar that produce the
I am trying to get corpus for a certain language. But when I get
Trying to connect to a SQL Server 2005 instance remotely but getting the following
Trying to find the links on a page. my regex is: /<a\s[^>]*href=(\\'??)([^\\' >]*?)[^>]*>(.*)<\/a>/ but
Trying to install roundcube webmail - had some issues related to driver configuration -

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.