Search Results

Search found 23262 results on 931 pages for 'content analysis'.

Page 61/931 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Capturing Drupal7 DOM content before page load for comparison

    - by ehime
    We have an MU (Multisite) installation of Drupal7 here at work, and are trying to temporarily hold back the swarm of bots we receive until we get a chance to load our content. I wrote a quick and and dirty script to send 503 headers if we find a certain criteria in Xpath (This can ALSO be done as a strpos/preg_match if DOM is not formed). In order to get the ball rolling though I need to figure out how to either A) Hijack the Drupal7 bootstrap and pull all content through this filter below B) ob_flush content through the filter before content is loaded The issue that I am having is figuring out exactly where I can catch the content at? I thought that index.php in Drupal7 would be the suspect, but I'm a little confused as to where or how I should capture the contents. Here's the script, and hopefully someone can point me in the right direction. //error_reporting(-1); /* start query */ $dom = new DOMDocument; $dom->preserveWhiteSpace = false; $dom->Load($_SERVER['PHP_SELF']); $xpath = new DOMXPath($dom); //if this exists we aren't ready to be read by bots $query = $xpath->query(".//*[@id='block-views-about-this-site-block']/div/div/div"); //or $query = 'klat-badge'; //if this is a string not DOM /* end query */ if(strpos($query) !== false) { //require banlist require('botlist.php'); $str = strtolower('/'.implode('|', array_unique($list)).'/i'); if(preg_match($str, strtolower($_SERVER['HTTP_USER_AGENT']))) { //so tell bots we're broken header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); exit; } }

    Read the article

  • jQuery code in ajax loaded content only runs once

    - by Michael Howland
    I have been looking around SO for a while and haven't been able to find anything that matches my issue, which I'm not even sure I can explain that well, so take that for what it's worth. I have a page that loads content into a div via AJAX (using the .load() method). There are several links in the navigation, meaning the content will change while navigating the site without refreshing the entire page. (Actually, to be honest, I just cribbed the DocTemplate layout [http://css-tricks.com/examples/DocTemplate/] from css-tricks.com. Apparently while I'm not a re-invent the wheel type programmer, I am a bash my head against the wheel incessantly to get it to work programmer.) So, index.php loads up some DB content in a div. There is also a jQuery UI modal input form on index.php. Essentially, the only HTML on the page is an empty div and a form. This all works fine, until I call up another page, then go back to index.php. The DB content is not loaded, and my form is shown there in all its naked glory. I know why this is happening. The page was not refreshed, nothing kicked off the code to load the content and hide the form. My question is, how can I ensure that the AJAX .load() and the .dialog() will run when loading index.php again? Is it even possible? Thanks, and my apologies for the length. I get verbose when I'm confused.

    Read the article

  • Resizing an iframe based on content

    - by larssg
    I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes. How do I resize the iframes to fit the height of the iframes' content? I've tried to decipher the javascript Google uses but it's obfuscated, and searching the web has been fruitless so far. Update: Please note that content is loaded from other domains, so the same-origin policy applies.

    Read the article

  • Need tutorials on Content providers in android

    - by Rahul Varma
    Hi folks, I am in desperate need of good tutorials on Content Providers in Android. I have been searching in the web for the tutorials but none could give me a clear idea on how content providers work. I'll be grateful if anyone can provide me with sample codes of the projects that implement content providers...

    Read the article

  • Accessing a control in asp.net content page through Javascript

    - by rocksolid
    Hi, I have a form in my content page for which I am doing some client side validations via Javascript. The Javascript behaves as expected if I place the JS code directly in the content page. But if I place the JS code in it's own file and try accessing that from the content/master page (through the script tag's src attribute), I get a run time error when the validation function in JS being called. To be specific, I get the below error. Microsoft JScript runtime error: Objected expected/required at this line - document.getElementById('<%=txtemailId.ClientID %').value txtemailId is in the content page. Javascript code is placed in validation.js and accessed via master page. The reason I guess is that when .net is parsing the files, it is unable to substitute txtemailId.ClientID with the client side value that would be generated later on. So, how should one go about it? Thanks!

    Read the article

  • How to send html content in the Email body

    - by Shalini Singh
    Hi, i am using android code with html tag.. but in mail getting same html tag please help me how can i send html link ... the code is giving below Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/html"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"[EMAIL PROTECTED]"}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Example"); context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

    Read the article

  • Filter sharepoint content

    - by carl
    Hi Everybody, I need to filter the content in all the pages according to user selections. there should be one control to select different parameters like country, branch and location. page content should change according to user selected values throughout site even user navigate to other pages or subsites. When user closes his/her browser and comes back he/she has to see the content according to most recent selections. Thanks in advance.

    Read the article

  • I can't change HTTP request header Content-Type value using jQuery

    - by Matt
    Hi I tried to override HTTP request header content by using jQuery's AJAX function. It looks like this $.ajax({ type : "POST", url : url, data : data, contentType: "application/x-www-form-urlencoded;charset=big5", beforeSend: function(xhr) { xhr.setRequestHeader("Accept-Charset","big5"); xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=big5"); }, success: function(rs) { target.html(rs); } }); Content-Type header is default to "application/x-www-form-urlencoded; charset=UTF-8", but it obviously I can't override its value no matter I use 'contentType' or 'beforeSend' approaches. Could anyone adivse me a hint that how do I or can I change the HTTP request's content-type value? thanks a lot. btw, is there any good documentation that I can study JavaScript's XMLHttpRequest's encoding handling?

    Read the article

  • Escaping textarea content

    - by user198729
    <textarea><?php echo htmlspecialchars($content)?></textarea> Does content inside <textarea need to be converted into HTML entities? Is htmlspecialchars necessary here? I tried with and without it, and both work for the content I used.

    Read the article

  • dojo.connect with dynamic content

    - by peirix
    Is there something similar to jQuery's live()-method in dojo? I have some content that's being loaded with ajax, and need that content to get the same event connections. dojo.query(".allTheseElements").connect("onclick", function() { /***/ } And then have the dynamically loaded content fire on this too.

    Read the article

  • ViewPager resize height to Content

    - by user1324936
    ViewPager does not wrap its height to its content. For my layout I need to set the hight then dynamically because it is nested in other layouts. Therefore I created a ScrollView as content of the ViewPager and check its height in onCreate method of the Fragment, but the ScrollView has always the same size. How can I resize the ViewPager to fit to its content? final ScrollView sv = (ScrollView) v.findViewById(R.id.sv); ViewTreeObserver vto = scrollViewMenuFragen.getViewTreeObserver(); vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { int height = sv.getMeasuredHeight(); //always same height independent of content height //need to resize ViewPager ViewGroup.LayoutParams params = (ViewGroup.LayoutParams) mPager.getLayoutParams(); params.height = height; mPager.setLayoutParams(params); } });

    Read the article

  • Valid content-type for XML, HTML and XHTML documents

    - by astropanic
    What are correctly content-types for this documents ? I need to write a simple crawler, that only fetches this kind of files. Nowadays http://somedomain.com/index.html can serve for example an JPEG file due to mod_rewrite, so I need to check the content-type from the response header and compare it with a list of allowed content-types. From where I can get such list ?

    Read the article

  • Drupal Views limiting content posted by group membership

    - by digital
    Hi, I have various different content types and I want to filter by using views. So say a block only displays content posted in groups that you are a member of. I've created my generic view which so far displays all content of that type, but I'm struggling with linking this to content only posted in groups your a member of. I've looked at the Organic Groups filters but no luck there. I suspect I might need to use some sort of relationship but I'm stuck there. Any help would be greatly appreciated.

    Read the article

  • How to save the content of Textbox into a textfile

    - by Owais Wani
    I have a textbox which has some content. I also have a button (SAVE) which shud open the FileSaveDialog and allow the content to be saved in a .txt file. XAML: <TextBox Height="93" IsReadOnly="True" Text="{Binding Path=ReadMessage, Mode=TwoWay}" Name="MessageRead" /> <Button Content="Save" Command="{Binding Path=SaveFileCommand}" Name="I2CSaveBtn" /> ViewModel: private string _readMessage = string.Empty; public string ReadMessage { get { return _readMessage; } set { _readMessage = value; NotifyPropertyChanged("ReadMessage"); } } public static RelayCommand SaveFileCommand { get; set; } private void RegisterCommands() { SaveFileCommand = new RelayCommand(param => this.ExecuteSaveFileDialog()); } private void ExecuteSaveFileDialog() { //What To Do HERE??? } What I basically need is to read the content of textbox, open a file save dialog and store it in a text file to be saved in my system.

    Read the article

  • Ckeditor sends default content

    - by user1294101
    I use ckeditor with a default content. Then I initialize (replace textarea) CKEditor with jquery and I edit the text. The problem is that var data = $( 'textarea.editor' ).val(); returns default content and also getData(). What I have to do to grab the actual content? Thank you very much var ed = $( '#ed' ).ckeditor( {toolbar :[ { name: 'basicstyles', items : [ 'Bold','Italic' ] }, {name: 'link', items:['Link']}, { name: 'colors', items : [ 'TextColor' ] } ] } );

    Read the article

  • jquery .show("slide") options (WITH PICS!!)

    - by Micky Fokken
    Here's my code. It slides in from the left. <script> $('#goalHS').click(function() { $('div[id^="div-detailed-goal"]').show("slide"); }); $("#redline").click(function() { $('div[id^="div-detailed-goal"]').fadeOut("slow"); }); </script> Instead of fading in from the left, I want a red line to be drawn and then have the DIV slide in from the top. How can I get it to do the following? Horizontal red line grows out from center. --- Red line finishes growing: Content slides in from underneath red line. COntent does NOT show above red line: c. content, content, content d. content, content, content Content finishes sliding in. Awesomeness ensues! a. content, content, content b. content, content, content c. content, content, content d. content, content, content I've tried 4 different ways, and I've tried using other js plugin libraries, but I'm not quite that advanced to figure it out.

    Read the article

  • javascript---click copy the content to the clipboard

    - by runeveryday
    the following is the code. but it doesn't work. what's wrong with it? thank you. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>no title</title> <script type="text/javascript"> function copyToClipBoard(content){ var clipBoardContent = ''; clipBoardContent = content; window.clipboardData.setData("Text",clipBoardContent); alert('have copied to the clipboard'); } <body> <textarea rows="4" cols="60" id="url">www.example.com</textarea> <input type="button" value="click me" onclick="copyToClibBoard (document.getElementById ('url').value);" /> </body>

    Read the article

  • how do i specify the element when loading content ajax jquery

    - by phukkie
    How can I specify an element where the content is to be retrieved from within the pageurl in the code below? $(function () { $("a[rel='sort']").click(function (e) { //e.preventDefault(); /* if uncomment the above line, html5 nonsupported browers won't change the url but will display the ajax content; if commented, html5 nonsupported browers will reload the page to the specified link. */ //get the link location that was clicked pageurl = $(this).attr('href'); //to get the ajax content and display in div with id 'content' $.ajax({ url: pageurl + '?rel=sort', success: function (data) { $('#content1').html(data); } }); //to change the browser URL to 'pageurl' if (pageurl != window.location) { window.history.pushState({ path: pageurl }, '', pageurl); } return false; }); });

    Read the article

  • How to add response headers based on Content-type; getting Content-type before the response is commi

    - by Bozho
    I want to set the Expires header for all image/* and text/css. I'm doing this in a Filter. However: before calling chain.doFilter(..) the Content-type is not yet "realized" after calling chain.doFilter(..) the Content-type is set, but so is content-length, which forbids adding new headers (at least in Tomcat implementation) I can use the extensions of the requested resource, but since some of the css files are generated by richfaces by taking them from inside jar-files, the name of the file isn't x.css, but is /xx/yy/zz.xcss/DATB/.... So, is there a way to get the Content-type before the response is committed.

    Read the article

  • jquery mobile - loading content into a div

    - by Robbiegod
    Jquery Mobile works by “hijacking” a page and loading content and injecting it into the page. It seems that this creates a problem when i try to inject other content into the page. I have my index.html and then a page2.html file. I'm setting up jquery mobile in the normal fashion wrapping the contents of each page in a div like so: <div id="container" data-role="page"> // my content <a href="page2.html">go to page 2</a> </div> when the user taps go to page 2, it does the nice slide effect. The url in the location bar looks like this: index.html#page2.html jquery mobile inject the content of the page using the anchors and applies the transition. nice so everthing works great up to the next part. On page2.html, i have a section that is loading some external data and injecting it into a div. <a href="http://www.somedomain.com/myata.php" class="ajaxtrigger" data-role="none">mydata</a> <div id="target"></div> <script src="js/code.js"></script> <script src="js/loader.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.ajaxtrigger').trigger('click'); }); </script> The problem i am having is that when i enable the transitions in jquery mobile this script doesn't work. It won't load the data into the div. bummer. Anyone know what i need to do to get it to trigger and load the content into that div?

    Read the article

  • Return http 204 "no content" to client in ASP.NET MVC2

    - by Jeremy Raymond
    In an ASP.net MVC 2 app that I have I want to return a 204 No Content response to a post operation. Current my controller method has a void return type, but this sends back a response to the client as 200 OK with a Content-Length header set to 0. How can I make the response into a 204? [HttpPost] public void DoSomething(string param) { // do some operation with param // now I wish to return a 204 no content response to the user // instead of the 200 OK response }

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >