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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:59:38+00:00 2026-06-07T17:59:38+00:00

Here is the structure of my code: <div class=’img_box’ title=’icon’> <div> <a href=’#lightbox_add’ rel=’prettyPhoto[g1]’>

  • 0

Here is the structure of my code:

<div class='img_box' title='icon'>
  <div>
    <a href='#lightbox_add' rel='prettyPhoto[g1]'>
      <img alt='' src='images/img_plus_green.png' title=''/>
      <span class='description'>
        <span class='title'>Click to Answer</span>
      </span>
    </a>
    <div id='lightbox_add' class="hide">
        <div class='lightbox_add_cand'>
            <h4>Add a new answer</h4>
            <div class='block_answer'>
                <div class='line'>
                </div>
                <br/>
                <form action='/add/1' id='add_cand_form' method='post'>
                    <div class='input_box'>
                        <input class='s_inp_text' id='cand_title' name='cand_title' title='Write a title...' type='text'/>
                    </div>
                    <div class='input_box'>
                        <input class='s_inp_text' id='pic_url' name='pic_url' title='URL of picture...' type='text'/>
                    </div>
                    <a class='button_big dark_red' href='' id='add_cand_button'>
                      <span class='left'>
                        <span class='right'>
                          Save
                                               </span>
                      </span>
                    </a>
                </form>
            </div>
        </div>
    </div>
</div>

The <a href=”#lightbox_add”> element fires up a PrettyPhoto lightbox when clicked and loads in the html defined by <div id=”lightbox_add”>. Inside the lightbox, there is a form. My issue is with reading the value of a form element via javascript:

$("#add_cand_button").live('click', function() {
  alert( $("#cand_title").val());              //shows an empty alert box
  alert( $("#pp_full_res #cand_title").val());  //shows an alert box that says "undefined"
});

I know that $(“#pp_full_res #cand_title”).val(); should be the right approach, but it doesn’t work.
Another thing to note: When I search the DOM for #cand_title it does not find anything.

Anybody know the right way to access the value of an input element inside prettyphoto?

  • 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-07T17:59:39+00:00Added an answer on June 7, 2026 at 5:59 pm

    There is no element named pp_ful_res thats that why its returning’undefined’

    Here is your code in jsfiddler
    http://jsfiddle.net/screepts/DpeTr/

    Your alert( $("#cand_title").val()); returns the value fine.

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

Sidebar

Related Questions

Here's some code I've got in my sandbox.php file: <div class=jq> <img class=active id=also
I have a HTML structure like this:- <article id=a_post class=a_post> <div id=thumbnail> <img id=shine
Here's HTML <div id=taxonomylist> <div class=item-list><ul><li class=first><a href=/?q=category/activity/energy class=views-processed>Energy</a></li> <li><a href=/?q=category/activity/energy/3-5 class=views-processed>3-5</a></li> <li><a href=/?q=category/activity/energy/6-8
I have a HTML structure like: <div class=container> <div id=bg> <img src=#/> <div id=screen>
I have this structure <p>Integer ac porta felis. <a href=# class=despLeerMas>...read more</a></p> <div class=none
I have the HTML structure as follows: <div class=boxes workshops wrapl> <a href=# id=showw1
I' having a problem allocating a structure in a function. Here is the code(I'm
I need to read certain statistics from iw_statistics structure, here's the code: struct net_device
For example I have a file name call A.java. Here its structure: public class
I have the following HTML structure: <ul class=cat_select> <li class=main_type_check> <div class=ez-checkbox> <input id=web

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.