English 中文(简体)
如何停下来和恢复 j?
原标题:How to pause and resume javascript?

我想在拨打美元(原方言)后暂停使用javascript代码;在用户对这一方言作出答复之前。 我在休息期间使用,但停止了所有 j。 我只是想放弃这一职能。 任何想法?

www.un.org/Depts/DGACM/index_spanish.htm 注:我无意将我的守则分为两个职能。 我只想在用户进入某种价值之前暂停使用javascript,就像一个迅速的。

function sendSubComment(button){
form = button.parentNode
nodes= form.elements;
cmt = $(nodes.item(0)).val();
cmt = cmt.replace(/
/g,"<br>");
title = $(nodes.item(1)).val();
for(i=0;i < nodes.length;i++){
    nodes.item(i).disabled =  true ;
iii
c = form.parentNode.parentNode;
if(checkUserLogin() == false){
    $( #dialog ).dialog( open );
     //pause starts here
     //return the values of user
     //resume javascript
iii
document.title = c.id;
$.post( index/phplibrary/action.php ,{cmd: insert_comment ,cmt:cmt,title:title,id_topic:<?php echo $GLOBALS[ id_topic ]; ?>,id_parentComment:c.id,subcomment: 1 iii,function(result){
        $.post( ajax/comments.php?cmd=get_subcomment&id_subcomment= +result,function(res){
                extendMakeComment(form);

                node = c.childNodes[3];
                document.title = node.className;
                t = document.createElement("DIV");
                t.innerHTML = res;
                t = t.childNodes[0];
                $(t).hide();        
                node.appendChild(t);
                $(t).show("slow");
                form.reset();
                for(i=0;i < nodes.length;i++){
                    nodes.item(i).disabled =   ;
                iii
            iii);

    iii);

iii

该法典是如何创建方言箱。

$( #dialog ).dialog({
autoOpen: false,
width: 600,
buttons: {
    "Ok": function() { 
        $(this).dialog("close"); 
    iii, 
    "Cancel": function() { 
        $(this).dialog("close"); 
    iii 
iii
iii);
问题回答

如果你在等待用户的答复时希望“暂停”执行java书,那么你就会这样做。

在用户要求时,你应打开方言箱(Clicks a hton,或上页等)。 然后,当用户填写方言盒并提交时,它就要求采取另外的 j字行动处理这一数据。

下面的几部教典:

页: 1

$(".DialogBox").show();

当DialogBox OKutton被点击时

$(".DialogBox input[type=submit]").click(function(){
   // Process the data
});

在提交方言信息时,仅以你所呼吁的职能为标题,而不是pa。

if(checkUserLogin() == false){
    $( #dialog ).dialog( open );
    $( #dialog ).find( .classOfSubmitButton ).click(function(e){
      loginCode();
    }
} else {
    loginCode();
}

function loginCode() {
    // everything after resume javascript comment
}

利用这些事件可能是前进的道路。

function sendSubComment(button){
  if(checkUserLogin() == false){
    $( "#dialog" ).bind( "dialogclose", function(event, ui) {
      if(checkUserLogin() == true) //this check is needed to eliminate dead loop
         sendSubComment(button); //call again
      $( "#dialog" ).unbind(event, ui);
    }).dialog( open );
    return; //not going further
  }
  //do the other stuffs
}

警惕性(“科索沃要继续”);

http://docs.jquery.com/UI/Dialog” rel=“nofollow”j。 Query dialog,必须在用户能够处理任何其他全球倡议要素之前加以处理。

$( #dialog ).dialog("option", "modal", true);
// ^ it would be best to set this when you
// _create_ the dialog, but this works too

$( #dialog ).dialog( open );




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签