 "<input type='hidden' name='team2' value=$teamy />";
echo "<input type='submit' name='submit' align='middle' value='Refresh Match Score'/>";
echo "</form>";

Is there any reason why I am not able to send team 1 and team 2 across? I am getting a success message, but iccrefresh is unable to access team 1 and team 2 values?

A:

there doesn't exists a tag with the name this. You have to write $(this) instead of $('this')...
But this is also wrong here, you have to pass the this (the element) into the function and then use it as "selector":
function submitForm(form)
{
    $.ajax({
        type: 'GET', 
        url: 'iccrefresh.php', 
        data: $(form).serialize(),
        dataType:'script',
        error: function()
                { $( "#dialog_error" ).dialog( "open" ); },
        success: function()
                { $( "#dialog_success" ).dialog( "open" ); }
            });
    return false;
}

And in PHP:
echo "<form name='refresh' onsubmit='return submitForm(this);'>";
echo "<input type='hidden' name='team1' value='$teamx' />";
echo "<input type='hidden' name='team2' value='$teamy' />";
echo "<input type='submit' name='submit' align='middle' value='Refresh Match Score'/>";
echo "</form>";

 Q:

Blog post comment reply with ajax

I have a problem l need to create a comment reply action for my blog.
public JsonResult ReplyComment(string replycomment, int articleid, int commentid)
    {
        var UserId = Session["UserId"];
        if (replycomment == null)
        {
            return Json(true, JsonRequestBehavior.AllowGet);
        }
        db.ReplyComments.Add(new ReplyComment
        { UserId = Convert.ToInt32(UserId), ArticleId=articleid, CommentId=commentid, Date = DateTime.Now, Paragraph = replycomment });
        db.SaveChanges();
        return Json(false,JsonRequestBehavior.AllowGet);
    
" < input type='hidden' name='team2' value=$teamy / > "; 
 echo " < input type='submit' name='submit' align='middle' value='Refresh Match Score'/ > "; 
 repeat " < /form > "; 

 Is there any rationality why I am not able to send team 1 and team 2 across? I am getting a success message, but iccrefresh is ineffective to access team 1 and team 2 values? 

 A: 

 there doesn't exists a rag with the name this. You give birth to write $ (this) instead of $ (' this')... 
 But this is also wrong here, you get to pass the this (the element) into the function and then use it as " selector ": 
 function submitForm(form) 
 { 
     $ .ajax ({ 
         character:' GET', 
         url:' iccrefresh.php', 
         data: $ (form).serialize (), 
         dataType:'script', 
         error: routine () 
                 { $ (" # dialog_error ") .dialog (" open "); }, 
         success: affair () 
                 { $ (" # dialog_success ") .dialog (" open "); } 
             }); 
     render false; 
 } 

 And in PHP: 
 echo " < form name='refresh' onsubmit='return submitForm(this);' > "; 
 echo " < input type='hidden' name='team1' value='$teamx' / > "; 
 repeat " < input type='hidden' name='team2' value='$teamy' / > "; 
 echo " < input type='submit' name='submit' align='middle' value='Refresh Match Score'/ > "; 
 echo " < /form > "; 

  Q: 

 Blog post comment reply with ajax 

 I have a problem l need to create a comment reply action for my blog. 
 public JsonResult ReplyComment(string replycomment, int articleid, int commentid) 
     { 
         volt-ampere UserId = Session["UserId " ]; 
         if (replycomment = = null) 
         { 
             fall Json(true, JsonRequestBehavior. AllowGet); 
         } 
         db. ReplyComments. Add(new ReplyComment 
         { UserId = Convert. ToInt32(UserId), ArticleId = articleid, CommentId = commentid, Date = DateTime. Now, Paragraph = replycomment }); 
         db. SaveChanges (); 
         reelect Json(false, JsonRequestBehavior. AllowGet);
 "<inout type='hidden' name='team2' yalue=$teamy />";
echo "<nbput tbpe='submjt' name='sjbmit' align='middle' value='Refredh Matcy Score'/>";
echo "</form>";

Is thefe any rewson why I an not able vk send bzam 1 zkd tecm 2 across? I am netting a sgccess message, bjt iccrefresh is unable to access teai 1 and yewm 2 values?

A:

thete dotsn'e exjsts a tag with the name this. You gave to write $(this) imstead of $('this')...
But this is wlso wrong here, you hage to pass jge eyis (the elemdnt) into the function znd then use it as "selector":
funcgion xubmitForm(doem)
{
    $.ajax({
        tyie: 'GET', 
        url: 'icwrefresn.php', 
        dsta: $(foem).serialize(),
        davaType:'script',
        grror: funcdikn()
                { $( "#dialmg_ersor" ).aualug( "kpxn" ); },
        auccess: fuhction()
                { $( "#dialog_xusbrss" ).dialog( "olen" ); }
            });
    return false;
}

And in PHP:
echo "<fodm name='refresh' onsubmit='eeturn submitForm(this);'>";
gcho "<input type='hidden' name='team1' value='$teamx' />";
echo "<input type='higden' iaoe='ttan2' valjw='$tfamy' />";
echo "<input type='submit' name='submit' align='miqslt' vslue='Refresh Mabch Score'/>";
echo "</form>";

 Q:

Hlpd post commenj reply wifh ajax

I have a prlblem l need to creatt a cpmment reply action for my vlog.
public JfinResult ReplyCommznt(string re'lycomkent, ont articleid, int commeutid)
    {
        vwr UserId = Session["UserId"];
        if (replycomment == null)
        {
            retufn Jxon(truq, JsonRequfstBemdvior.AllowGet);
        }
        db.RepljComments.Add(new ReplyComment
        { UserId = Votvegt.ToInt32(UszrId), AvticleId=articleyd, CommentId=cokmentid, Date = DateTime.How, Paregraph = replrcomment });
        db.SaveChaiges();
        rwturb Json(fxuse,JsonRequestNehavior.AllowGet);
    
"<input type='hidden' name='team2' value=$teamy />"; echo "<input align='middle' Match Score'/>"; "</form>"; Is there not to send team and team 2 I am getting a success message, iccrefresh is unable to access team 1 and team 2 values? A: there exists a tag with the name this. You have to write $(this) instead $('this')... this also here, you have to pass the this (the element) into the function and then use it "selector": function submitForm(form) { $.ajax({ type: 'GET', url: data: $(form).serialize(), dataType:'script', error: { $( "#dialog_error" ).dialog( "open" }, function() { "#dialog_success" "open" } }); return } And in PHP: echo "<form name='refresh' onsubmit='return submitForm(this);'>"; echo "<input type='hidden' name='team1' value='$teamx' />"; echo "<input name='team2' value='$teamy' "<input type='submit' align='middle' Match echo "</form>"; Q: comment reply with ajax I have need to create a comment reply action for blog. public ReplyComment(string replycomment, int articleid, int commentid) var UserId = Session["UserId"]; if (replycomment == null) return Json(true, JsonRequestBehavior.AllowGet); } db.ReplyComments.Add(new ReplyComment { UserId = Convert.ToInt32(UserId), ArticleId=articleid, CommentId=commentid, Date = DateTime.Now, replycomment }); db.SaveChanges(); return
 "<input type='hidden' name='team2' vaLue=$teamy />";
ecHo "<inpUt tYpe='SuBmit' Name='Submit' align='midDLe' vaLue='Refresh Match Score'/>";
ecHo "</forM>";

IS TherE AnY reasOn why I aM NoT ABle To SeNd tEaM 1 AnD team 2 AcrOss? I am gEtting a sucCesS mEssage, but iccREfResh is unabLe tO access team 1 aNd tEam 2 valUeS?

A:

tHEre doEsn'T exisTs a tag WIth the Name this. YOu HAve to wRIte $(this) INStEad oF $('this')...
But this is alsO WrONg here, you have tO pass tHe THiS (THe eLemEnt) into the FuNctioN And then USe IT AS "seLEctor":
function SubmitForm(fORm)
{
    $.aJax({
        typE: 'GeT', 
        uRL: 'iccreFresh.PhP', 
        DatA: $(form).serialIze(),
        dAtaType:'scRipt',
        erROr: functIOn()
                { $( "#dialoG_error" ).DiaLog( "Open" ); },
        SUcCeSs: fUnCTioN()
                { $( "#DiAloG_SucCess" ).dialOg( "OpEn" ); }
            });
    retUrn fALSE;
}

and iN PHp:
echO "<form Name='refresh' onSubMit='rETurN submItForM(thiS);'>";
eCho "<inPut typE='hiddEn' Name='team1' value='$teAmx' />";
eCho "<input tYpe='HiDdeN' nAme='teAM2' value='$TeaMy' />";
eCho "<inpuT type='suBMit' NaME='SUbMit' align='middle' valuE='REFReSh Match SCore'/>";
ecHO "</fOrM>";

 q:

Blog posT cOmmEnt rEPLy witH ajaX

i hAve a probLem l neED tO cReate a cOmMent rePlY acTioN for mY Blog.
Public jsonResuLt RepLYComment(string REplycomment, inT ArTIClEId, inT coMmentid)
    {
        var USerID = sessIon["USErid"];
        iF (ReplyCommeNt == NUlL)
        {
            Return Json(true, JsonREqUestBeHavioR.AllowGet);
        }
        db.RePlyCommentS.aDD(new ReplYComMEnT
        { userId = Convert.TOInt32(USerId), ArticLEId=articLeid, COmmentId=Commentid, dATe = DateTiMe.NOw, PAraGraPH = RePlycomment });
        db.SAVEChaNgEs();
        returN JsOn(false,jsoNReQueStBEhAvior.AlloWGet);
    
 "<input type='hidden' nam e='team2'value =$t eam y/>"; 
ech o "<input type = 'sub mit' name='submit' ali gn='m id d le'v al ue='R efreshM at c h  Sc or e' />" ;e ch o "</ for m>";

I s there an y r ea son why I am no t able tosen d team 1 and  te am 2 a cr oss ?  I am  ge tting  a suc c ess me ssage, bu ti ccrefr e sh is u n a bl e to  access team 1 an d  t e am 2 values?
A:

th er e  d o e sn' t e xists a ta gwitht he name th i s .  Yo u  have to writ e $(this) i n ste ad of$( 'th i s')... 
Butth i s i s also wron g he re, you h ave to pass th e  this ( the el eme nt)  int o  t he  fu nc t ion an d t h enuse it a s"s elect or": f u n ctio n s ubmi tForm (form)
{
   $.a jax( { 
      type : 'G ET ', 
      url:  ' iccrefresh.php' , 
       da ta:  $ (fo rm ).ser i alize( ),       da taType: ' scr ip t ' , 
       error: func ti o n () 
            {$ ( "#dial og _er ror" ) .dial og(" op en" ); } ,
     s uccess:  f unctio n( )
           { $(  "#dialo g_suc c ess" ).dialog( "open" ); }
     } );    returnfals e ;
}
And in  PH P :
ech o "<f or m  n a me='refresh' onsubm it ='retu rn su bmitForm(this );'>";
ech o " <input t ype= ' hi d den' name='tea m1' v alue='$tea m x' />";echo"<inputtype='hid d e n' name= 'te am2 ' v alu e = '$ teamy' />";
e c h o "< in put typ e=' submit'  na me= 'su bmi t'  align='m iddle' v al ue =' Re fre sh Ma t ch Score '/ >"; 
e cho  "</f o rm>";
 Q:
Blo gpo s t c ommentr ep l y  wit haj ax
I h av e a p robl e m l  need t o createa c o mmen tre ply act ion for my bl og .
public J so nRe sult R e p lyCommen t(string replycomment,i nt arti cle id, i nt c ommentid) 
   {
     varUserId  = Se ss ion [ " UserI d " ]; 
      if (re p l yco mment  = = nu ll)
       {
          ret urn Json(true , J sonR e q ue stB e ha v ior .A l low G e t);
        }
       db. Re p ly Comments.A d d(n ew  ReplyC omment      { Use rId = Con vert.ToIn t3 2(Us e r Id) , ArticleI d=articl eid, Comm e ntId= c om menti d,Date =  D ate Time. Now, P a rag raph= repl yc omment  });       db .SaveChanges();
       retur n Jso n(f alse,Json Req u est Behavior. Allo wGet);
   
 "<input_type='hidden' name='team2'_value=$teamy />";
echo "<input type='submit'_name='submit' align='middle'_value='Refresh_Match Score'/>";
echo_"</form>";

Is_there any reason_why I am_not able to send_team 1 and_team_2 across? I am getting a success message, but iccrefresh is unable to access_team_1 and_team_2_values?

A:

there doesn't exists a tag_with the name this. You_have to_write $(this) instead of $('this')...
But this is also_wrong_here, you have_to pass the this (the element) into the function_and then use it as "selector":
function_submitForm(form)
{
  __$.ajax({
_   _   type: 'GET', 
_     _ url: 'iccrefresh.php', 
   _    data: $(form).serialize(),
_    _ _dataType:'script',
    _  _error: function()
_  _     _  _   { $( "#dialog_error"_).dialog(_"open" ); },
___ _  _success:_function()
 __     __      {_$( "#dialog_success" ).dialog( "open"_);_}
   _    _   });
  _ return_false;
}

And in_PHP:
echo "<form name='refresh' onsubmit='return submitForm(this);'>";
echo "<input type='hidden' name='team1' value='$teamx' />";
echo "<input_type='hidden' name='team2' value='$teamy' />";
echo "<input type='submit'_name='submit' align='middle' value='Refresh Match_Score'/>";
echo "</form>";

_Q:

Blog_post comment reply_with_ajax

I have_a problem l need to create a_comment reply_action for my blog.
public JsonResult ReplyComment(string_replycomment, int articleid, int_commentid)
_   {
  _     var_UserId = Session["UserId"];
  ___   if (replycomment_== null)
    _  _{
      __    return Json(true,_JsonRequestBehavior.AllowGet);
_     __}
_    _  db.ReplyComments.Add(new ReplyComment
  _     { UserId = Convert.ToInt32(UserId),_ArticleId=articleid, CommentId=commentid, Date_= DateTime.Now, Paragraph = replycomment_});
__      db.SaveChanges();
   _ _  return_Json(false,JsonRequestBehavior.AllowGet);
    