Syed Azy

Syed Azy

  • NA
  • 21
  • 640

JavaScript stops other Scripts on the Page

May 25 2015 5:30 AM

Well....!!!

I have Two Scripts on the Page for Two Purposes

1) For DropDown List

2) For POPUP Messages

When The Page Loaded Drop Down Works it Gives List

  • Add New
  • Modify
  • Delete

 

and When I click Modify Or Delete To Execute The POP Message , The POP message Will Execute successfuly and when cancel or save Changes what ever I want On POP Message after when I return To the Page The Dropdown List Stop Functioning , its Not Drop the List above.

For Drop Down List I Used This JavaScript

<script type="text/javascript">        $(function () {         $('.dropdown1').mouseenter(function () {             $('.sublinks1').stop(false, true).hide(); var submenu = $(this).parent().next();              submenu.css({                 position: 'absolute',                  top: $(this).offset().top + $(this).height() + 'px',                 left: $(this).offset().left + 'px',                 zIndex: 1000 });              submenu.stop().slideDown(300);              submenu.mouseleave(function () {                 $(this).slideUp(300); }); }); });  </script>

While For POP Message I used

 <script type="text/javascript"> function ClearFields() { }; function CloseModal(msg) {               $('#myModal').modal('hide'); if (msg.length > 0) {                   alert(msg); } } function ShowModal() {               $('#myModal').modal('show'); } </script> 

Referenced On The Page

<link href="../StyleSheet/DropDownMenu.css" rel="stylesheet" type="text/css" />
<script src="../JsQuery/1.10.2jquery.min.js" type="text/javascript"></script>
<link href="../MessageBox/BootStrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="../MessageBox/BootStrap/js/bootstrap.js" type="text/javascript"></script>
<script src="../MessageBox/Scripts/bootstrap-datepicker.js" type="text/javascript"></script>

Answers (2)