Search Results

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

Page 65/843 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Changing label content programmatically from within a DataTemplate used in a DataGrid column header

    - by iimpact
    I'm dynamically creating DataGrid columns (based on an event from my ViewModel) and programmatically adding them to an existing DataGrid. Each column uses a generic HeaderTemplate by setting it to a DataTemplate that has been identified in the xaml. The DataTemplate contains two labels in which needs their content needs to be changed upon creation of the DataGrid column. How would this be done? I understand that the DataTemplate uses the ContentPresenter but I am having trouble accessing it within a dynamically created DataGrid column. Code is as follows: xaml: (template used to format the DataGrid column header): <DataTemplate x:Key="columnTemplate"> <StackPanel> <Label Padding="0" Name="labelA"/> <Separator HorizontalAlignment="Stretch"/> <Label Padding="0" Name="labelB"/> </StackPanel> </DataTemplate> c#: (used to dynamically create a DataGrid column and add it to an existing DataGrid) var dataTemplate = FindResource("columnTemplate") as DataTemplate; var column = new DataGridTextColumn(); column.HeaderTemplate = dataTemplate; DataGrid1.Columns.Add(column); I would like to then access both labelA and labelB and change the content.

    Read the article

  • Qt Jambi: Accessing the content of QNetworkReply

    - by Richard
    Hi All, I'm having trouble accessing the content of QNetworkReply objects. Content appears to be empty or zero. According to the docs (translating from c++ to java) I think I've got this set up correctly, but to no avail. Additionally an "Unknown error" is being reported. Any ideas much appreciated. Code: public class Test extends QObject { private QWebPage page; public Test() { page = new QWebPage(); QNetworkAccessManager nac = new QNetworkAccessManager(); nac.finished.connect(this, "requestFinished(QNetworkReply)"); page.setNetworkAccessManager(nac); page.loadProgress.connect(this, "loadProgress(int)"); page.loadFinished.connect(this, "loadFinished()"); } public void requestFinished(QNetworkReply reply) { reply.reset(); reply.open(OpenModeFlag.ReadOnly); reply.readyRead.connect(this, "ready()"); // never gets called System.out.println("bytes: " + reply.url().toString()); // writes out asset uri no problem System.out.println("bytes: " + reply.bytesToWrite()); // 0 System.out.println("At end: " + reply.atEnd()); // true System.out.println("Error: " + reply.errorString()); // "Unknown error" } public void loadProgress(int progress) { System.out.println("Loaded " + progress + "%"); } public void loadFinished() { System.out.println("Done"); } public void ready() { System.out.println("Ready"); } public void open(String url) { page.mainFrame().load(new QUrl(url)); } public static void main(String[] args) { QApplication.initialize(new String[] { }); Test t = new Test(); t.open("http://news.bbc.co.uk"); QApplication.exec(); } }

    Read the article

  • AJAX.NET __doPostBack changes other content

    - by Raul
    Hi. I have an application where a javascript reads the GPS location of the device and sends it to serverside script like this: f() { var initialLocation= Someshit(); document.getElementById('<% = text.ClientID %>').value=initialLocation; var button = document.getElementById('<% = Button4.ClientID %>'); button.click(); } And i have some AJAX.NET code: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button4" runat="server" Text="PlaceHolder" onclick="Button4_Click"/> <asp:TextBox ID="text" runat="server"></asp:TextBox> </ContentTemplate> </asp:UpdatePanel> And a bit further down <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <div> <some divs and asp:gridviews and god knows what > </div> <ContentTemplate> </asp:UpdatePanel> The problem is that the the last divs inner content changes when the event of UpdatePanel1 has finished. Why is that? I don't want the content outside of UpdatePanel1 to be changed whenever UpdatePanel1 is doing its thing. Please help.

    Read the article

  • Creating dynamic jQuery tooltips for dynamic content

    - by Mel
    I'm using the qTip jQuery plugin to create tooltips for a set of links. Two problems: How do I create a set of tooltips for three dynamically generated links where the content of the tooltip will also be dynamic: a href="books.cfm?bookID=11"Book One a href="books.cfm?bookID=22"Book Two a href="books.cfm?bookID=33"Book Three I would like to create a tooltip for each link. Each tooltip will then load details about each book. Thus I must pass the bookID to the tooltip: $('#catalog a[href]').each(function() { $(this).qtip( { content: { URL: 'cfcs/viewbooks.cfc?method=bookDetails', data: { bookID: <cfoutput>#indexView.bookID#</cfoutput> }, method: 'get' } }); }); Unfortunately the above code is not working correctly. I've gotten it to work when I've used a static 'bookID' instead of a dynamically generated number. Even when it does work (by using a static number for 'bookID', I can't format the data correctly. It comes back as a query result, or a bunch of text strings. Should I send back the results as HTML? Unsure. PS: I am an absolute NOVICE to Javascript and jQuery, so please try not to be as technical. Many thanks!

    Read the article

  • Why can't I share a variable between two content sections in an ASP.NET MVC View?

    - by Dave Van den Eynde
    I have an ASP.NET MVC View with the typical TitleContent and MainContent, with a fairly complicated title that I want to calculate once and then share between these two content sections, like so: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <% var complicatedTitle = string.Format("{0} - {1}", Model.FirstThing, Model.SecondThing); %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> <%: complicatedTitle %> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2><%: complicatedTitle %></h2> </asp:Content> This, however, doesn't work, as the resulting error message would say that only Content controls are allowed directly in a content page that contains Content controls. The calculation definately belongs in the view. How do you solve this problem?

    Read the article

  • MIME "Content-Type" folding and parameter question regarding RFCs?

    - by BastiBense
    Hello, I'm trying to implement a basic MIME parser for the multipart/related in C++/Qt. So far I've been writing some basic parser code for headers, and I'm reading the RFCs to get an idea how to do everything as close to the specification as possible. Unfortunately there is a part in the RFC that confuses me a bit: From RFC882 Section 3.1.1: Each header field can be viewed as a single, logical line of ASCII characters, comprising a field-name and a field-body. For convenience, the field-body portion of this conceptual entity can be split into a multiple-line representation; this is called "folding". The general rule is that wherever there may be linear-white-space (NOT simply LWSP-chars), a CRLF immediately followed by AT LEAST one LWSP-char may instead be inserted. Thus, the single line Alright, so I simply parse a header field and if a CRLF follows with linear whitespace, I simply concat those in a useful manner to result in a single header line. Let's proceed... From RFC2045 Section 5.1: In the Augmented BNF notation of RFC 822, a Content-Type header field value is defined as follows: content := "Content-Type" ":" type "/" subtype *(";" parameter) ; Matching of media type and subtype ; is ALWAYS case-insensitive. [...] parameter := attribute "=" value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive. value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> Okay. So it seems if you want to specify a Content-Type header with parameters, simple do it like this: Content-Type: multipart/related; foo=bar; something=else ... and a folded version of the same header would look like this: Content-Type: multipart/related; foo=bar; something=else Correct? Good. As I kept reading the RFCs, I came across the following in RFC2387 Section 5.1 (Examples): Content-Type: Multipart/Related; boundary=example-1 start="<[email protected]>"; type="Application/X-FixedRecord" start-info="-o ps" --example-1 Content-Type: Application/X-FixedRecord Content-ID: <[email protected]> [data] --example-1 Content-Type: Application/octet-stream Content-Description: The fixed length records Content-Transfer-Encoding: base64 Content-ID: <[email protected]> [data] --example-1-- Hmm, this is odd. Do you see the Content-Type header? It has a number of parameters, but not all have a ";" as parameter delimiter. Maybe I just didn't read the RFCs correctly, but if my parser works strictly like the specification defines, the type and start-info parameters would result in a single string or worse, a parser error. Guys, what's your thought on this? Just a typo in the RFCs? Or did I miss something? Thanks!

    Read the article

  • How do I stop ValueConverters from firing when swapping the content of a ContentControl

    - by DanM
    I thought what I was doing was right out of the Josh Smith MVVM handbook, but I seem to be having a lot of problems with value converters firing when no data in the view-model has changed. So, I have a ContentControl defined in XAML like this: <ContentControl Grid.Row="0" Content="{Binding CurrentViewModel}" /> The Window containing this ContentControl references a resource dictionary that looks something like this: <ResourceDictionary ...> <DataTemplate DataType="{x:Type lib_vm:SetupPanelViewModel}"> <lib_v:SetupPanel /> </DataTemplate> <DataTemplate DataType="{x:Type lib_vm:InstructionsPanelViewModel}"> <lib_v:InstructionsPanel /> </DataTemplate> </ResourceDictionary> So, basically, the two data templates specify which view to show with which view-model. This switches the views as expected whenever the CurrentViewModel property on my window's view-model changes, but it also seems to cause value converters on the views to fire even when no data has changed. It's a particular problem with IMultiValueConverter classes, because the values in the value array get set to DependencyProperty.UnsetValue, which causes exceptions unless I specifically check for that. But I'm getting other weird side effects too. This has me wondering if I shouldn't just do everything manually, like this: Instantiate each view. Set the DataContext of each view to the appropriate view-model. Give the ContentControl a name and make it public. Handle the PropertyChanged event for the window. In the event handler, manually set the Content property of the ContentControl to the appropriate view, based the CurrentViewModel (using if statements). This seems to work, but it also seems very inelegant. I'm hoping there's a better way. Could you please advise me the best way to handle view switching so that value converters don't fire unnecessarily?

    Read the article

  • Creating content for rails-based applications

    - by Matthias Hryniszak
    Hi, I'm facing a problem of cleaning up my application in Ruby on Rails. What I have is a pretty standard 3-panel, header and footer layout where different parts of the screen contain different functionality. By that I mean for example that the header contains (among others) a select that allows one to select parts of the application and a context-dependent menu. The main content area contains obviously the most interactive stuff whereas side panels contain quick-links with stuff like shopping-cart preview, list of potentially attractive products for the customer, a selector to narrow down the list of options... I was wondering how do I go about simplifying the design. Right now I have the stuff that provides data for the "common" stuff (as opposed to direct content that's placed in the center) called from all the actions (with a filter) but that doesn't feel right for me. I've read that "components" are also not the way to go for obvious performance reasons. Is there something that's more like component-oriented (other frameworks do have that kind of stuff - Grails: <ui:include ../>, ASP.NET MVC: <% Html.RenderAction() %>)? Best regards, Matthias.

    Read the article

  • Eclipse Java Content Assist not working

    - by Damo
    The Content Assist in Eclipse 3.4 and 3.5 has stopped working for me. When I type in the first few characters of a class and hit CRTL-space then after a delay I get the following error message It does not matter what proposals I enable/disable, I will get this (or similar) message. I have tried: Changing the Xms/Xmx values Starting Eclipse with -clean Creating a new workspace and importing my projects However none of these have worked. I have seen some posts suggesting that other apps may be taking over the CRTL-space or otherwise interfering, however I have nothing aside from a fresh Eclipse running and the problem persists. My problem is very similar to the one covered in this post albeit on a later version and on OSX 10.5.7. Does anyone have any suggestions for how this might be resolved? Thanks. UPDATE: To anyone interested I've had the best results by using Eclipse 3.5 Classic (ie. doesn't include Mylyn). I've also used the settings specified in the bug reports linked to by VonC below. Interestingly Classic doesn't come with some views eg. Snippets, but these are easy to drop in from another distro. UPDATE 2: This problem actually persisted even with the latest versions of Eclipse (3.6 M1). It is caused by a large JAR file generated my Altova Mapforce to handle EDIFACT transformations in our application. It is reproducible by adding this JAR to the buildpath and no changes to Content Assist settings help. The bug (and JAR) can be seen at https://bugs.eclipse.org/bugs/show_bug.cgi?id=289057

    Read the article

  • Separating Content (aspx) from Code (aspx.cs) in ASP.NET

    - by firedrawndagger
    I would like to know what is the best practice on separating the content of an aspx page (ASP.NET 3.5) from the code (I'm using C#). I have a form that users can type data in - for example they are allowed to enter a percent. If they Otherwise for example I would like to display the following error messages: <p id="errormsg" class="percenthigh">Please enter a percent below 100</p> <p id="errormsg" class="percentnegative">Percent cannot be below 0</p> <p id="errormsg" class="percentnot">This is not a percent</p> So in essence I'm hiding the error messages and showing one depending on what the user input is. I believe this is the best way to seperate the content from the code behind. However, how do I select elements and hide/unhide them depending on the user input? I'm aware I can do a runat="server" on the elements but the problem is that I can't select by class and am limited only to ID's. What workarounds do you recommend? Aside from putting in the values in code behind which is notoriously difficult to debug. Also has this been "fixed" in ASP.NET 4?

    Read the article

  • Swapping content in a seperate div on hover

    - by Fuego DeBassi
    I feel like this should work: $(".module .one").hover(function() { $("#viewport #one").addClass('red'); }); Basically I am hiding all the .children of "#viewport on load, then when a seperate element is hovered, in this case .module .one I want to change something on the corresponding viewport ID #viewport #one. Basic idea is a variable content window, where when a thumbnail or whatever I put in the modules swaps the content shown in the viewport. Something I am doing wrong? Here is my full code: <script type="text/javascript"> $(document).ready(function() { $(".module .caption").hide(); $("#viewport").children().hide(); $(".module").hover(function() { $(this).find(".caption").slideDown().end().siblings('.module').addClass('under'); },function() { $(this).find(".caption").slideUp().end().siblings('.module').removeClass('under'); }); $(".module .one").hover(function() { $("#viewport #one").addClass('red'); }); }); </script> The bigger hover function in the middle is for some fancy rollover effects that the modules will perform themselves, but for these purposes I just want to figure out why I can't add a Class to a separate element when another is hovered. Would love some help/advice!

    Read the article

  • Problems with display of UTF-8 encoded content from a DB

    - by LookUp Webmaster
    Dear members of the Stackoverflow community, We are developing a web application using the Zend Framework, and we are facing some encoding issues that we hope you might help us solve. The situation goes something like this: There are certain tables on a MySQL database that need to be displayed as html. Because the site is designed using the Spanish language, the database contains some characters like "á" or "ñ". Our internal policy is to set all the encodings as UTF-8, including all the databases and the tables. The problem is, that when we retrieve the content from the DB, some characters are displayed as question marks. We are out of ideas. These are all the things that we have already tried and double-checked: 1. The SQL file from which we load all the data is properly UTF-8 encoded. 2. The SQL is loaded through phpmyadmin (which is configured as UTF-8), and the resulting tables are displayed properly. 3. The netbeans environment used for coding is also set as UTF-8. The weird thing is that all the content that is hard-coded either as php or html is displayed properly. Only the values that are extracted from the database have issues. Any ideas? Thank you very much.

    Read the article

  • vertical align of some inline-block divs with different content

    - by Jan Möller
    i want to center some inline-block divs. I want to create a responsive design, so if the screen size is too small, the horizontal elements should be under each other. How can i center them vertical, so they are side by side without a difference in height? (See fiddle). Moveover those elements should be verticaly centered, if the screen size is too small. http://jsfiddle.net/5dpRs/52/ CSS .repeat { display:inline-block; border-style:solid; border-width:2px; height:50px; width:50px; } #content { border-style:solid; border-width:2px; text-align:center; } HTML <div id="content"> <div class="repeat"> <p>hello</p> </div> <div class="repeat"> </div> </div> Thank you :)

    Read the article

  • Excel VBA ComboBox2 doesn't get the right content

    - by Marc
    Hi, I'm having a problem with the content of a combobox. On my userform, there are 3 comboboxes. Depending on the chosen item from combobox1, combobox2 should display either set 1 or set 2. The same will be happening with the content of combobox 3, which depends upon the combination of chosen items from combobox 1 and 2. However, I'm running into problems with combobox 2, which is always populated by set 2, even if I select the item in combobox 1 that should generate set 1 in the second combobox. This is the code I used: Private Sub UserForm_Initialize() With ComboBox1 .Clear .AddItem "In contrast" .AddItem "Eng?" .AddItem "Trillers" .AddItem "Natuur(lijk)" .AddItem "Muziektrafiek" End With If ComboBox1.Value = "In contrast" Then GoTo LineComboBox1Set1 End If If ComboBox1.Value = "Eng?" Then GoTo LineComboBox1set2 End If If ComboBox1.Value = "Trillers" Then GoTo LineComboBox1set2 End If If ComboBox1.Value = "Natuur(lijk)" Then GoTo LineComboBox1set2 End If If ComboBox1.Value = "Muziektrafiek" Then GoTo LineComboBox1set2 End If LineComboBox1Set1: With ComboBox2 .Clear .AddItem "Op verkenning" .AddItem "Gehoord? Gezien?" .AddItem "On stage" .AddItem "Creabende" .AddItem "Ingeblikt" End With LineComboBox1set2: With ComboBox2 .Clear .AddItem "Op verkenning" .AddItem "Gehoord? Gezien?" .AddItem "On stage" .AddItem "Creabende" .AddItem "Ingeblikt" .AddItem "Speak up" .AddItem "In de kijker" End With Can anyone help me on this one? Thanks a lot in advance!! Kind regards, Marc

    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

  • Streaming content to JSF UI

    - by Mark Lewis
    Hello, I was quite happy with my JSF app which read the contents of MQ messages received and supplied them to the UI like this: <rich:panel> <snip> <rich:panelMenuItem label="mylabel" action="#{MyBacking.updateCurrent}"> <f:param name="current" value="mylog.log" /> </rich:panelMenuItem> </snip> </rich:panel> <rich:panel> <a4j:outputPanel ajaxRendered="true"> <rich:insert content="#{MyBacking.log}" highlight="groovy" /> </a4j:outputPanel> </rich:panel> and in MyBacking.java private String logFile = null; ... public String updateCurrent() { FacesContext context=FacesContext.getCurrentInstance(); setCurrent((String)context.getExternalContext().getRequestParameterMap().get("current")); setLog(getCurrent()); return null; } public void setLog(String log) { sendMsg(log); msgBody = receiveMsg(moreargs); logFile = msgBody; } public String getLog() { return logFile; } until the contents of one of the messages was too big and tomcat fell over. Obviously, I thought, I need to change the way it works so that I return some form of stream so that no one object grows so big that the container dies and the content returned by successive messages is streamed to the UI as it comes in. Am I right in thinking that I can replace the work I'm doing now on a String object with a BufferedOutputStream object ie no change to the JSF code and something like this changing at the back end: private BufferedOutputStream logFile = null; public void setLog(String log) { sendMsg(args); logFile = (BufferedOutputStream) receiveMsg(moreargs); } public String getLog() { return logFile; }

    Read the article

  • Spring security - same page to deliver different content based on user role

    - by Ramesh
    Hello, i tried to search for any previous post related to my issue but couldnt find any. I have a scenario where in page handles 3 different scenarios and one of them not working. This page returns different content depending on if the user is authenticated or anonymous. localhost:8080/myApp/muUrl?test=authenticatedContent - used for Scenario 1 & 2 localhost:8080/myApp/muUrl?test=anonymousContent - used for Scenario 3 Scenario: 1) Authenticated user accesing the page url - the user gets displayed correct information. Works fine 2) Anonymous user accesing page URL with parameters that requires authentication - If anonymous, there is second level of check on the content they are accessing. for example, based on the GET parameters, there is custom logic to determine if the user has to be authenticated. In which case the page gets redirected to login page (WORKS fine). 3) Anonymous user accessing page URL with parameters that doesnt need authentication - in this case i get the SAvedRequest and redirect to the URL which is taking me to an infinite loop. Am i missing something very obvious or is there a way in AuthenticationProcessFilterEntryPoint to say "DON'T redirect to LOGIN page but process it" ? thanks.

    Read the article

  • Producing a static HTML site from XML content

    - by Skilldrick
    I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here: I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Learn some basic XSLT and produce HTML to the correct spec this way. Produce the site with PHP (for example) and then generate a static site. Write a script (in Python for example) to convert the XML into HTML. This is similar to the XSLT option but without having to learn XSLT. Useful information: The XML will likely change at some point, so I'd like to be able to easily regenerate the site. I'll have to produce some kind of menu for jumping around the document (so I'll need to produce some kind of index of the content). I'd like to know if anyone has any better ideas that I haven't thought of. If not, I'd like you to tell me which of my options seems the most sensible. I think I know what I'm going to do, but I'd like a second opinion. Thanks.

    Read the article

  • Issue scrolling table view with content inset

    - by Rog
    Hi all, I am experiencing a weird scrolling issue and I was hoping someone could give me a hand in trying to identify why this is happening. I have included the part of my code that I think is relevant to the question but am happy to update this post with whatever else is needed. I have implemented a pull to refresh view in the tableview's content inset area. The refresh fires an Async NSURLConnection that pulls data from a webserver, parses the relevant information and refreshes the table as required. This is where the refresh process kicks off: - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ if (scrollView.contentOffset.y <= - 65.0f && !self.reloading) { self.reloading = YES; [self reloadTableViewDataSource]; [refreshHeaderView setState:EGOOPullRefreshLoading]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.2]; self.tableView.contentInset = UIEdgeInsetsMake(60.0f, 0.0f, 0.0f, 0.0f); [UIView commitAnimations]; } } Problem is if I start to scroll whilst the content inset is "visible" (i.e. during reload) I get this weird behaviour where my table sections do not scroll all the way to the top - see screenshot for a clear visual of what I am trying to describe here. I have included a couple of screenshots below that clearly identify what is happening at the moment. Has anyone experienced this before? Any ideas on what I should be looking at to try and fix it? Many thanks in advance, Rog And this is the result if I start scrolling the table. The orange bit at the top of the image is the actual navigation bar, where I would expect the table section (date 1 December 2010) to be.

    Read the article

  • Converting the content of <div> Tag To An Image [closed]

    - by ruhit
    how to convert the content of tag into image fomat in php, please someone help me,I realy need it....... i have made this application... <?php if(!isset($_GET['text'])) { die("No text provided"); } header ("Content-type: image/png"); $text = $_GET['text'] ; $path="C:\wamp\www\image"; $bg = imagecreatetruecolor(350, 75); //This will make it transparent imagesavealpha($bg, true); $trans_colour = imagecolorallocatealpha($bg, 0, 0, 0, 127); imagefill($bg, 0, 0, $trans_colour); $white = imagecolorallocate($bg, 255, 255, 255); $grey = imagecolorallocate($bg, 128, 128, 128); $black = imagecolorallocate($bg, 0,0,0); $background_color = imagecolorallocate ($bg, 25, 25, 25); $font = 'arial.ttf'; $fontsize = 20; imagettftext($bg, $fontsize, 0, 20, 20, $grey, $font, $text); //Create image imagepng($bg); imagepng($bg,"$path/img.png"); //destroy image ImageDestroy($bg); ?> and the image source is <img src="img.php?text=helloworld"> now I want the text input from a tag field, so how to do this?Please help me..

    Read the article

  • Wrong label for a nodereference in Drupal content-type

    - by MPD
    We have a content-type built using CCK. One of the fields is a node reference. The node picker is using a view to build the options. A few days ago, everything was working well. Today, it looks like all node reference fields using views to populate the selection options are displaying the wrong label. Every single label in the option is ``A'', but the actual node number is correct. The form actually works, just the labels are incorrect. We have tried just about every combination of edit/save, disable/enable, reboot, clear cache, clone the view, rebuild the view, new view, etc, but we still have a big list of As. If we create a brand new content type with a brand new node reference field, we get the problem. Through some backup/restore exercises, we have determined that the problem is actually in the database and not in the code. We can restore our last good backup, but we will lose a decent amount of work we have put into other parts of the database. We enabled mysql query logging, and the view is actually being called properly, but we cannot track down where the problem is creeping in after that (unraveling the CCK / Views / Drupal plumbing is a challenge). The install was build with latest stable versions as of April. The problems referred to in http://drupal.org/node/624422 is similar, but our code versions include the patches mentioned. Any ideas would be appreciated. Thanks.

    Read the article

  • Clear listview content?

    - by Slash
    I have a little problem with listview. How do i clear a listview content, knowing that it has a custom adapter? edit : the custom adapter class extends BaseAdapter, it looks like this : import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; public class MyAdapter extends BaseAdapter { private Activity activity; private String[] data; private static LayoutInflater inflater=null; public MyAdapter(Activity _a, String[] _str) { activity = _a; data = _str; inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public static class ViewHolder{ public TextView text; } @Override public int getCount() { return data.length; } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View view, ViewGroup parent) { View v = view; ViewHolder holder; if(v == null) { v = inflater.inflate(R.layout.rowa, null); holder=new ViewHolder(); holder.text=(TextView)v.findViewById(R.id.dexter); v.setTag(holder); }else{ holder=(ViewHolder)v.getTag(); } holder.text.setText(data[position]); return v; } }

    Read the article

  • Jquery Double clicking on link removing div content

    - by ram
    I wrote this code to load the content of a DIV ,when some one clicks on a link. Now,if you click on a link twice,it is removing the content. Here is the code $('a').click(function() { var id = $(this).attr('class'); if(id == 'first') { $('.active').removeClass('active'); $('a.first').addClass('active'); } else if(id == 'second') { $('.active').removeClass('active'); $('a.second').addClass('active'); } $('#first').toggle(id == 'first'); $('#second').toggle(id == 'second'); });? <a class="first">one</a> <a class="second">two</a> <div> <li id="first"> <h2>pen</h2> <div> <div>parker</div> </div> </li> <li id="second" style="display: none;"> <h2>car</h2> <div>Bugatti</div> </div> </li> </div>? .active { color: green; }

    Read the article

  • Why "Content-Length: 0" in POST requests?

    - by stesch
    A customer sometimes sends POST requests with Content-Length: 0 when submitting a form (10 to over 40 fields). We tested it with different browsers and from different locations but couldn't reproduce the error. The customer is using Internet Explorer 7 and a proxy. We asked them to let their system administrator see into the problem from their side. Running some tests without the proxy, etc.. In the meantime (half a year later and still no answer) I'm curious if somebody else knows of similar problems with a Content-Length: 0 request. Maybe from inside some Windows network with a special proxy for big companies. Is there a known problem with Internet Explorer 7? With a proxy system? The Windows network itself? Google only showed something in the context of NTLM (and such) authentication, but we aren't using this in the web application. Maybe it's in the way the proxy operates in the customer's network with Windows logins? (I'm no Windows expert. Just guessing.) I have no further information about the infrastructure.

    Read the article

  • Appended content using jQuery 'append' is not submitted?

    - by YourMomzThaBomb
    I'm new to jQuery so this may be a real simple answer. I have a ASP.NET project that I'm trying to dynamically add content to a span element by typing into a text box and clicking a button. Sounds simple right? Well, I can get the content to added, but when the form is submitted the span element is still empty? Why is the new data not submitted? What step am I missing? Please help. Here's some sample code: < span id="tagContainer" runat="server"< /span < input type="text" name="tag" id="tag" / < input type="button" name="AddTag" value="Add" class="button" onclick="addTag();" / function addTag() {    if ($("#tag").val() != "") {       $("#tagContainer").append('$("#tag").val()');       $("#tag").val("");    } }

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >