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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:09:39+00:00 2026-05-26T04:09:39+00:00

I am trying pass links to simplemodal from : <td><a href=games/BG-1001.php class =simple_modal >EU-ch

  • 0

I am trying pass links to simplemodal from :

<td><a href="games/BG-1001.php" class ="simple_modal" >EU-ch U12</a></td> 

and at the bottom of http://chesstao.com/test-1.php I have code for picking up the URL and for loading the iframe (but it is commented out).

<script src="js/jquery.simplemodal-1.4.1-min.js"></script>
<script src="js/basic-min.js"></script>

<script>
// Display an external page using an iframe
//var src = "http://365.ericmmartin.com/";

$("a").attr("href")
$('.simple_modal').click(function() {
var hrefval= $(this).attr("href");

});


//$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
//closeHTML:"", containerCss:{backgroundColor:"#fff", borderColor:"#fff",
//height:450, padding:0, width:830}, overlayClose:true}); </script>

The problem is that I can’t use a literal to set src:
var src = “http://365.ericmmartin.com/&#8221;; //DW

because the URL in the table data changes.

Can somebody please tell me how to blend the commented code with the other code?. Am I correct in my assessment?

  • 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-26T04:09:39+00:00Added an answer on May 26, 2026 at 4:09 am

    How about simply calling the modal() method from inside your click event?

    $('.simple_modal').click(function(e) {
        // Get the href value of the <a> that was clicked
        var hrefval= $(this).attr("href");
    
        // Insert the href value into the parameter of the modal() method
        $.modal('<iframe src="' + hrefval + '" height="450" width="830" style="border:0">', {closeHTML:"", containerCss:{backgroundColor:"#fff", borderColor:"#fff", height:450, padding:0, width:830}, overlayClose:true});
    
        // preventDefault() stops the default behavior of the <a> that was clicked
        e.preventDefault();
    });
    

    Here is a simplified JSFiddle demo

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

Sidebar

Related Questions

I am trying pass class as value in hashmap. I need to get the
I'm trying to automate the addition of links from an RSS feed to a
I am trying to achieve 2 things with the href links below. First, I
I'm trying to get a php page to load in a simplemodal window, and
I am having a problem in trying to pass a ArrayList Object from Activity
I'm trying to pass a link_to block with html but can't get it. I
I am trying to pass a link within another in such a way :
I am trying to pass a variable within a header link. I have tried
Trying to pass the root of my Binary Search Tree (BST) to the UI
Trying to pass something to something else. Says undefined. Not sure how or why.

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.