开发者

Open facebox from c# codebehind

I am creating a basic contact us form that contains a few fields and a button. I am using the jquery facebox plugin which I want to open after the buttons click event is fired displaying a value from one of the textboxes within the div tag.

e.g.

<div id="info" style="display:none;"><h1>Thanks for your enquiry</h1><p>Thanks [NAMEFIELD],<br /> Someone will be in contact with you short开发者_如何转开发ly.</p>

Any tips would be great!


Well.. I can be wrong here... But your initialization code looks like this, right?

jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox() 
})

Why don't you emulate the click of your anchor?

like

$('#contactUs').click();

after the facebox initialization (still inside document ready).

EDIT:

If you really want the "server-side" of things you can have a method to insert the javascript to trigger the click from it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜