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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:46:55+00:00 2026-06-01T18:46:55+00:00

I use the following code to find hooks in the html, generate links from

  • 0

I use the following code to find hooks in the html, generate links from them, create and populate popups, and then hide the hooks themselves from view. It works fine in FF, Chrome, Safari, IE8 and IE9 – but fails in IE7.

Here is a link to the actual usecase, note there is no unusual CSS at play, the lists are not floated, etc. I am using JQuery 1.7.1 with UI version 1.8.18, with the default packaged CSS for the dialog:

http://databizsolutions.ie/contents/page.php?v=35&u=admin-videos#a

If anyone could point out how I can close off this error, I’d be very grateful.

The original HTML (generated by TinyMCE):

<h3>Title of list</h3>
<ol>
    <li>Call to  action 1</li>
    <ol>
        <li>[popup]path/to/file1.mp4</li>
    </ol>
<li>Call to  action 2</li>
    <ol>
        <li>[popup]path/to/file2.mp4</li>
    </ol>
<li>Call to  action 3</li>
    <ol>
        <li>[popup]path/to/file3.mp4</li>
    </ol>
...

The JQuery:

$(document).ready(function(){

var num = 0;

//Find [popup] instances, increment the number
$("li:contains('[popup]')").each(function() {
    var nextnumber = num++;

    //add a general and a unique class to the list item containing the hook
    $(this).addClass('popup' + ' ' + 'pop' + nextnumber);

    //Split on the hook, and save remainder of text (the path to file) as the 'path' attr
    var splitpath = $(this).text().split("[popup]");
    $(this).attr("path", splitpath[1]); 
    var path = $(this).attr("path");
    //alert($(this).attr("path"));

    //Get the previous list item (the call to action), and give it general and unique classes also.
    $thisArrow = $(this).parent().prev();
    $thisArrow.addClass('arrow' + ' ' + 'arr' + nextnumber);

    //Make the call to action an anchor link, with a general class identifier.
    $thisArrow.wrapInner('<a class="opener" title="Click to view video" path ="' + path + '"/>');

    //hide hooks
    $('li.popup').parent().hide();
});

$('.opener').click(function() {
    var Header = $(this).text();
    var popupURL = $(this).attr("path");
    var popupBG = "../contents/css/images/white-nontrans.jpg";

    var thisDialog = $('<div></div>')
        .html('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="mediaplayer1" name="mediaplayer1" width="550" height="420"><param name="movie" value="../mediaplayer/player.swf"><param name="autostart" value="true"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="bgcolor" value="#FFFFFF"><param name="wmode" value="opaque"><param name="flashvars" value="file=' + popupURL + '&image=' + popupBG + '"><embed id="mediaplayer1" name="mediaplayer2" src="../mediaplayer/player.swf" width="550" height="420" allowfullscreen="true" allowscriptaccess="always" autostart="true" bgcolor="#FFFFFF" wmode="opaque" flashvars="file=' + popupURL + '&image=' + popupBG + '" /></object>')

    .dialog({ close: function() { $(this).html(''); },autoOpen: false, title: Header, modal: true, maxHeight: 500, width:580 });
    thisDialog.dialog('open');
    return false;
})
});

Desired result in HTML:

<h3>Title of list</h3>
<ol>
    <li class="arrow arr0">
        <a class="opener" title="Click to view video" path ="path/to/file1.mp4" >
           Call to  action 1
        </a>
    </li>
    <li class="arrow arr1">
        <a class="opener" title="Click to view video" path ="path/to/file2.mp4" >
           Call to  action 2
        </a>
    </li>
    <li class="arrow arr2">
        <a class="opener" title="Click to view video" path ="path/to/file3.mp4" >
           Call to  action 3
        </a>
    </li>
...

In IE7:

<h3 class="arrow arr0 arr2 arr4 arr6 arr8 arr10">Title of list</h3>
<a class="opener" title="Click to view video" path ="path/to/file1.mp4" >
    <a class="opener" title="Click to view video" path ="path/to/file2.mp4" >
        <a class="opener" title="Click to view video" path ="path/to/file3.mp4" >
<ol>
    <li>Call to  action 1</li>
    <ol>
        <li>[popup]path/to/file1.mp4</li>
    </ol>
<li>Call to  action 2</li>
    <ol>
        <li>[popup]path/to/file2.mp4</li>
    </ol>
<li>Call to  action 3</li>
    <ol>
        <li>[popup]path/to/file3.mp4</li>
    </ol>
...
  • 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-01T18:46:56+00:00Added an answer on June 1, 2026 at 6:46 pm

    I havent tested this, but I think this is because your HTML is incorrect. ol is not a valid child element of ol, only li. Your html should look like this:

    <h3>Title of list</h3>
    <ol>
        <li>
            Call to  action 1
            <ol>
                <li>[popup]path/to/file1.mp4</li>
            </ol>
        </li>
        <li>
            Call to  action 2
            <ol>
                <li>[popup]path/to/file2.mp4</li>
            </ol>
        </li>
        <li>
            Call to  action 3
            <ol>
                <li>[popup]path/to/file3.mp4</li>
            </ol>
        </li>
    </ol>
    

    IE is very unforgiving of malformed HTML.

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

Sidebar

Related Questions

I use the following code to find a particular table, hide it then show
I use following code: Create a retry policy, when error, retry after 1 second,
I use the following code to create countdowns in Javascript. n is the number
I use the following code try to create an array of string vectors, I
On my serverside pages (intranet environment), I use the following code to find out
I use the following code to help find sales for the current month. My
I am new to servlet . I use the following code in servlet.then deployed
I use the following code to prefil a field with an amount from a
I use the following code of jQuery plugin: Validation : <!DOCTYPE html PUBLIC -//W3C//DTD
I use VS2010, C# to develop Silverlight 4 app, I use following code in

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.