Search Results

Search found 14304 results on 573 pages for 'inside'.

Page 15/573 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Rendering PDFs from a database inside MVC views?

    - by Mohammad Sepahvand
    I was wondering if it's possible to do this without using 3rd party compnents in MVC 3. (I am open to free components though.) There are a couple of links out there but they seem to be mostly concerned with reporting and other code samples that do claim to do this sort of thing don't seem to compile. I'm not having any trouble saving and retrieving the PDFs to and from my database, but when I return the PDF as a File or a FileStreamResult the user is prompted with a download. A more desirable approach would be to actually render the PDFs inside the browser. I've had a look at iTextSHarp, it does the job to an extent, but it's not a complete solution. For example it will display the PDF inside the view if and only if the client has Adobe Reader installed, otherwise it prompts for a download. So technically, I'm mostly looking for a PDF viewer. Any ideas?

    Read the article

  • JSP: accessing enum inside JSP EL tags

    - by Arjun
    My java enum looks like this: public enum EmailType { HOME, WORK, MOBILE, CUSTOMER_SERVICE, OTHER } In JSP, I am trying to do sth like below, which is not working. <c:choose> <c:when test="${email.type == EmailType.HOME}">(Home)</c:when> <c:when test="${email.type == EmailType.WORK}">(Work)</c:when> </c:choose> After googling, I found these links: Enum inside a JSP. But, I want to avoid using scriplets in my JSP. How can I access the java enum inside EL tag and do the comparision?? Please help.

    Read the article

  • Using php's magic function inside another function does not work

    - by Sirber
    I want to use magic function __set() and __get() for storing SQL data inside a php5 class and I get some strange issue using them inside a function: Works: if (!isset($this->sPrimaryKey) || !isset($this->sTable)) return false; $id = $this->{$this->sPrimaryKey}; if (empty($id)) return false; echo 'yaay!'; Does not work: if (!isset($this->sPrimaryKey) || !isset($this->sTable)) return false; if (empty($this->{$this->sPrimaryKey})) return false; echo 'yaay!'; would this be a php bug?

    Read the article

  • setting an ImageView to invisable inside a custom Adapter

    - by iyad al aqel
    i'm defining my own list adapter and i want an image inside it to be shown OR hidden based on a value what i've noticed that its always invisible or visible disregarding the value Here's my code , this code is inside the getView method singleRow=data.get(position); readit = singleRow.getRead(); Log.i("readit","" + readit ); //NotificationID=singleRow.getId(); holder.title.setText(singleRow.getAttach_title()); holder.date.setText( singleRow.getAttach_created()); holder.dueDate.setVisibility(ImageView.INVISIBLE); holder.course.setText(singleRow.getCourse_title()); if(readit==1) { //holder.read.setImageResource(IGNORE_ITEM_VIEW_TYPE); holder.read.setVisibility(ImageView.INVISIBLE); } else { holder.read.setImageResource(R.drawable.unread); }

    Read the article

  • Disable the mouse click event of a button placed inside a listbox item

    - by Malcolm
    I have a button placed inside a listbox item and i have style defined fro that button where i have two images and on mouse hover i change the image. Now the problem is I am handling the listbox mouse event and when click the button the listbox mouse event doesn't fires. I tried to make the property of button ishittestvisisble=false And now if i click on button the listbox mouse event fires but the problem is the two images placed inside the styling of button don't apply as they are the child of button and by default their ishittestvisible also turn out to be false. So any suggestion or idea will be helpfull ....tx in advance...

    Read the article

  • Sed not working inside bash script

    - by Isabelle
    Hello. I believe this may be a simple question, but I've looked everywhere and tried some workarounds, but I still haven't solved the problem. Problem description: I have to replace a character inside a file and I can do it easily using the command line: sed -e 's/pattern1/pattern2/g' full_path_to_file/file But when I use the same line inside a bash script I can't seem to be able to replace it, and I don't get an error message, just the file contents without the substitution. #!/bin/sh VAR1="patter1" VAR2="patter2" VAR3="full_path_to_file" sed -e 's/${VAR1}/${VAR2}/g' ${VAR3} Any help would be appreciated. Thank you very much for your time.

    Read the article

  • Regular Expression find a phrase not inside an HTML tag

    - by James Buckingham
    Hi there, I'm struggling a bit with this regular expression and wondered if anyone was about to help me please? What I need to do is isolate the 1st phrase inside a string which is NOT inside an HTML tag. So the examples I have at the moment are: This is some test text about ITS for the ITS department. Also worth mentioning ABS as well I guess.ITS, ... and ... This is some ITS test text about ITS for the ITS department. Also worth mentioning ABS as well I guess So in the first example I want it to ignore the wrapped ITS and give me the ITS at the end of the 1st sentence. In the second example I want it to return the ITS at the start of the 2nd sentence. The aim is to replace these with my own custom wrapped acronym tags in a ColdFusion application I'm writing. Thanks a lot, James

    Read the article

  • Focus element inside iframe when iframe attached to Jquery Dialog

    - by huzzy143
    Hi, I have a iFrame which i load into jquery dialog. I want to focus an element inside the iFrame whenever the Jquery Dialog is being opened. Here is the code i am using to attach iframe to Dialog. $("<div id=\"srch" + options.winId + "\" title=\"" + options.windowTitle + "\" style=\"padding-left:0px;padding-right:0px;padding-top:0px\" tabindex=\"-1\"><iframe src=\"" + url + "\" id=\"frame" + options.winId + "\" name=\"frame" + options.winId + "\" height=\"100%\" width=\"100%\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" tabindex=\"-1\"></div>").appendTo("body") //Now initialize a Dialog Window $('#srch' + options.winId).dialog({ autoOpen: (options.searchText == '') ? true : false, height: options.height, width: options.width, modal: options.isModal, closeOnEscape: true, open: function () { }, close: function () { $('#srch' + options.winId).remove(); } }); I have written this code inside the page which isopened through iFrame src. $(document).ready(function () { $('input1').focus().select(); }); How can i achieve this? Thanks, Huzefa

    Read the article

  • functions inside or outside jquery document ready

    - by Hans
    Up until now I just put all my jQuery goodness inside the $(document).ready() function, including simple functions used in certain user interactions. But functions that don´t require the DOM document to be loaded or are only called afterwards anyway, can be placed outside the $(document).ready() as well. Consider for example a very simple validation function such as: function hexvalidate(color) { // Validates 3-digit or 6-digit hex color codes var reg = /^(#)?([0-9a-fA-F]{3})([0-9a-fA-F]{3})?$/; return reg.test(color); } The function is only called from within the $(document).ready() function though. What is best practice (syntax, speed); placing such a function inside or outside the jquery document ready function?

    Read the article

  • The most elegant way to encapsulate WinAPI callbacks inside a class

    - by FractalizeR
    Hello. I am thinking about elegant way to encapsulate WinAPI callbacks inside a class. Suppose I am making a class handling asynchronous I/O. All Windows callbacks should be stdcall functions, not class methods (I need to pass their addresses to ReadFileEx WinAPI function for example). So, I cannot just pass method addresses as a callback routines to WinAPI functions. What is the most elegant way to encapsulate functionality of this type inside a class so that the class have events OnReadCompleted and OnWriteCompleted (I am using Delphi as a primary language, but I guess the situation must be the same in C++ because class methods are different from simple methods by the fact, that the first hidden parameter of them is this link. Of course this class is not a singleton and there can be many of them created by app at the same time. What do you think would be the good way to implement this?

    Read the article

  • positioning a jquery dialog that is inside an iframe realtive to the parent window

    - by guy schaller
    hallo all i have a site which has a very big scroll on it, and there is an iframe in the middle set to have no scroll and its height is 3000 anyway the document being opened in the iframe has a jquery dialog in it. when im looking at the top of the parent and click a button inside the iframe that opens the dialog the dialog opens at the middle of the iframe and i cant see it... thats because its doing its calcualtions based on the document not the top document how can i change that? so if my scroll was all the way down in the parent the dialog inside the iframe will open at the bottom of the iframe where i can see it.. in other words realtive to positon of parent document. thanks in advance

    Read the article

  • google maps clicking inside a polygon

    - by amarsh-anand
    The following javascript snippet is supposed to do the following: As the user clicks on the map, initialize headMarker and draw a circle (polygon) around it As the user clicks inside the circle, initialize tailMarker and draw the path between these two markers 1 is happening as expected. But as the user clicks inside the circle, overlay is non-null while point is null in the function(overlay,point) . Can someone tell me a way out. GEvent.addListener(map, "click", function(overlay,point) { if (isCreateHeadPoint) { // add the head marker headMarker = new GMarker(point,{icon:redIcon,title:'0'}); map.addOverlay(headMarker); isCreateHeadPoint = false; // draw the circle drawMapCircle(point.lat(),point.lng(),1,'#cc0000',2,0.8,'#0',0.1); } else { // add the tail marker tailMarker = new GMarker(point,{icon:greenIcon,title:''}); map.addOverlay(tailMarker); isCreateHeadPoint = true; // load thes path from head to tail direction.load("from:" + headMarker.getPoint().lat()+ ", " + headMarker.getPoint().lng()+ " to:" + tailMarker.getPoint().lat() + "," + tailMarker.getPoint().lng(), {getPolyline:true}); } });

    Read the article

  • JavaScript code inside UpdatePanel

    - by Ed Woodcock
    Ok: I've got an UpdatePanel on an aspx page that contains a single Placeholder. Inside this placeholder I'm appending one of a selection of usercontrols depending on certain external conditions (this is a configuration page). In each of these usercontrols there is a bindUcEvents() javascript function that binds the various jQuery and javascript events to buttons and validators inside the usercontrol. The issue I'm having is that the usercontrol's javascript is not being recognised. Normally, javascript inside an updatepanel is executed when the updatepanel posts back, however none of this code can be found by the page (I've tried running the function manually via firebug's console, but it tells me it cannot find the function). Does anyone have any suggestions? Cheers, Ed. EDIT: cut down (but functional) example: Markup: <script src="/js/jquery-1.3.2.min.js"></script> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="Script" runat="server" /> <asp:Button ID="Postback" runat="server" Text="Populate" OnClick="PopulatePlaceholder" /> <asp:UpdatePanel ID="UpdateMe" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Postback" EventName="Click" /> </Triggers> <ContentTemplate> <asp:Literal ID="Code" runat="server" /> <asp:PlaceHolder ID="PlaceMe" runat="server" /> </ContentTemplate> </asp:UpdatePanel> </div> </form> C#: protected void PopulatePlaceholder(object sender, EventArgs e) { Button button = new Button(); button.ID = "Push"; button.Text = "push"; button.OnClientClick = "javascript:return false;"; Code.Text = "<script type=\"text/javascript\"> function bindEvents() { $('#" + button.ClientID + "').click(function() { alert('hello'); }); } bindEvents(); </script>"; PlaceMe.Controls.Add(button); } You'll see that the button does not poput the alert message, even though the code is present on the page.

    Read the article

  • Display a WPF window inside another

    - by Padu Merloti
    Before pointing me to http://stackoverflow.com/questions/1287820/have-a-wpf-window-inside-another-wpf-window or telling me that MDI is soooo 1995, let me explain my application. I'm creating a MessageBanner window that works similar to the message banner we see in several sites nowadays (including SO) I want client code to call my message banner using four different modes: MessageBanner.Show(content); MessageBanner.Show(content, ownerWindow); MessageBanner.ShowModal(content); MessageBanner.ShowModal(content, ownerWindow); I believe you got the application. The thing is that when ownerWindow is displayed, I want to display my MessageBanner window inside the ownerWindow. Any ideas on how to do it?

    Read the article

  • need to count the frequency of each terms inside a document

    - by Wai Loon II
    hi, i need to calculate the frequency of all the terms inside a document. How can i do that ? i do not ask for codes. I am just asking for guidance. Actually i am doing some similarity calculation between a document and query. I have calculated the term frequency for the query. But i do not know how to calculate the tern frequency for EACH words inside a document. Can anyone guide me ? Thank you for your attention.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >