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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:55:48+00:00 2026-06-16T03:55:48+00:00

i have many links in my page each with two attributes that are format

  • 0

i have many links in my page each with two attributes that are format & src.

<a class="play" src="'.$p['video_path'].'" format="'.$p['video_type'].'"></a>

what its clicked i get its 2 attr and make HTML in js like this.

$(".play").live('click',function() {
   var src = $(this).attr('src');
   var fmt = $(this).attr('format');
   var html = '<video width="200" height="240" controls> <source src="'+src +'" type="video/'+ fmt +'"> </video>'; 
   $("#myVideoDiv").html(html);
   $.mobile.changePage( $("#myVideoDiv"), { transition: 'pop' } );
 });
<div data-role="dialog" id="myVideoDiv"></div>

when i clicked on any video link my browser url changes like this

http://pp.local/maps/maps/40295472#&ui-state=dialog

but nothing displaying just a white screen.
although its working $("#myVideoDiv").html( html ); i can see the HTML through Firbug.
No error or Warning in Firebug:(

Basically what i need to do is that i want to show each video in jquery Mobile dialog like we do in normal jquery UI like the code below.i need to do same thing here too but with jquery mobile dialog.

  $(".watchVideo").live('click', function() {
    if( $('div.ui-dialog').length ) {
      $('div.ui-dialog').remove();
    }
    var path  = $(this).attr('rel');
    var title = $(this).attr('title');        
    var $dialog = $('<div>', {
        title: 'Title'
    }).dialog({
        autoOpen: false,
        modal: true,
        width: 600,
        height: 500,
       closeOnEscape: false
    });

    var tab = '<table id="video_player" style="margin: 10px 10%;"><tr><td><object codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><param value="'+path+'" name="src"><param value="true" name="autoplay"><param value="true" name="controller"><embed pluginspage="http://www.apple.com/quicktime/download/" controller="true" style="height:300px;width:400px;background-color:#D9EBFB" autoplay="true" target="myself" src="'+path+'"></object></td></tr></table>';
    $('<div id="updateContent">').html( tab ).appendTo( $dialog );
    $dialog.dialog('open');
    return false;    
});
  • 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-16T03:55:50+00:00Added an answer on June 16, 2026 at 3:55 am

    I have successfully recreated your problem, unfortunately I can’t be 100 % sure this is the problem. I think you have a an error with your page/dialog setup.

    Take a look at my working example, try to use it in your app: http://jsfiddle.net/Gajotres/5REkc/. This example uses dialog as a video container:

    $('#index').live('pagebeforeshow',function(e,data){   
        $('#show-video').live('click', function(e) {
            $('#video-content').append('<video width=450px height=300px controls="controls"><source src="http://dev.swinginsam.com/_files/testvid_01.ogv" type="video/ogg"></video>');  
            $.mobile.changePage("#second", { transition: "slide"});
        });        
    });
    

    I have also created another example for you. This one is much better and it uses popup as a video container. Unlike dialog popup will resize to accommodate video tag: http://jsfiddle.net/Gajotres/vscrU/.

    $('#index').live('pagebeforeshow',function(e,data){   
        $('#show-video').live('click', function(e) {
            $('#popup-video').append('<video width=600px height=300px controls="controls"><source src="http://dev.swinginsam.com/_files/testvid_01.ogv" type="video/ogg"></video>');  
            $('#popup-video').popup("open");
        });        
    });
    
    <div data-role="popup" id="popup-video" data-tolerance="15,15" class="ui-content"</div>
    

    Data tolerance is here so popup can have a padding. Without it video player is overflowing popup container.

    One more thing, I can see you are using php for content generation. In this case popup is much better solution. Unlike dialog (which acts as another page, and is a another page), popup is a part of a single page, so i has a much better usability in server side generation.

    WARNING:

    My examples will only work in firefox browser. I have used only a ogg video source. Video sources are taken from this post.

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

Sidebar

Related Questions

I have a website that contains many different pages of products and each page
I have many links in my page. For example <a href=/promotions/download/schools/australia.aspx>Australia</a> Now I want
I have the following HTML with many of these kinds of links: <a class=button
I have a test file that has many lines, each line looks something like:
I have many pages on a site im developing, in which each page has
I have a site that lists business listings from a database. On each page
I have a HTML form that contains many links (around 17). I want, when
I have two rails resources: notes & technologies. Note Model: class Note < ActiveRecord::Base
I have a simple html page, with many links. When a link is hovered
I have a web page that lists thousands of links to image files. Currently

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.