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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:38:42+00:00 2026-05-18T21:38:42+00:00

hello there :) Im trying to figure out how i can grab some content

  • 0

hello there 🙂 Im trying to figure out how i can grab some content via ajax in an jquery script im using. Im trying to customize this script to suit my needs, its pretty straight forwrd:

$('a.poplight[href^=#]').click(function() {
 var popID = $(this).attr('rel'); //Get Popup Name
 var popURL = $(this).attr('href'); //Get Popup href to define size

 //Pull Query & Variables from href URL
 var query= popURL.split('?');
 var dim= query[1].split('&');
 var popWidth = dim[0].split('=')[1]; //Gets the first query string value

 //Fade in the Popup and add close button
 jQuery('#' + popID).fadeIn(200).css({ 'width': Number( popWidth ) });


 //Define margin for center alignment (vertical   horizontal) - we add 80px to the height/width to accomodate for the padding
 var popMargTop = ($('#' + popID).height() + 80) / 2;
 var popMargLeft = ($('#' + popID).width() + 80) / 2;

 //Apply Margin to Popup
 jQuery('#' + popID).css({
     'margin-top' : -popMargTop,
     'margin-left' : -popMargLeft
 });

 //Fade in Background
 $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
 $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'}) IE

 return false;


});

 //Close Popups and Fade Layer
 $('a.close, #fade, .cancel').live('click', function() { //When clicking on the close or fade layer...
     $('#fade , .popup_block').fadeOut(function() {
         $('#fade, a.close').remove();  //fade them both out
      $('form').clearForm();
 });
     return false;
 });

It’s calling a div which is hidden. i woukd like to just call a php file, which holds all of the contents instead. this is what the html looks like:

<a href="#?w=480" rel="whatever" class="poplight"><input type="button" class="button" value="update"/></a>

any ideas? Thanks ahead of time 🙂

Ok, I tried jQuery UI’s dialog…and i must say, It’s kinda frustrating…
i know it’s difficult to follow someones elses coding, but i actually can tweak pretty much everything except how to use this code to fetch data and show it in the pop up since the href is calling the modal size, and not any actual content

so im back to this one lol

  • 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-05-18T21:38:43+00:00Added an answer on May 18, 2026 at 9:38 pm

    Why don’t you use jquery ui’s modal dialog instead(good code quality). Then you get content via $.get()

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

Sidebar

Related Questions

Possible Duplicate: Detecting IE using jQuery Hello, I'm trying to figure out how to
Hello there everyone, I've been trying to figure out how to create a function
Hello I've been trying to figure out generic way to log http requests in
hello i'm trying to figure out how to center this image based on my
Hello people I'm trying to figured this out, but I still can't do it.
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
I am trying to figure out how to do the following. I have webpage
I'm trying to figure out how to encrypt / decrypt a string in VB.Net.
I am trying to figure out the fastest way (in PHP 5) to check
I'm trying to figure out why this code doesn't work in C# and how

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.