Search Results

Search found 124 results on 5 pages for 'pageload'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • ASP.NET Master Page + pageLoad() = kills jquery?

    - by Clay Angelly
    In my MasterPage, I have a ScriptManager that has a ScriptReference to my jquery.js file. This has always worked with no problems, all content pages that utilize jquery work fine. Recently, I added the following javascript script block at the end of my MasterPage: function pageLoad(sender, args) { } By simply adding the above pageLoad method, no jquery code is executed from any of my content pages. Why would just having a pageLoad in the Master Page have this effect? Thanks in advance for any insight.

    Read the article

  • how can I prevent my SESSION to be overwritten on pageLoad of my MasterPage

    - by Darkyo
    I'm new to asp world, and I have to keep my new job :) Switching form php to asp.net 3.5 (never used before). What would be the best practice for storing a SESSION variable in my project ? How can I prevent my SESSION to be overwritten if my initialisation code is in the onPageLoad method of my MasterPage ? My variables keeps beeing overwritten, please someone help me and tell me if there is any other solution than dealing with this pageLoad problem. Thank you all

    Read the article

  • jquery validate - validating a field on pageload

    - by boz
    Hi there, I've got an input field on my plain html form that I would like to be marked as invalid (and the error message shown) from the moment the page loads. Is this possible to do with the jquery validate plugin? Failing that, how can I hide an element when the plugin tries to validate a particular input field?

    Read the article

  • Populate text box with JavaScript on PageLoad

    - by Etienne
    I have a text box called txtName on my form. In my page I know I need to place the code in my HEAD tag like so...... <script type='text/javascript' language="javascript"> document.forms['FormName'].elements['txtName'].value = "Robert" </script> But I cant seem to set a value inside my text box.

    Read the article

  • Changing CSS before pageload with Greasemonkey

    - by JP
    I need to hide an element on the page using greasemonkey before it loads (so that it's never visible). At the moment I'm @requireing jQuery 1.3.2 which I'm reasonably familiar with, but I'm unsure how it interacts with greasemonkey so I don't know how to pull this off! Many thanks, JP

    Read the article

  • Image on mouseover takes space on PageLoad.

    - by Ram
    Hello, I am trying to show an image on Mouseover and hide it on Mouseout. I am successful in mouseover and mouseout but the image is actually taking the space around the text though i have visibility as hidden.. The text is surrounded with the space of image but the image is displayed on mouseover. Here is the code: <td valign="middle" class="table_td td top" style="width: 347px"> <div id="Style16" style="position:relative; height:100%; left:50%; bottom:700%; visibility:hidden; border:solid 0px #CCC; padding:5px"><img src="images/window-decal-image.gif"></div> <span class="feature_text" style="cursor:pointer" onmouseover="ShowPicture('Style16',1)" onmouseout="ShowPicture('Style16',0)" id="a16">Storefront Window Decal</span> <span class="feature_text_small">(5"x3.5" double sided decal)</span></td> <script language="javascript" type="text/javascript"> function ShowPicture(id,Source) { var vis, elem; if (1 == Source) { vis = "visible"; } else if (0 == Source) { vis = "hidden"; } else { throw new RangeError("Unknown Flag"); } if (elem = document.getElementById(id)) { elem.style.visibility = vis; } else { throw new TypeError("Element with id '"+id+"' does not exist."); } return vis; } </script>

    Read the article

  • Telerik RadGrid doesn't display on first Page_Load but does on postback

    - by Mark
    I have a page with a drop-down. Based on the selection in the drop-down, data gets loaded and populates a RadGrid. I am using a custom user control for the EditTemplate, so I can't use radGrid.DataBind(). Instead, I have to use radGrid.MasterTableView.Rebind() in association with a NeedDataSource event handler. My problem is that when I load the page initially, I populate the drop-down and automatically select a value (first item in the list) which triggers the databinding on the RadGrid. I can step through the code in debug mode and see that the grid is being populated with data, but when the page displays, it doesn't get rendered. When I then manually choose an item from the drop-down, which triggers the same grid databinding code, it displays properly the second time. How do I get it to display the grid the first time the page loads?

    Read the article

  • jQuery trigger mouseover function when page loads with the mouse over the element

    - by Gal V
    Hello all, I have an ASP.NET document, with an Image element within it. I created a mouseover function on this image element and it's working fine. The question is: If the mouse is ALREADY over the element when the document loads itself, the mouseover function doesn't trigger (I need to mouseout and then mouseover again in order to trigger it). Is there any way to check in the $(document).ready function if the mouse is already on top of this element? and if yes- trigger the mouseover function. Thanks all!

    Read the article

  • .net ViewState in page lifecycle

    - by caltrop
    I have a page containing a control called PhoneInfo.ascx. PhoneInfo is dynamically created using LoadControl() and then the initControl() function is called passing in an initialization object to set some initial textbox values within PhoneInfo. The user then changes these values and hits a submit button on the page which is wired up to the "submit_click" event. This event invokes the GetPhone() function within PhoneInfo. The returned value has all of the new user entered values except that the phoneId value (stored in ViewState and NOT edited by the user) always comes back as null. I believe that the viewstate is responsible for keeping track of user entered data across a postback, so I can't understand how the user values are coming back but not the explicitly set ViewState["PhoneId"] value! If I set the ViewState["PhoneId"] value in PhoneInfo's page_load event, it retrieves it correctly after the postback, but this isn't an option because I can only initialize that value when the page is ready to provide it. I'm sure I am just messing up the page lifecycle somehow, any suggestion or questions would really help! I have included a much simplified version of the actual code below. Containing page's codebehind protected void Page_Load(object sender, EventArgs e) { Phone phone = controlToBind as Phone; PhoneInfo phoneInfo = (PhoneInfo)LoadControl("phoneInfo.ascx"); //Create phoneInfo control phoneInfo.InitControl(phone); //use controlToBind to initialize the new control Controls.Add(phoneInfo); } protected void submit_click(object sender, EventArgs e) { Phone phone = phoneInfo.GetPhone(); } PhoneInfo.ascx codebehind protected void Page_Load(object sender, EventArgs e) { } public void InitControl(Phone phone) { if (phone != null) { ViewState["PhoneId"] = phone.Id; txt_areaCode.Text = SafeConvert.ToString(phone.AreaCode); txt_number.Text = SafeConvert.ToString(phone.Number); ddl_type.SelectedValue = SafeConvert.ToString((int)phone.Type); } } public Phone GetPhone() { Phone phone = new Phone(); if ((int)ViewState["PhoneId"] >= 0) phone.Id = (int)ViewState["PhoneId"]; phone.AreaCode = SafeConvert.ToInt(txt_areaCode.Text); phone.Number = SafeConvert.ToInt(txt_number.Text); phone.Type = (PhoneType)Enum.ToObject(typeof(PhoneType), SafeConvert.ToInt(ddl_type.SelectedValue)); return phone; } }

    Read the article

  • Multiple WCF calls for a single ASP.NET page load

    - by Rodney Burton
    I have an existing asp.net web application I am redesigning to use a service architecture. I have the beginnings of an WCF service which I am able to call and perform functions with no problems. As far as updating data, it all makes sense. For example, I have a button that says Submit Order, it sends the data to the service, which does the processing. Here's my concern: If I have an ASP.NET page that shows me a list of orders (View Orders page), and at the top I have a bunch of drop down lists for order types, and other search criteria which is populated by querying different tables from the database (lookup tables, etc). I am hoping to eventually completely decouple the web application from the DB, and use data contracts to pass information between the BLL, the SOA, and the web app. With that said, how can I reduce the # of WCF calls needed to load my "View Orders" page? I would need to make 1 call get the list of orders, and 1 call for each drop down list, etc because those are populated by individual functions in my BLL. Is it good architecture to create a web service method that returns back a specialized data contract that consists of everything you would need to display a View Orders page, in 1 shot? Something like this pseudocode: public class ViewOrderPageDTO { public OrderDTO[] Orders { get; set; } public OrderTypesDTO[] OrderTypes { get; set; } public OrderStatusesDTO[] OrderStatuses { get; set; } public CustomerListDTO[] CustomerList { get; set; } } Or is it better practice in the page_load event to make 5 or 6 or even 15 individual calls to the SOA to get the data needed to load the page? Therefore, bypassing the need for specialized wcf methods or DTO's that conglomerate other DTO? Thanks for your input and suggestions.

    Read the article

  • jQuery: List expands on page load

    - by Hasanah
    I've been looking for something very simple: How to make a side navigation expand with animation on page load, but all the tutorial websites I usually go to don't seem to have it. The closest I could find is this jQuery sample: http://codeblitz.wordpress.com/2009/04/15/jquery-animated-collapsible-list/ I've managed to strip down the list like so: <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(function(){ $('li') .css('pointer','default') .css('list-style','none'); $('li:has(ul)') .click(function(event){ if (this == event.target) { $(this).css('list-style', (!$(this).children().is(':hidden')) ? 'none' : 'none'); $(this).children().toggle('slow'); } return false; }) .css({cursor:'pointer', 'list-style':'none'}) .children().hide(); $('li:not(:has(ul))').css({cursor:'default', 'list-style':'none'}); }); <body> <fieldset> <legend>Collapsable List Demo</legend> <ul> <li>A - F</li> <li>G - M <ul> <li>George Kent Technology Centre</li> <li>Hampshire Park</li> <li>George Kent Technology Centre</li> <li>Hampshire Park</li> </ul> </li> <li> N - R </li> <li>S - Z</li> </ul> </fieldset> My question is: Is there any way to make this list expand on page load instead of on click? I also don't need it to collapse at all; basically I need only the animating expansion. Thank you for your time and advice. :)

    Read the article

  • where is the best place to place a javascript snippet to alter the DOM of a page before it renders

    - by icepack
    I have a few dynamic pages and I want to alter certain elements before the page has fully rendered. My snippet is something like document.body.getElementById("change").innerHTML = "<img src..."; I do not have access to change the content server side. Where is the best place to put the snippet to have the code run before the page it has rendered? Rather, is putting the javascript in either the HEAD (inside the window.onload event?) or before the closing BODY(not inside an event listener) optimal?

    Read the article

  • Sign out button reloads all user controls

    - by eych
    I have an aspx page with several user controls (ascx) as well as an asp:button for signing out. The click event of the button clears the session and does a response.redirect to the login page. However, before the click event is called, since the page posts back, all of the Page_Load events run for all of the controls. What is the best way to have the click event code run without unnecessary reloading of all user controls?

    Read the article

  • Greasemonkey script not executed when unusual content loading is being used

    - by Sam Brightman
    I'm trying to write a Greasemonkey script for Facebook and having some trouble with the funky page/content loading that they do (I don't quite understand this - a lot of the links are actually just changing the GET, but I think they do some kind of server redirect to make the URL look the same to the browser too?). Essentially the only test required is putting a GM_log() on its own in the script. If you click around Facebook, even with facebook.com/* as the pattern, it is often not executed. Is there anything I can do, or is the idea of a "page load" fixed in Greasemonkey, and FB is "tricking" it into not running by using a single URL? If I try to do some basic content manipulation like this: GM.log("starting"); var GM_FB=new Object; GM_FB.birthdays = document.evaluate("//div[@class='UIUpcoming_Item']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (i = GM_FB.birthdays.snapshotLength - 1; i >= 0; i--) { if (GM_FB.birthdayRegex.test(GM_FB.birthdays.snapshotItem(i).innerHTML)) { GM_FB.birthdays.snapshotItem(i).setAttribute('style','font-weight: bold; background: #fffe88'); } } The result is that sometimes only a manual page refresh will make it work. Pulling up the Firebug console and forcing the code to run works fine. Note that this isn't due to late loading of certain parts of the DOM: I have adding some code later to wait for the relevant elements and, crucially, the message never gets logged for certain transitions. For example, when I switch from Messages to News Feed and back.

    Read the article

  • Saving Variables In An ASP Page

    - by Or Betzalel
    I'm trying to convert a game I made (WindowsFormApplication) to an ASP Page. My Problem is that I have a lot "private" variables in my WindowFormApplication and those variables are important for the game. But when after I Declare all my variables (in my Page_Load), they turn null no matter what I do(click a button, refresh the page). Is there anyway to save my variables between buttons (other than Session, because I'd have to create like 6 more sessions)

    Read the article

  • Run a javascript function on script load

    - by user188870
    I am using jQuery. I keep all of my function definitions wrapped in the $(document).ready event in application.js. I have a function from it that I would like to call somewhere in the body of the page I am working on. I was wondering if there is some alternative to the .ready event that will work on a script load. Ideally I would like to do something like: $('application.js').ready( call function ); In the jQuery documentation it only mentions the $(document).ready call but I was wondering if this can be altered or if there is some plain javascript alternative.

    Read the article

  • get data from a querystring

    - by regwe
    i have this querystring that shall open up my page. http://www.a1-one.com/[email protected]&stuid=123456 Now when this page loads, on page_load, I want to pick up email and stuid in two different variables. So I can use them to insert into my database (sql server) how can this be done in vb.net

    Read the article

  • Page_load filling data after loading UserControl ASP.net

    - by msytNadeem
    I have an aspx Page that contain a userControl that contains textboxes. in the page_load method, it reads from the database, and i want to fill the textboxes of the usercontrol with the data been read. the problem i am facing, that the flow of page loading is Page_Load of the page, where i am assigning the text field, then it page_load of the userControl, so here all the data will be erased, then it will show the page. how i can fix this.

    Read the article

  • How to display default text "--Select Team --" in combo box on pageload in WPF?

    - by Aditya
    Hi, In a WPF app, in MVP app I have a combo box,for which I display the data fetched from Database. Before the items added to the Combo box, I want to display the default text such as " -- Select Team --" , so that on pageload it displays and on selecting it the text should be cleared and the items should be displayed. Selecting data from DB is happening. I need to display the default text until the user selects an item from combo box. Please guide me Thanks Ramm

    Read the article

  • if i have three checkboxes on my asp.net webform ..if 1 is already checked om pageload then..

    - by user559800
    if i have three checkboxes on my asp.net webform ..if 1 is already checked on pageload event then output in textbox would be 2,3 if 2 and three checkbox would be checked ...even after ... i want if the checkboxes are already checked on page load event we have to ignore that checkboxes .... and add recently checked checkboxes checkbox2 and checkbox3 will be entered in textbox 1 as 2,3 I WANT THIS IN VB.NET !!

    Read the article

  • Setting the focus of listboxItem on pageload in Silverlight.

    - by Subhen
    Hi, I want to set focus on the first item of the listbox , on pageload. I can not use : listArtist.SelectedIndex= as I navigate to another page on selected indexChanged. I have the following code , but it is not working: void Event_Completed(object sender, RMSResponseEventArgs e) { listArtist.ItemsSource = e.eOutData; listArtist.Focus(); }

    Read the article

1 2 3 4 5  | Next Page >