开发者

Open facebox from c# codebehind

开发者 https://www.devze.com 2023-01-02 11:31 出处:网络
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

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

精彩评论

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