Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 116/2373 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • asp.net menu control css for child items

    - by Andres
    I have an asp.net menu control which the child items(submenu) width is tied to its parent's width, I was wondering is there a work around? because some of the titles for the submenu are longer than the title of the parent so it looks all smooshed together and just horrible on the eyes. Any help is much appreciated. :) .net control: <asp:Menu ID="navigation" runat="server" Orientation="Horizontal" CssClass="topmenu" MaximumDynamicDisplayLevels="20" IncludeStyleBlock="false"> <DynamicSelectedStyle /> <DynamicMenuItemStyle /> <DynamicHoverStyle /> <DynamicMenuStyle /> <StaticMenuItemStyle /> <StaticSelectedStyle /> <StaticHoverStyle /> </asp:Menu> html rendered: <div class="topmenu" id="navigation"> <ul class="level1"> <li><a class="popout level1" href="dashboard.aspx?option=1">Seguridad</a> <ul class="level2"> <li><a class="level2" href="security/users.aspx?option=15">Usuarios</a></li> <li><a class="level2" href="security/profiles.aspx?option=16">Perfiles</a></li> <li><a class="level2" href="security/options.aspx?option=17">Opciones</a></li> <li><a class="level2" href="security/actions.aspx?option=18">Acciones</a></li> </ul> </li> </ul> </div> css: div.topmenu{} div.topmenu ul { list-style:none; padding:5px 0; margin:0; background: #0b2e56; } div.topmenu ul li { float:left; padding:10px; color: #fff; height:16px; z-index:9999; margin:0; } div.topmenu ul li a, div.menu ul li a:visited{ color: #fff; } div.topmenu ul li a:hover{ color:#fff; } div.topmenu ul li a:active{color:#fff; } thats what I have and the styling works i just need help in getting submenus to expand if they are bigger than main title. Thanks in advance!

    Read the article

  • Exceptions thrown in jQuery AJAX callbacks swallowed?

    - by MikeWyatt
    Is there any way to handle exceptions thrown from AJAX callbacks in jQuery, other than adding a try..catch block to each callback? The error function is not called in this situation. $.ajax( { url: 'myurl.rails', success: function( data ) { throw 'Oh no!'; }, error: function ( xhr, textStatus, errorThrown ) { console.log( 'AJAX call failed', xhr, textStatus, errorThrown ); } } );

    Read the article

  • Executing javascript script after ajax-loaded a page - doesn't work

    - by Deukalion
    I'm trying to get a page with AJAX, but when I get that page and it includes Javascript code - it doesn't execute it. Why? Simple code in my ajax page: <script type="text/javascript"> alert("Hello"); </script> ...and it doesn't execute it. I'm trying to use Google Maps API and add markers with AJAX, so whenever I add one I execute a AJAX page that gets the new marker, stores it in a database and should add the marker "dynamically" to the map. But since I can't execute a single javascript function this way, what do I do? Is my functions that I've defined on the page beforehand protected or private? ** UPDATED WITH AJAX FUNCTION ** function ajaxExecute(id, link, query) { if (query != null) { query = query.replace("amp;", ""); } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { if (id != null) { document.getElementById(id).innerHTML=xmlhttp.responseText; } } } if (query == null) { xmlhttp.open("GET",link,true); } else { if (query.substr(0, 1) != "?") { xmlhttp.open("GET",link+"?"+query,true); } else { xmlhttp.open("GET",link+query,true); } } xmlhttp.send(); }

    Read the article

  • Ajax success function firing before java class responds

    - by user1899281
    I am creating a login function with ajax and am having an issue where the success function (SuccessLogin) fires before getting an ajax response. I am running the code as google web app from eclipse and I can see when debugging the java class file, that the javascript is throwing an alert for the success response from the class being false before the debugger catches the break point in the class file. I have only been writing code for a couple months now so I am sure its a stupid little error on my part. $(document).ready(function() { sessionChecker() // sign in $('#signInForm').click(function () { $().button('loading') var email = $('#user_username').val(); sessionStorage.email = $('#user_username').val(); var password= $('#user_password').val(); var SignInRequest = { type: "UserLoginRequest", email: email, password: password } var data= JSON.stringify(SignInRequest); //disabled all the text fields $('.text').attr('disabled','true'); //start the ajax $.ajax({ url: "/resources/user/login", type: "POST", data: data, cache: false, success: successLogin(data) }); }); //if submit button is clicked $('#Register').click(function () { $().button('loading') var email = $('#email').val(); if ($('#InputPassword').val()== $('#ConfirmPassword').val()) { var password= $('input[id=InputPassword]').val(); } else {alert("Passwords do not match"); return ;} var UserRegistrationRequest = { type: "UserRegistrationRequest", email: email, password: password } var data= JSON.stringify(UserRegistrationRequest); //disabled all the text fields $('.text').attr('disabled','true'); //start the ajax $.ajax({ url: "/resources/user/register", type: "POST", data: data, cache: false, success: function (data) { if (data.success==true) { //hide the form $('form').fadeOut('slow'); //show the success message $('.done').fadeIn('slow'); } else alert('data.errorReason'); } }); return false; }); }); function successLogin (data){ if (data.success) { sessionStorage.userID= data.userID var userID = data.userID sessionChecker(userID); } else alert(data.errorReason); } //session check function sessionChecker(uid) { if (sessionStorage.userID!= null){ var userID = sessionStorage.userID }; if (userID != null){ $('#user').append(userID) $('#fat-menu_1').fadeOut('slow') $('#fat-menu_2').append(sessionStorage.email).fadeIn('slow') }; }

    Read the article

  • How to handle redirection in an Ajax based application

    - by nimo
    hi all, I'm developing a Ajax based php application. As anybody knows, I'm checking whether user is logged in every php file as the first statement. And there are two ways that I should response in an event of logging failure, server redirect to the login page using header(url). CASE: If user directly enter a particular URL passing url in Ajax response asking client side page redirection or notification CASE: If user trying to perform some action through a Ajax request So my question is how can identify whether request coming from client side is a Ajax call or not ? If I know that I can handle my response accordingly. OR Is there a better way of handling above scenario ? Thank You

    Read the article

  • Parsing the response from a jQuery ajax form post

    - by GrahamB
    I am successfully posting a form via ajax, using the following code; $.post( "Page.do?source=ajax", $("#Form").serialize(), function(data){ } The data response that comes back can be alert'd. I can see that it is the HTML of the entire form, having been submitted. But, I am having trouble accessing an element in that form which has come via ajax, ie data.find('.Errors').html() or $('.Errors', data).html() Do I need to somehow convert the text into a DOM which can then be parsed by jQuery?

    Read the article

  • AJAX PopupControl Extender with Bing Maps

    - by Morano88
    Hey! I want to use AJAX PopupControl Extender with a text box so when a user clicks on the text box a popup that contains the Bing Map appears. I'm using the following code but I don't know why it is not working ? <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="14px" Text="Click inside the textbox to open AJAX Popup Control:"></asp:Label> <div class="clear"><br /></div> <asp:TextBox ID="TextBox1" CssClass="textbox" runat="server" Width="200px"></asp:TextBox> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script> <script type="text/javascript"> var map = null; function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false); } </script> </head> <body onload="GetMap();"> <div id='myMap' style="position:relative; width:400px; height:400px;"></div> </body> </html> <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" CommitProperty="foreColor" Position="Right" TargetControlID="TextBox1" PopupControlID="myMap" OffsetX="2" OffsetY="2"> </ajaxToolkit:PopupControlExtender> what's wrong ?

    Read the article

  • AJAX works fine in firefox, but malfunctions in Mozilla Prism 0.9

    - by Babiker
    I have the following ajax fucntion: function ajax(value, url, urlVarname, displayContainers_id){ if(value == ''){ document.getElementById(displayContainers_id).innerHTML=''; } /* THIS IS LINE 12*/ xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ document.getElementById(displayContainers_id).innerHTML=xmlhttp.responseText; } } xmlhttp.open('GET',url + '?varName=' + urlVarname + '&value=' + value, true); /* THIS IS LINE 25 */ xmlhttp.send(); } onmousedown="ajax(document.getElementById('searchParamater').value, 'http://192.168.0.7/controllers/search_controller.php', document.getElementById('searchBy').value, 'ajaxBucket')"> This whole thing works fine in firefox but when i use prism 0.9, it malfunctions and i get the following error in the errors console: Warning: assignment to undeclared variable xmlhttp Source File: http://192.168.0.7/javascript/main.js Line: 12 Error: uncaught exception: [Exception... "Not enough arguments [nsIXMLHttpRequest.send]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://192.168.0.7/javascript/main.js :: ajax :: line 25" data: no]

    Read the article

  • JQUERY Loop from a AJAX Response

    - by nobosh
    I'm building a tagger. After a user submits a tag, ajax returns: {"returnmessage":"The Ajax operation was successful.","tagsinserted":"BLAH, BLOOOW","returncode":"0"} I want to take the tagsinserted and loop through it, and during each loop take the item in the list and insert it on the HTML page. suggestion on how to do this right? Here is the current code: $("#tag-post").click(function(){ // Post $('#tag-input').val() $.ajax({ url: '/tags/ajax/post-tag/', data: { newtaginput : $('#tag-input').val(), userid : $('#userid').val()}, success: function(data) { // After posting alert('done'); } }); });

    Read the article

  • ASP .net MVC Invoking default controller and action vs Setting a startup page

    - by SARAVAN
    Hi, I am developing code on the sample ASP .net MVC template provided by VS2010. The first time I ran the code without adding anything, the index.aspx page was invoked which is expected. But for some reasons I added a login.aspx and then accidentally set that as a startup page. Now when I ran the application the default startup url look like http://localhost/Views/login.aspx. I am thinking this is not a valid MVC routing path and I get the requested resource cannot be found error. I am not sure how to revert this back and make sure the default ../home/index is invoked. Can any one throw some light on this? Also should I not set the startup page as we do in asp .net webforms?

    Read the article

  • DWR and other possible tools for build java application level Ajax framework

    - by Fazal
    I would assume that this question would have been asked in different ways already, but I could not find one so posting it. Sorry if its a repetition The basic idea which I am trying to explore is to design a common Ajax framework/API for our application. The main requirement is to have a common framework in the product which every module in the application can call whenever it needs to provide Ajax behavior. We basically have a page based application and not everything would be Ajax for sure. Mostly it will be smaller pieces of work which Ajax will handle. We have used GWT and it works great. But we have some constraints because of which certain areas in the application need to build standard jsp and html pages only I know little bit about dwr and it looks very promising (as even answered by some people). I wanted to know what are the other possible frameworks like dwr which I can evaluate too, before making the decision

    Read the article

  • Best way to structure AJAX for a Zend Framework application

    - by John Nall
    Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible. I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logistics of some process I'll have to edit the AJAX controllers and the normal controllers. So ideally I would load the exact same actions for both javascript and non-javascript users. I have thought about maybe checking for $_POST['ajax'], if it is set I would load a different (json'y) view for the data. Was wondering how/a good way to do this (front controller plugin I imagine?) or if someone can point me to an UP TO DATE tutorial that describes a really good way for building a larger ajax application. thx

    Read the article

  • Cache AJAX requests

    - by Willem
    I am sending AJAX GET-requests to a PHP application and would like to cache the request returns for later use. Since I am using GET this should be possible because different requests request different URLs (e.g. getHTML.php?page=2 and getHTML.php?page=5). What headers do I need to declare in the PHP-application to make the clients browser cache the request URL content in a proper way? Do I need to declare anything in the Javascript which handles the AJAX-request (I am using jQuery's $.ajax function which has a cache parameter)? How would I handle edits which change the content of e.g. getHTML.php?page=2 so that the client doesn't fall back to the cached version? Adding another parameter to the GET request e.g. getHTML.php?page=2&version=2 is not possible because the link to the requested URL is created automatically without any checking (which is preferably the way I want it to be). How will the browser react when I try to AJAX-request a cached request URL? Will the AJAX-request return success immediately? Thanks Willem

    Read the article

  • Question regarding Ajax Hacking

    - by Vincent
    All, I have a PHP website written in Zend Framework and MVC. Most of the controller actions check if the request is an Ajax request or not, else they redirect the user to home page. I am thinking about various ways to break that site. I am considering the following scenario: A user creates his own PHP project on his Local machine. User writes a JQuery ajax post request to one of the controllers on my site and tries to post malicious info. Ex: $.ajax({ type: 'POST', url: "https://marketsite/getinfo/getstuff", cache: false, dataType: "html", success: function(html_response){ alert(html_response); }, error: function(xhr,ajaxOptions,errorThrown){ alert(errorThrown); } }); My Question is does "url" attribute in the ajax request above take absolute path? I know it takes relative path. Also, is it possible to break any site by sending such requests? Thanks

    Read the article

  • Jquery click function does not load ajax tabs

    - by user342391
    I have some tabs that load ajax content. When I click on the tabs it loads the ajax content perfectly no issues works exactly like it does in the Jqueryui demos. But when I try and change tab using an onclick function it opens the tab but doesn't do the ajax. Is this a known issue can it be done?? Do ajax tabs rely on the user clicking the href to know what to load. This is the code: $(".step2next").click(function() $('#signuptabs').tabs("select" , 1));

    Read the article

  • Monitor AJAX calls via cURL

    - by iamdadude
    Is it possible to monitor a page's AJAX calls via cURL in PHP? For example, if I connect to a website that uses lots of AJAX to pull content, can I connect to the site via cURL, have it wait a couple of seconds until the AJAX requests are done and analyze the request that the site made?

    Read the article

  • Content pulled in via jQuery AJAX is not associating with previous functions

    - by Jarsen
    I'm using the jquery .load() function to pull in data to populate a div with. The content I'm pulling in has CSS selectors that should match up with jQuery click functions I've written. However, when I load in the data, although the correct CSS selectors are there, when I click on areas that should invoke a response from jQuery, nothing happens. Do I need to do some sort of reload? Here's the code I've got for the jQuery AJAX: $(document).ready(function() { // AJAX functionality for drupal nodes $(".ajax_node").click(function() { var ajax_src = $(this).attr("href"); // we're gonna load the href // empty target div and load in content // the space in the string before the #id is necessary $("#ajax_area").empty().load(ajax_src + " #ajax_wrapper"); return false; // stops the link from following through }); // General AJAX fucntionality $(".ajax").click(function() { var ajax_src = $(this).attr("href"); $("#ajax_area").empty().load(ajax_src); return false; }); });

    Read the article

  • Any Sercurity issues in ajax dll

    - by lokendra singh
    Hi Friends I am using ajax dll in my application for smooth working but i have some doubt in my mind ? is there any security problem in server when we are using ajax dll in my application. means any one can missuse the application because we are using public memthods in ajax dll. Any one suggest me, thanks in advance Lokendra

    Read the article

  • PHP & AJAX SEO - For users with javascript and non javascript

    - by RussellHarrower
    So I understand this may come across as a open question, but I need away to solve this issue. I can either make the site do ajax request that load the body content, or I can have links that re-loads the whole page. I need the site to be SEO compliant, and I would really like the header to not re-load when the content changes, the reason is that we have a media player that plays live audio. Is there away that if Google BOT or someone without ajax enabled it does the site like normal href but if ajax or javascript allowed do it the ajax way.

    Read the article

  • disabling dropdownlist inside a gridview based on value selected on another dropdownlist inside the gridview from javascript or jquery

    - by Joy
    what i m trying is i hav two dropdownlists inside the gridview... namely say ddonsiteoffsite and ddhours... now what i want is if the selectedtext of ddonsiteoffsite is "onsite" the ddhours should b disabled... i tried the code snippet but ... its not disabling the ddhours... can someone help me please.. <asp:TemplateColumn HeaderText=" OnSite/OffSite" > <ItemTemplate> <asp:DropDownList ID="ddOnsiteOffside" runat="server" onchange="ToggleOnOff(this)"><asp:ListItem Text = "Offsite" Value="Offsite"></asp:ListItem> <asp:ListItem Text = "Onsite" Value="Onsite"></asp:ListItem> </asp:DropDownList> </ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn> <ItemTemplate> <asp:DropDownList ID="ddhours" runat="server"> <asp:ListItem Text = "1" Value="1" ></asp:ListItem> <asp:ListItem Text = "2" Value="2" ></asp:ListItem> <asp:ListItem Text = "3" Value="3" ></asp:ListItem> <asp:ListItem Text = "4" Value="4" ></asp:ListItem> <asp:ListItem Text = "5" Value="5" ></asp:ListItem> <asp:ListItem Text = "6" Value="6" ></asp:ListItem> <asp:ListItem Text = "7" Value="7" ></asp:ListItem> <asp:ListItem Text = "8" Value="8" ></asp:ListItem> <asp:ListItem Text = "9" Value="9" ></asp:ListItem> </asp:DropDownList> </ItemTemplate> </asp:TemplateColumn> and the corresponding javascript i am using is : enter code here function ToggleOnOff(ddonoff) { var row = chk.parentNode.parentNode; if(ddonoff.value=="Onsite") { row.getElementsByTagName("ddhours")[0].disabled = true; } else row.getElementsByTagName("ddhours")[0].disabled = false; } can someone help to achieve this ?? using javascript or jquery ? i m not understanding where i went wrong ...

    Read the article

  • Not able to send POST request through jQuery Ajax

    - by Amit
    Hi, I was trying to send an ajax request as POST request. But when i verified it on httpFox on firefox, the request is sent as GET. I tried pbht $.ajax() and $.post(). Many had a query regarding the same and had missed the "type" in $.ajax(), but even if i mention the type as "POST", the request will be of type GET. Here is my code: $('.test').click(function(){ alert("clicked"); $.ajax({ type: "POST", url: "www.testsite.com", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); }); Any idea why it happens?

    Read the article

  • ASP.Net Architecture Specific to Shared/Static functions

    - by Maxim Gershkovich
    Hello All, Could someone please advise in the context of a ASP.Net application is a shared/static function common to all users? If for example you have a function Public shared function GetStockByID(StockID as Guid) as Stock Is that function common to all current users of your application? Or is the shared function only specific to the current user and shared in the context of ONLY that current user? So more specifically my question is this, besides database concurrency issues such as table locking do I need to concern myself with threading issues in shared functions in an ASP.Net application? In my head; let’s say my application namespace is MyTestApplicationNamespace. Everytime a new user connects to my site a new instance of the MyTestApplicationNamespace is created and therefore all shared functions are common to that instance and user but NOT common across multiple users. Is this correct?

    Read the article

  • Approaches to timing out sessions on a web app using AJAX autorefreshes

    - by Braintapper
    I'm writing a web application that autorefreshes data with an AJAX call at set intervals. Because it's doing that, server side user sessions never time out, since the last activity is refreshed with every ajax call. Are there good client side rules I could implement to time out the user? I.e. should I track mouse movements in the browser, etc., or should I point the AJAX calls to URLs that don't refresh the session? I like that my AJAX calls hit a session-enabled URL, because I can also validate that the user is logged in, etc. Any thoughts in terms of whether I should even bother timing out the users?

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >