問題タブ [object-tag]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
3 に答える
26417 参照

javascript - 動的に追加するにはどうすればよいですか tag with JavaScript in IE?

I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin

I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin could be missing and needs to get downloaded in this case. The dynamically added embed tag for Firefox works as expected. The dynamically added object tag for Internet Explorer seems to do nothing at all. The object tag needs the following attributes to function properly.

id ="SomeId" classid = "CLSID:{GUID}" codebase = "http://www.MyActicexSource.com/MyCuteActivex.CAB#Version=2,0,0,1"

Even a general working idea or method would be nice.

Thanks!


NHibernate: One base class, several mappings

I'm relatively new to NHibernate, but have been using it for the last few programs and I'm in love. I've come to a situation where I need to aggregate data from 4-5 databases into a single database. Specifically it is serial number data. Each database will have its own mapping file, but ultimately the entities all share the same basic structure (Serial class).

I understand NHibernate wants a mapping per class, and so my initial thought was to have a base Serial Class and then inherit from it for each different database and create a unique mapping file (the inherited class would have zero content). This should work great for grabbing all the data and populating the objects. What I would then like to do is save these inherited classes (not sure what the proper term is) to the base class table using the base class mapping.

The problem is I have no idea how to force NHIbernate to use a specific mapping file for an object. Casting the inherited class to the base class does nothing when using 'session.save()' (it complains of no mapping).

Is there a way to explicitly specify which mapping to use? Or is there just some OOP principal I am missing to more specifically cast an inherited class to base class? Or is this idea just a bad one.

All of the inheritance stuff I could find with regards to NHibernate (Chapter 8) doesn't seem to be totally applicable to this function, but I could be wrong (the table-per-concrete-class looks maybe useful, but I can't wrap my head around it totally with regards to how NHibernate figures out what to do).

0 投票する
4 に答える
1808 参照

php - URLの単一入力に対するPHP入力検証

ユーザーが任意のサイトの URL を指定できるようにするこの非常に単純なスクリプトがあります。このスクリプトは、オブジェクト タグの "data" 属性の URL を置き換えて、HTML ページのオブジェクト内にユーザーが選択したサイトを表示します。

コードが表示されることに気付いたので、ユーザーがオブジェクト内のサイトからページをロードできないように、入力を検証するにはどうすればよいですか。

コード:

編集:(詳細)これはプロキシを意図したものではありません。どの Web サイトをオブジェクト タグにロードするかをユーザーが決定できるようにしています (iframe に似ています)。PHP が読み取る唯一のものは、入力 URL からのタイトル タグであるため、サイトのタイトルに読み込むことができます。(ユーザーをだまさないように心配しないでください) どんなサイトのタイトルも表示するかもしれませんが、それ以外の方法でフィルターをバイパスすることはありません。

また、私が行っていることに関連する脆弱性も認識しているため、検証を検討しています。

0 投票する
1 に答える
3300 参照

pdf - Foxit PDF Reader を Web ページに埋め込む

Web ページに Foxit Reader (PDF 読み取りソフトウェア) を埋め込む必要があります。次のコードで使用する正しいクラス ID とパラメーターを知っている人はいますか?

さらに、エンタープライズ展開、サイレント インストール、レジストリ設定などの経験がある方も歓迎します。

ありがとう

0 投票する
5 に答える
3278 参照

html - タブ付き HTML アプリケーション

相互作用がないという意味で、各タブが互いに無関係な複雑なタブベースの Web アプリケーションを作成しています。したがって、開発を容易にするために、各タブを個別に表示できる個別の html ページにし、後の段階でタブを介してそれらを組み立てたり、メニューやツリーにすることができるようにしたいので、質問や質問は次のとおりです。

  1. iframe を使用する予定ですが、主要なブラウザはすべて iframe をサポートしていますか?
  2. iframe は非推奨になる予定ですか? オブジェクト タグはすべての主要なブラウザーでサポートされていますか?
  3. iframe/object の代わりに、より良い戦略を使用できますか?

しかし、iframe について私が気に入っているのは、完全にモジュール化できるため、各ページが他のページを認識しないことです。

注:私はよく説明する答えを選択しましたが、iframesの質問iframesとajaxがそれに答えるかもしれない理由はまだわかりません。

0 投票する
3 に答える
1555 参照

internet-explorer - Internet Explorer は element from DOM?

I have markup in my page that includes the tag:

<body>
  <object codebase="blah" codetype="text/blah">
    <param name="name" value="value"/>
    <div>

I have markup in my page that includes the tag:

The idea is for browsers to display the content of the <div> by default, but if a special JS library is present, it will find all the elements and transform the ones it cares about (based on @codetype).

This works in Firefox and WebKit, but fails in IE, because that browser seems to strip off the outer <object> element, and just leaves the inner <div>. That is, under Explorer, the DOM I get from the above markup looks like this:

Is this a documented behavior? Is there any way to make IE preserve the <object> element in the DOM untouched? (I am currently testing this with IE7.)

Note: This isn't for embedding Flash, or similar multimedia.


with the function

(you can also return the confirm right away, I separated it for the sake of readability)

Tested in FF, Chrome and IE

0 投票する
1 に答える
954 参照

.net - .Net クライアント DLL 配信に関する質問

私が作成した .Net DLL は、WCF サービスと対話する WCF クライアントを実装しており、エンド ユーザーはサービスが存在するサーバーにデータをパイプできます。

仕事用に開発したクライアント プログラムでこの DLL を使用していますが、この .Net DLL を Web ページで使用して、クライアントをネット上のエンド ユーザーに配信できるようにしたいと考えています。

ASP.Net には、オブジェクト タグ パターンを使用して Web ページ内の .Net DLL を参照できる優れた機能があります。

<object id="demolib" classid="DemoLib.dll#DemoLib.DemoClass"></object>

これは、クライアント マシンに存在しない可能性がある .Net DLL (上記のコードの DemoLib.dll) で特定の機能が利用可能であることを、クライアントのランタイム環境に警告します。要求された機能が存在しない場合、DLL はクライアントに転送され、Web ページで使用できるようにクライアントの GAC にセットアップされます。

インストーラーなしで、完全信頼環境でローカルでもリモートでも動作するようにしました。DLL は Web ページ経由で配信され、問題なくエンド ユーザーの GAC にインストールされます。

DLL を完全な信頼の範囲外で配信しようとすると、問題が発生します。DLL にアクセスするために、エンド ユーザーが接続先のサイトを完全な信頼に設定する必要はありません。有効な証明書を使用して.Net DLLに厳密な名前を付けて署名することに問題はありません。この DLL の信頼は暗黙的である必要がありますが、そうではないようです。

ユーザーが必要に応じて DLL の配信と使用を承認できるようにする方法が必要だと思いますが、そのような配信を失敗なくモデル化することはできませんでした。

問題は、ユーザーがDLL の配信と機能を上記のオブジェクト タグ パターンを使用してインストールを強制せずに (OneClick、MSI など)許可できるようにするには、どのような戦略を使用する必要があるかということです。

0 投票する
1 に答える
13791 参照

javascript - の内容()

<iframe>with にロードされたローカル コンテンツにアクセスできます

$("#frame").contents().find('div').css(...)

代わりに(同じローカル サイト)を使用する<object type="text/html">と、コンテンツ機能が動作しません。

別の方法はありますか、それとも何か見逃しましたか?

テストコードは次のとおりです。

HTML:

JS:

0 投票する
1 に答える
2883 参照

javascript - HTMLオブジェクトタグで呼び出されたときにJS関数「postMessage()」は何をしますか?

私は最近、Adobe Airで表示していたPDFで印刷機能を呼び出す方法を探していました。この仲間の助けを借りて、この問題を解決し、PDF でpostMessageを次のように呼び出しました。

私はJavaScriptでもこれを試しました.Adobeが忍び込んで私を助けていないことを確認するためです...

JavaScript と ActionScript でうまく機能します。

MDCが postMessage について何と言っているか調べてみましたが、window.postMessage しか見つかりませんでした。

これで、コードは魔法のように機能し、postMessage は魔法のようにメッセージを PDF に埋め込まれた JavaScript に送信します。ただし、これをどのように行っているかはまだわかりません。

Adobe がこの方法について話しているのを見つけましたが、実際には説明していません。

HTML-PDF 通信の基本
HTML ページ内の JavaScript は、PDF コンテンツを表す DOM オブジェクトの postMessage() メソッドを呼び出すことによって、PDF コンテンツ内の JavaScript にメッセージを送信できます。

これがどのように達成されるかについてのアイデアはありますか?

0 投票する
3 に答える
4329 参照

html - FirefoxのHTMLページにビデオを表示する方法

私はこの質問を見ましたが、質問者は何の返事もありませんでした。それでも、私はそれを試してみています。

HTMLページにビデオファイルを埋め込みたい。コードはIEでは正常に機能しますが、Firefoxでは機能しません。

コード:

サードパーティのツール(フラッシュなど)を使用してビデオを表示することは許可されていないことに注意してください。

誰かが私が欠けているものを教えてもらえますか?またはより良い解決策..ブラウザに依存しないもの...:)