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

  • Home
  • SEARCH
  • 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 7964787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:58:53+00:00 2026-06-04T05:58:53+00:00

Script: $(document).ready(function() { //Change these values to style your modal popup var align =

  • 0

Script:

$(document).ready(function() {
    //Change these values to style your modal popup
    var align = 'center';                               //Valid values; left, right, center
    var top = 100;                                          //Use an integer (in pixels)
    var width = 500;                                        //Use an integer (in pixels)
    var padding = 10;                                   //Use an integer (in pixels)
    var backgroundColor = '#FFFFFF';                        //Use any hex code
    var source = 'AttractionDetails.aspx?AttractionID=  **HOW_DO_I_GET_THE_VALUE_FROM_HIDDEN_FIELD** ';                                 //Refer to any page on your server, external pages are not valid e.g. http://www.google.co.uk
    var borderColor = '#333333';                            //Use any hex code
    var borderWeight = 4;                                   //Use an integer (in pixels)
    var borderRadius = 5;                                   //Use an integer (in pixels)
    var fadeOutTime = 300;                                  //Use any integer, 0 = no fade
    var disableColor = '#666666';                           //Use any hex code
    var disableOpacity = 40;                                //Valid range 0-100
    var loadingImage = 'lib/release-0.0.1/loading.gif';     //Use relative path from this page

    //This method initialises the modal popup
    $(".modal").click(function() {
        modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
    });

    //This method hides the popup when the escape key is pressed
    $(document).keyup(function(e) {
        if (e.keyCode == 27) {
            closePopup(fadeOutTime);
        }
    });

});

LISTVIEW:

<ItemTemplate>
                        <td id="Td6" runat="server" style="background-color: #FFFFFF; color: #000000; width: 120px;">
                            <asp:Label ID="AttractionNameLabel" runat="server" Text='<%# Eval("AttractionName") %>' />
                            <br />
                            <a class="modal" href="javascript:void(0);"> Modal Pop Up </a>
                            <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("AttractionID") %>' />

                        </td>
                    </ItemTemplate>

All i want is to get the HiddenField value of the item being clicked [on clicking on the hyperlink “Modal Pop Up” ] using javascript.

Thanks in advance.

  • 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-04T05:58:55+00:00Added an answer on June 4, 2026 at 5:58 am

    You can do it without using hidden field. Add data attribute and set it with AttractionID. Using hidden field for holding and passing value is not required by this method.

    <a class="modal" href="javascript:void(0);" data-AttractionID='<%# Eval("AttractionID") %>'> Modal Pop Up </a> 
    

    Get the attractionID assigned to anchor tag

     $(".modal").click(function() {
            valueofAttractionID = $(this).data('AttractionID');
            modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following: $(document).ready(function() { var myIframe = document.getElementById('myIframe'); var element = myIframe.contentDocument.createElement('script');
my code: <html> <head> <script type=text/JavaScript src=jquery-1.3.2.min.js></script> <script type=text/JavaScript src=jquery.center.js></script> <script type=text/JavaScript> $(document).ready(function(){ $('a').click(function(){
I wonder if there's a shorter way of doing that: <script> $(document).ready(function() { $(#deliverer).change(function()
I use this script: $(document).ready(function() { $page = jQuery.url.attr(file); alert(page); }); but I get
I' m trying to enable adding/deleting rows to/from table using folowing code: Script: $(document).ready(function()
I've got this script on my website : $(document).ready(function() { function filterPath(string) { return
The following java-script is working fine (Jquery) $(document).ready(function(){ $('#c_area').load($('.m_top:first').attr('href')) }); $('.m_top').click( function(){ $(#myDiv).html('<img src=images/loading.gif
Would anyone now why this script is disabling my nav in webkit browsers $(document).ready(function
Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
I have the following jquery function > <script type=text/javascript> > > $(document).ready(function() { >

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.