Search Results

Search found 21060 results on 843 pages for 'content disposition'.

Page 44/843 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Make HTML content area fit to viewport height?

    - by viatropos
    I just made this demo extracting out what I'm trying to accomplish: Autosize Main Content Area I want the pink/yellow area to act according to these rules: Minimum height is the size of its content (which is variable) IF content size is smaller than viewport size Otherwise minimum height is such that it adjusts to fill the window. Checking out the source to that demo, what am I missing? I feel like this is a pretty easy case that shouldn't require javascript. Any ideas?

    Read the article

  • Best solution for a comment table for multiple content types

    - by KRTac
    I'm currently designing a comments table for a site I'm building. Users will be able to upload images, link videos and add audio files to the profile. Each of these types of content must be commentable. Now I'm wondering what's the best approach to this. My current options are: 1. to have one big comments table and a link tables for every content type (comments_videos, ...) with comment_id and _id. 2. to have comments separated by the type of content their for. So each type of content would have his own comments table with the comments for that type.

    Read the article

  • Save downloaded content when in app purchase is complete

    - by jakob
    Hello experts! I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process works like a charm. What i can't really figure out is how my content should be saved into the phone. The existing structure is that I have all my current content in Resources/packages/. For every package there is an matching entry in a package.plist. When the purchase is complete it is time to download the content from the server. What i retrieve from the server is a zip file with the new package that I have bought. My observer will call a method named provideContent: -(void) provideContent: (NSString*) productIdentifier { In here I will call my server and download the package } What i need from you guys is some sort of step by step walkthrough or tutorial of how, when the zip is retrieved(is zip allowed?), unpack this zip and add it to my current package structure. Thank you in advance

    Read the article

  • Loading external SWF with masked content - need width/height

    - by AZSL
    I am loading an external swf using the SWFLoader component. The swf that is being loaded is masked so that only a portion is being shown. However, when it's loaded the actual size of the swf (loader.content.width/loader.content.height) is the complete swf including the masked area. Therefore, the loaded swf does not display properly in the itemrenderer Is there a way to to grab the size of the just the masked area as opposed to getting the size of the entire swf's contents? One item to note that is complicating the issue, is that these are swf files that have already been created and there are many of them. In some instances, the size of the stage matches up with the size of the masked area. In other instances, the stage is larger (or possibly smaller) than the masked area movieclip as well as possibly the actual size of the movieclip (w/o the mask). I am currently loading the external swf in using a Loader. Once loaded, I make a copy (screen shot) of the swf by creating a bmp of the loader.content.This is done as I don't want to have any animations being shown on screen at this moment. I am setting the size of the bmp using using loader.content.width & loader.content.height. I then set the SWFLoader.source to the bitmap.

    Read the article

  • CSS body Background Centered to be aligned with content

    - by salsanz
    I want to put a Background image centered in the body (backgroundPosition). And then I want all the content(text, tables....) I will add to the page to be aligned with the background, for example, If I zoom the Page, the proportions Background-Content should be respected. I tried almost everything and I don't know if Its possible, I know if I use position top-left for background position and then content in float:left proportions will be respected, but If I want background centered?

    Read the article

  • $_GET['page'] loading content incorrectly

    - by s32ialx
    OK so here is my previous post PHP Templated Site w/ file_get_content links now i got that issue resolved BUT the problem is now that the content loads it displays UNDER the div i placed #CONTENT# inside so the styles are being ignored and it's posting #CONTENT# outside the divs at positions 0,0 any suggestions? please

    Read the article

  • Wordpress auto excerpts from post content?

    - by Scott B
    I'm trying to create an auto generated post excerpt from the current page's post content using a function in my theme's header file. The post excerpt will be used as the page's meta description. Can someone give me an idea of how you might go about this once you've got the post content into a string variable? The somewhat tricky part is that, in order to predict a viable stopping point for the post excerpt, I'd like to specify that the cutoff point be the end of the first paragraph of text. And for that reason, it does not make sense to load the entire post content into the string I'm using. Can I grab the first paragraph without having to load the entire post content string? And I'm not certain how to test for that in php. Would regex be the only way?

    Read the article

  • How to safely purge in Varnish if backend is sick without losing content

    - by Highway of Life
    If the backend is sick, what is the preferable way to ensure that stale content can be retrieved from the backend when a PURGE request is made? When a PURGE request is made, whether or not the backend is sick, by default the content will be eliminated from the Varnish cache and if the backend is down, a 503 page would be served to the user until the backend comes back online to serve a new version of the content. I'd like to be able to at least serve up a stale version of the content if a new version could not be retrieved from the backend. Is this possible without installing the Softpurge Varnish Mod?

    Read the article

  • Accessing Content Page elements

    - by Abdel Olakara
    Hi all, I am facing a strange problem.. may be i am overlooking something and not able to find the silly issue. Need your help! I have a Master page and a Content Page: <form id="AccountForm" runat="server"> <div> <asp:ContentPlaceHolder ID="MenuHolder" runat="server"> </asp:ContentPlaceHolder> </div> <hr /> <div> <asp:ContentPlaceHolder ID="ContentHolder" runat="server"> </asp:ContentPlaceHolder> </div> And my content page has some form elements: <asp:Content ID="Content3" ContentPlaceHolderID="ContentHolder" runat="server"> First Name: <asp:TextBox ID="fName" runat="server"></asp:TextBox> <br /> Middle Name: <asp:TextBox ID="mName" runat="server"></asp:TextBox> <br /> Family Name: <asp:TextBox ID="lName" runat="server"></asp:TextBox> <br /> Birthday: <asp:TextBox ID="birthday" runat="server"></asp:TextBox> <br /> Mobile Phone: <asp:TextBox ID="mobile" runat="server"></asp:TextBox> <br /> Alternate Phone: <asp:TextBox ID="phone" runat="server"></asp:TextBox> <br /> I also have the code for submit button in the content page where i try to retrieve the values from the form elements and persist it into DB. Here is the SubmitButton_Click code: protected void SubmitButton_Click(object sender, EventArgs e) { log.Info("From Submit button: " + customerObject.first_name + " " + customerObject.family_name); if (fName != null) log.Info("First Name is not null"); log.Info("First Name:" + fName.Text); log.Info("Middle Name:" + mName.Text); log.Info("Family Name:" + fName.Text); log.Info("Mobile:" + mobile.Text); log.Info("Phone: " + phone.Text); log.Info("Address:" + bAddressL1.Text + bAddressL2.Text); Strangly.. i don't get any data that is filled into my text fields? Their objects are not null as well!! why is this behaviour happening? I am not trying to access elements in master page or other.. all the fields are in the content page.. only thing is there is no form element in the content page and the form element is in master page! Thanks in advance for your suggestions and answers. Abdel Raoof Olakara

    Read the article

  • Store web content in XML using wiki markup

    - by Mike
    Does anyone have an XML style sheet that'll convert wiki-like markup to HTML? Or is that a bad idea? I only found one style sheet that'll convert HTML to wiki-like markup, view-source:http://mozile.mozdev.org/0.8/demos/html2wiki.xsl . Or is this a bad idea? Basically, instead of following strict rules with my XML tags to format my content, I thought it'd be best to have something like this: <content> \## This is my heading </content> That way I'm free to display my content however I feel without having to modify my style sheet. Any ideas?

    Read the article

  • There's some html content in a file which is downloaded using PHP scripts on firefox

    - by chqiu
    I use the following to download a file with PHP: ob_start(); $browser = id_browser(); header('Content-Type: '.(($browser=='IE' || $browser=='OPERA')? 'application/octetstream':'application/octet-stream')); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize(realpath($fullpath))); //header("Content-Encoding: none"); if($browser == 'IE') { header('Content-Disposition: attachment; filename="'.$file.'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Content-Disposition: attachment; filename="'.$file.'"'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); } //@set_time_limit( 0 ); ReadFileChunked(utf8_decode($fullpath)); ob_end_flush(); The source code of ReadFileChunked is: function ReadFileChunked($filename,$retbytes=true) { $chunksize = 1*(1024*1024); $remainFileSize = filesize($filename); if($remainFileSize < $chunksize) $chunksize = $remainFileSize; $buffer = ''; $cnt =0; // $handle = fopen($filename, 'rb'); //echo $filename."<br>"; $handle = fopen($filename, 'rb'); if ($handle === false) { //echo 1; return false; } //echo 2; while (!feof($handle)) { //echo "current remain file size $remainFileSize<br>"; //echo "current chunksize $chunksize<br>"; $buffer = fread($handle, $chunksize); echo $buffer; sleep(1); ob_flush(); flush(); if ($retbytes) { $cnt += strlen($buffer); } $remainFileSize -= $chunksize; if($remainFileSize == 0) break; if($remainFileSize < $chunksize) { $chunksize = $remainFileSize; } } $status = fclose($handle); if ($retbytes && $status) { return $cnt; // return num. bytes delivered like readfile() does. } return $status; } The question is : The file downloaded will contiain some html tags which are the content of the html code generated by the php. The error will happened when downloading the txt file with the file size smaller than 4096 bytes. Please help me to slove this problem , thank you very much! Chu

    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

  • I'm using the correct content type & Headers so Why is FireFox saving Zip Files without extensions

    - by The_AlienCoder
    Users on my site have the option to download all the photos in an album as a zip file.The Zip file is dynamically created and saved to Response.OutPutStream to be detected as a file download on the user's browser. Here is the Header and Content-type I am outputing context.Response.AddHeader("Content-Disposition", "attachment; filename=Photos.zip"); context.Response.ContentType = "application/x-zip-compressed"; ..Well everything works fine with every browser except FireFox. Although Firefox correctly detects the download as a Zip file, It saves the file without the .zip extension. I thought adding this header context.Response.AddHeader("Content-Disposition", "attachment; filename=Photos.zip"); ..is supposed to force FF to save the extension. I believe I am following the correct protocol so why is FF behaving this way and how do I fix this?

    Read the article

  • How to add response headers based on Content-type, or getting Content-type before the response is co

    - 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >