1. #1
    Ext User RSidetrack's Avatar
    Join Date
    Mar 2007
    Location
    Pennsylvania
    Posts
    24
    Vote Rating
    0
    RSidetrack is on a distinguished road

      0  

    Default Scripts not running on content panels

    Scripts not running on content panels


    I am trying to get scripts to run within my center content panel for the tabs, but they don't seem to be executing. I am trying to get a button put inside a tab and have it perform the necessary routines, which will be in the code below. Everything used to work until the Alpha 2 release, and I have been banging my head ever since to try and get it to work. I am now running Alpha 3 and still no dice.

    The layout code:
    Code:
      var MainLayout = function()
    	{
    	  var layout;	
    		//Generate the main screen display layout
    		return {
    			init : function()
    			{
    			 layout = new Ext.BorderLayout('mainPageLayout', 
    											{
    												north:
    												{
    													initialSize: 100,
    													split: false,
    													autoScroll: false,
    													collapsible: false
    												},
    												south:
    												{
    													initialSize: 25,
    													split: false,
    													autoScroll: false,
    													collapsible: false,
    													fitToFrame: true
    												},
    												west:
    												{
    													initialSize: 200,
    													split: false,
    													autoScroll: false,
    													collapsible: true,
    													collapsed: true,
    													titlebar: true
    												},
    												center:
    												{
    													titlebar: false,
    													autoScroll: true,
    													resizeTabs: true,
    													minTabWidth: 100,
    													preferredTabWidth: 120,
    													fitToFrame: true,
    													tabPosition: 'top'
    												}
    											});
    				var CP = Ext.ContentPanel;
    				 
    				layout.beginUpdate();
    				layout.add("north",  new CP("mainPageLayout_north"));
    				layout.add("south",  new CP("mainPageLayout_south"));
    				layout.add("west",	 new CP("mainPageLayout_west", 							{title: "Navigation"}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_home", 				{title: "Home", 
    																																				 url: '_Content/homePage.php',
    																																				 loadOnce: true}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_findEvent", 		{title: "Find Event", 
    																																				 scripts: true,
    																																				 url: '_Content/findEventPage.php'}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_RSVP", 				{title: "RSVP", 
    																																				 scripts: true,
    																																				 url: '_Content/rsvpPage.php'}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_contact", 			{title: "Contact Us",
    																																				 url: '_Content/contactPage.php',
    																																				 loadOnce: false,
     																																				 scripts: true}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_myProfile", 		{title: "My Profile",
    																																				 url: '_Content/myProfilePage.php'}));
    
    				layout.add("center", new CP("mainPageLayout_tabs_manageEvents",	{title: "Manage Events"}));
    
    				layout.getRegion('center').showPanel('mainPageLayout_tabs_home');
    				layout.endUpdate();
    				<?php
    				if($loggedIn)
    				  echo "MainLayout.showLoggedInTabs();";				
    				else
    				  echo "MainLayout.showLoggedOutTabs();";
    				?>				
    			},
    			showLoggedInTabs : function()
    			{
    				layout.getRegion('center').showPanel('mainPageLayout_tabs_home');
    				layout.getRegion('center').getTabs().enableTab('mainPageLayout_tabs_myProfile');
    				layout.getRegion('center').getTabs().enableTab('mainPageLayout_tabs_manageEvents');				
    			},
    			showLoggedOutTabs : function()
    			{
    				layout.getRegion('center').showPanel('mainPageLayout_tabs_home');			
    				layout.getRegion('center').getTabs().disableTab('mainPageLayout_tabs_myProfile');
    				layout.getRegion('center').getTabs().disableTab('mainPageLayout_tabs_manageEvents');				
    			}
    		};
    	}();
    The page being loaded for Contact Us (ContactPage.php)
    Code:
    <script type="text/javascript">
    	var contactButton = function()
    	{
    		
    	  return {
    			init : function()
    			{
    			  var button = new Ext.Button('contactBtn', {text: 'Send Message', tooltip: 'Send Message'});
    				button.on('click', contactButton.sendMessage, contactButton);
    				button.show();
    			},
    			sendMessage : function()
    			{
    			  
    				var transmit = new Ext.UpdateManager('mainPageLayout_tabs_contact');
    				transmit.update({
    													url: '_Activities/sendMessage.php', 
    													params: {contactName: Ext.get('contactName').dom.value,
    													  			 contactEmail: Ext.get('contactEmail').dom.value,
    																	 theMessage: Ext.get('message').dom.value,
    																	 verify_code: Ext.get('verify_code').dom.value,
    																	 hid_code: Ext.get('hid_code').dom.value
    																	},
    													scripts: true
    												});
    			}
    
    		};
    	}();	
    </script>
    <script type="text/javascript">alert('here');</script>
    
    <table width = "100%" cellspacing = "1" cellpadding = "1">
      <tr valign = "middle">
    	  <td align = "center">
    		  <table width = "500" cellspacing = "1" cellpadding = "1" bgcolor="5B70CC" style = "font-size: 12px;" border = "1">
    			  <tr bgcolor="8284AF">
    				  <td align = "center" style = "color: ffffff; line-height: 21px;">
    						CONTACT
    					</td>
    				</tr>
    				<tr bgcolor="#F2F4FD">
    				  <td>
    						<form name = "frm_contactUs">
    							<input type = "hidden" id = "hid_code" value = "<?php echo $image_code; ?>">
    						  <table width = "100%" cellspacing = "1" cellpadding = "5" style = "font-size: 12px; color: 4e7dff;">
    							  <tr style = "line-height: 24px;">
    								  <td align = "right" width = "25%">Name: </td>
    									<td width = "75%" ><input type = "text" size = "50" id = "contactName" class = "form-field" onFocus = "this.className = 'form-field-focus';" onBlur = "this.className = 'form-field';"></td>
    								</tr>
    							  <tr style = "line-height: 24px;">
    								  <td align = "right" width = "25%">E-Mail: </td>
    									<td width = "75%" ><input type = "text" size = "50" id = "contactEmail" class = "form-field" onFocus = "this.className = 'form-field-focus';" onBlur = "this.className = 'form-field';"></td>
    								</tr>
    							  <tr valign = "top">
    								  <td align = "right" width = "25%">Message: </td>
    									<td width = "75%" ><textarea rows = "10" cols = "45" id= "message" class = "form-field" onFocus = "this.className = 'form-field-focus';" onBlur = "this.className = 'form-field';"></textarea></td>
    								</tr>
    								<tr valign = "top">
    									<td align = "center" colspan = "2">
    										<img src = "_Security/sec_image.php?word=<?php echo $image_code; ?>" title = "Human Verification Image">
    									</td>
    								</tr>
    								<tr valign = "top">
    									<td align = "center" colspan = "2">
    										<input type = "text" class = "form-field" onFocus = "this.className = 'form-field-focus';" onBlur = "this.className = 'form-field';" size = "10" title = "Human Verification Code" id = "verify_code" maxlength = "5">
    										<hr>
    									</td>
    								</tr>
    							  <tr>
    								  <td colspan = "2" align = "center">
    <div id="contactBtn"></div></td>
    								</tr>
    							</table>
    						</form>
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>
    <script type="text/javascript">
      Ext.EventManager.onDocumentReady(contactButton.init, contactButton, true);
    </script>
    Any help is greatly appreciated

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Did you try setting a BP in the Element.update and see if perhaps there's a problem with the script evaluation?

  3. #3
    Ext User RSidetrack's Avatar
    Join Date
    Mar 2007
    Location
    Pennsylvania
    Posts
    24
    Vote Rating
    0
    RSidetrack is on a distinguished road

      0  

    Default


    Quote Originally Posted by tryanDLS
    Did you try setting a BP in the Element.update and see if perhaps there's a problem with the script evaluation?
    There doesn't seem to be an error occurring that I can see.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Take a look at the end of this thread and see if it helps http://www.jackslocum.com/forum/viewtopic.php?t=2416

  5. #5
    Ext User RSidetrack's Avatar
    Join Date
    Mar 2007
    Location
    Pennsylvania
    Posts
    24
    Vote Rating
    0
    RSidetrack is on a distinguished road

      0  

    Default


    Quote Originally Posted by tryanDLS
    Take a look at the end of this thread and see if it helps http://www.jackslocum.com/forum/viewtopic.php?t=2416
    I looked through it all, and everything appears to be in order. I even checked the DOM out, everything looks fine HTML wise. I just don't understand what changed between alpha 1 and alpha 2 to suddenly make it stop working.

    Edit: I did put this code in after intializing the content panels and it works, the question is why doesn't the scripts: true; attribute work?
    Code:
    Ext.get("mainPageLayout_tabs_contact").getUpdateManager().loadScripts = true;

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    You're setting scripts:true on your CP - that's a UpdateManager config. Maybe you had a global setting before and removed it?

Similar Threads

  1. Tabpanel and Load Scripts
    By JC in forum Ext 1.x: Help & Discussion
    Replies: 16
    Last Post: 14 Jan 2007, 12:05 AM
  2. Different Titles for Region and Content Panels
    By manugoel2003 in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 7 Jan 2007, 9:08 PM
  3. NullReferenceException running JSB 1.1
    By brian.moeskau in forum Sencha Cmd
    Replies: 1
    Last Post: 3 Dec 2006, 12:39 PM
  4. Toolbar up and running but handlers not working.
    By devol in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 17 Oct 2006, 3:18 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi