how to set iframe width when use ajax?

4 messages Options
Embed this post
Permalink
SuMic

how to set iframe width when use ajax?

Reply Threaded More More options
Print post
Permalink
AJAX CODE:
<script type="text/javascript">
            $(document).ready(function(){
                var options = {
                    language: "zh-CN",
                    players: ["iframe", "img"]
                };
                Shadowbox.init(options);
                $("#jiandu").change(function(){
                    var id = $("#jiandu").val();
                    $.ajax({
                        type: "Get",
                        url: "get_menu.php?id=" + id,
                        success: function(result){
                            if (result != '') {
                                $("#show").html(result);
                                // return relust:"click
                                Shadowbox.setup(options);
                            }
                        }
                    });
                });
            })
        </script>
     
QUESTION:
when i click the url,the shadowbox doesn't opened with the "width:500" .

how should i do ?
Wizzud

Re: how to set iframe width when use ajax?

Reply Threaded More More options
Print post
Permalink
And the html code for the link (the thing you're clicking) would be ... ?
Combine literacy with curiosity and a whole world of information opens up to you
SuMic

Re: how to set iframe width when use ajax?

Reply Threaded More More options
Print post
Permalink
the html code for the link is
a href='info.php' rel='shadowbox;width:500;height:300'>click
Wizzud

Re: how to set iframe width when use ajax?

Reply Threaded More More options
Print post
Permalink
SuMic wrote:
the html code for the link is
a href='info.php' rel='shadowbox;width:500;height:300'>click
Is there a reason for not using this format (as per the documentation) instead?...
<a href='info.php' rel='shadowbox;width=500;height=300'>click</a>

Combine literacy with curiosity and a whole world of information opens up to you