EasyUI Forum
May 02, 2024, 01:39:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: .dialog() seems to re-run previous jQuery.get() URL for no apparent reason ?!  (Read 14130 times)
PaulMcGuinness
Newbie
*
Posts: 15


View Profile Email
« on: April 01, 2014, 02:39:15 AM »

Hi,

I've been single-stepping through my javascript for a few hours now, and can't explain this....

I have a previous .get request that loads "http://127.0.0.1/assetmanager/pabx_templates.asp?run=1&silent=1&p=259&t=11&sites=124,228&_=1396345045548" (The URL is immaterial, but I'd thought I'd include it...)

Then when I click this button:-

Code:
<a class="easyui-linkbutton l-btn l-btn-plain" data-options="iconCls:'icon-csv', plain:'true'" href="javascript:asTemplates();">
<span class="l-btn-left">
<span class="l-btn-text icon-csv" style="padding-left: 20px;">Template Comparisons</span>
</span>
</a>

it calls this function:-

Code:
function asTemplates()
{

var h="<h2 class='repTitle'>Comparison Reports</h2>";
h+="<div class='FTable2 F8 FBlack FA_ML FB_White'>";
h+="<br>";
h+="<center>";
h+="<a href='javascript:$(\"#dlgGeneral\").dialog(\"close\");asEditTemplates();' class='makeMeAnEditButton'>Edit Template</a>";
h+="&nbsp;<a href='javascript:javascript:$(\"#dlgGeneral\").dialog(\"close\");asNewTemplate();' class='makeMeANewButton'>New Template</a>";
h+="&nbsp;<a href='javascript:javascript:$(\"#dlgGeneral\").dialog(\"close\");asRunTemplate();' class='makeMeARunButton'>Run Template</a><br>&nbsp;";
h+="</center></div>";
$('#dlgGeneralContent')[0].innerHTML=h;

$('.makeMeAnEditButton').linkbutton({iconCls:'icon-edit',plain:false});
$('.makeMeANewButton').linkbutton({iconCls:'icon-new',plain:false});
$('.makeMeARunButton').linkbutton({iconCls:'icon-play',plain:false});

$('#dlgGeneral').dialog({
width: 550,
height: 200,
closed: false,
cache: false,
modal: true,
toolbar: []
});

}

Which for no apparent reason, re-requests that URL again at the moment the Dialog box appears.

This isn't an April Fools' - It's driving me bloody mad....

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!