Water mark on HTML Page

Hi,
Is it possible to have a page in BSP with watermark on it? We need to print details of an invoice also on this page.
Currently, invoice details are appearing. But the reuirement now is to have a watermark on the same page.
Any pointers regarding this would be helpful.
Rgds,
Bhargav.

just load the water mark image to the mime folder of your BSP and have the following code. (just above htmlb:content).
<style type="text/css">
<!--
BODY
-->
</style>
<htmlb:content design="design2003">
other resources
http://www.buildwebsite4u.com/building/web-page-backgrounds.shtml
http://www.dynamicdrive.com/dynamicindex3/fixback.htm
Regards
Raja

Similar Messages

  • How to mark a HTML page as "Out of date"

    Hello!
    I need a method to prevent the usage of the Back button in web browsers by my web users, and prohibit them to move back through old web pages. During this moving they should view "Page out of date" messages instead of old contents of previous pages.
    How can I do it? Any ideas, links, samples are welcomed!
    Thanks a lot!
    Alex

    One way to get unathorized access to a web application is the usage an old stolen application's web page. My task to prevent it. An old web page may contains some hidden fields with encrypted keys, or other protection data.
    We should analize this info each time on the server side to distinguish an old (may be stolen) page, and the new (from a valid user) one.
    But the usage of such kind protected pages is complex enough. To reduce this complexity I just want to mark all web pages as "expired". Then my users will see "Page out of date", when they try to get back to old pages in browsers. They cannot view "a valid old page" at all using browsers (they will get only the "Page out of date" page), and, concequently, they cannot send to my server requests using old links, and old protection keys. Any old data my be stolen data only using this way.
    In this case the protection algorithm on the server side is simplified. Now I have only one valid page in my application (the latest page).
    To expire the web page we should
    1) create the HTTP header like this:
    HTTP/1.1 200 OK
    Date: Fri, 30 Oct 1998 13:19:41 GMT
    Server: Apache/1.3.3 (Unix)
    Cache-Control: max-age=3600, must-revalidate
    Expires: Fri, 30 Oct 1998 14:19:41 GMT
    Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT
    ETag: "3e86-410-3596fbbc"
    Content-Length: 1040
    Content-Type: text/html
    2) provide on the server side some functionality to prevent just
    regeneration.
    My question was about samples, or ideas on this way to protect web apps for XE.
    It may be very useful, because I cannot find a legal way to use HTTPS (SSL) with XE.
    Thanks!
    Alex

  • Pdf stamping (water mark) functionality is not working in sharepoint 2010

    Hi
    I have developed custom handler(.dll) for pdf file stamping functionality using Ihttphandler in VS2010 with help of
    iTextSharp. deployed the hanlder in GAC and referred hanlder in handler section of the web.config file one of the
    Sharepoitin 2010 site. the stamping functionality is working fine when I am using <Mapping Key="pdf" Value="pdf16.gif"
    OpenControl = "Malag.OpenDocuments"/> mapping key for PDFs in DOCICON.XML. after doing all this settings when open any pdf
    from sharepoint site it opens in the browser with stamping (water mark) on each page of pdf file. Now i want open the file
    in Adobe Reader X with check out & check in options. i have changed mapping key for PDFs in DOCICON.XML file to <Mapping
    Key="pdf" Value="pdf16.gif" OpenControl = "PdfFile.OpenDocuments"/>. After changing when click on pdf file in site it opens
    adobe reader X prompting Chewck out & open etc.. option, if i select Open option the PDF file is not opening & showing
    message "There was an error opening this document. File open failed". Please let me know solution how to solve this issue.
    Here is my handler code..
    using System.IO;
    using System.Web;
    using Microsoft.SharePoint;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Configuration;
    using System;
    using Microsoft.SharePoint.Administration;
    namespace WSPPDFStamping
        class WSPPDFStampingHtppHandler:IHttpHandler
            public bool IsReusable
                get
                    return false;
            public void ProcessRequest(HttpContext context)
                        var siteId = SPContext.Current.Site.ID;
                        var sec = new SPSecurity.CodeToRunElevated(delegate()
                                    using (var site = new SPSite(siteId))
                                        using (var web = site.OpenWeb())
                                            SPFile file = SPContext.Current.Web.GetFile(context.Request.Url.ToString());
                                            string RequestedURL = context.Request.Url.ToString();
                                           // string connStringUrl = "";
                                            string connStringUrl = "";;
                                            bool isAdd = true;
                                            byte[] content = file.OpenBinary();
                                            SPUser currentUser = SPContext.Current.Web.CurrentUser;
                                            string siteWebAppRoot = "/" + SPContext.Current.Site.WebApplication.DisplayName;
                                            System.Configuration.Configuration rootWebConfig =
                                    System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(siteWebAppRoot);
                                            System.Configuration.ConnectionStringSettings connString;
                                            if (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count)
                                                //connString =
                                                //    rootWebConfig.ConnectionStrings.ConnectionStrings["PDFStampingURL"];
                                                //if (null != connString)
                                                //    connStringUrl = connString.ConnectionString.ToString();
                                                for (int i = 0; i < rootWebConfig.ConnectionStrings.ConnectionStrings.Count; i++)
                                                    string connStr = "PDFStampingURL" + (i + 1);
                                                    connString =
                                                        rootWebConfig.ConnectionStrings.ConnectionStrings[connStr];
                                                    if (null != connString)
                                                        connStringUrl = connString.ConnectionString.ToString();
                                                    if (RequestedURL.Contains(connStringUrl))
                                                        isAdd = true;
                                                        break;
                                                    else
                                                        isAdd = false;
                                            //if (!RequestedURL.Contains(connStringUrl))
                                            if (!isAdd)
                                                context.Response.ContentType = "application/pdf";
                                                context.Response.BinaryWrite(content);
                                               // context.Response.AddHeader("content-disposition", "attachment; filename=" + file.Name);
                                              // context.Response.AddHeader("content-disposition", "inline;filename=" + file.Name);
                                                context.Response.End();
                                                isAdd = false;
                                                return;
                                            string watermark = null;
                                            if (currentUser != null)
                                                watermark = "Document downloaded by " + currentUser.Name + " on " + System.DateTime.Now + " PST.";
                                            if (watermark != null)
                                                PdfReader pdfReader = new PdfReader(content);
                                                using (MemoryStream outputStream = new MemoryStream())
                                                    PdfStamper pdfStamper = new PdfStamper(pdfReader, outputStream);
                                                    BaseFont baseFont = BaseFont.CreateFont(BaseFont.HELVETICA_BOLD, BaseFont.CP1252, false);
                                                    for (int pageIndex = 1; pageIndex <= pdfReader.NumberOfPages; pageIndex++)
                                                        //Rectangle class in iText represent geometric representation...
                                                        //in this case, rectangle object would contain page geometry
                                                      iTextSharp.text.Rectangle pageRectangle = pdfReader.GetPageSizeWithRotation(pageIndex);
                                                        //PdfContentByte object contains graphics and text content of page returned by PdfStamper
                                                        PdfContentByte pdfData = pdfStamper.GetOverContent(pageIndex);
                                                        //create font size for watermark
                                                        pdfData.SetFontAndSize(BaseFont.CreateFont(BaseFont.HELVETICA_BOLD, BaseFont.CP1252, BaseFont.NOT_EMBEDDED), 8);
                                                        //create new graphics state and assign opacity
                                                        PdfGState graphicsState = new PdfGState();
                                                        graphicsState.FillOpacity = 0.7F;//= 0.4F;
                                                        //set graphics state to PdfContentByte
                                                        pdfData.SetGState(graphicsState);
                                                        //indicates start of writing of text
                                                        pdfData.BeginText();
                                                        //show text as per position and rotation
                                                        pdfData.ShowTextAligned(Element.ALIGN_MIDDLE, watermark, pageRectangle.Width / 4, pageRectangle.Height / 44, 0);
                                                        //pdfData.ShowTextAligned(Element.ALIGN_CENTER, "For Internal Use Only", pageRectangle.Width / 2, pageRectangle.Height / 2, 45);
                                                        //call endText to invalid font set
                                                        pdfData.EndText();
                                                        //Top text
                                                        PdfGState graphicsStateTop = new PdfGState();
                                                        graphicsStateTop.FillOpacity = 0.005F;//= 0.4F;
                                                        //set graphics state to PdfContentByte
                                                        pdfData.SetGState(graphicsStateTop);
                                                        pdfData.BeginText();
                                                        //pdfData.ShowTextAlignedKerned(Element.ALIGN_LEFT, "TEXT Left", 150, 628, 0);
                                                        pdfData.ShowTextAligned(Element.ALIGN_CENTER, watermark, pageRectangle.Width / 2, pageRectangle.Height - 13, 0);
                                                        //call endText to invalid font set
                                                        pdfData.EndText();
                                                        //Set 45 degree water mark
                                                        PdfGState graphicsState45 = new PdfGState();
                                                        pdfData.SetFontAndSize(baseFont, 38);
                                                        graphicsState45.FillOpacity = 0.07F;//= 0.4F;
                                                        //set graphics state to PdfContentByte
                                                        pdfData.SetGState(graphicsState45);
                                                        pdfData.BeginText();
                                                        //show text as per position and rotation
                                                        pdfData.ShowTextAligned(Element.ALIGN_CENTER, "Registered For Internal Use Only", pageRectangle.Width / 2, pageRectangle.Height / 2, 45);
                                                        //pdfData.ShowTextAlignedKerned(Element.ALIGN_LEFT, "TEXT Left", 150, 628, 0);
                                                        //call endText to invalid font set
                                                        pdfData.EndText();
                                                    pdfStamper.Close();
                                                    content = outputStream.ToArray();
                                            context.Response.ContentType = "application/pdf";
                                            context.Response.BinaryWrite(content);
                                           // context.Response.AddHeader("content-disposition", "attachment; filename=" + file.Name);
                                         //   context.Response.AddHeader("content-disposition", "inline;filename=" + file.Name);
                                            context.Response.End();
                        SPSecurity.RunWithElevatedPrivileges(sec);
    web.config file of share point site
    <handlers>
        <add name="PDFWatermark" verb="*" path="*.pdf" preCondition="integratedMode"
    type="WSPPDFStamping.WSPPDFStampingHtppHandler, WSPPDFStamping, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=835cc3a26d74a89a" />
        </handlers>
    thanks in advance.
    jampani venkateshwar rao.

    Time to engage in basic debugging. Alter your script to remove all the extra steps and generate logs as it goes along, then gradually re-enable each part so you can work out where it's bombing out. It doesn't sound like a problem with Reader itself, and as Claudio says we're not here to provide support for non-Adobe software.

  • Why does Firefox not display symbols and diacritic marks correctly in html pages

    I reset my profile because of a problem displaying a particular web page.
    I am now using the reset profile. Using this profile Firefox does NOT correctly display symbols and diacritic marks in my html pages. Such pages were correctly displayed in my old profile. They are pages containing text in French and Spanish.
    Examples: é «
    Why aren't the symbols and marks displaying correctly in a brand new profile when they displayed correctly in my old profile.

    What is View > Character Encoding set to? In my installation it's set to UTF-8.

  • Putting a water mark in the form

    Hello all,
    My requirement is to have a water mark image in the adobe form.
    Kindly let me know the procedure to do this.
    Thanks and Regards
    Rajesh

    Hi Rajesh
    You cannot add a PDF watermark to a form created in LiveCycle Designer, unless that form was created with a fixed PDF background or you need to use LiveCycle ES 8.0(but it doesn't support SAP) {Reference.  http://blogs.adobe.com/security/2008/01/pdf_watermark_demonstration.html}
    I'm not completely sure, but I think the best way you could do is add an image to Master page. To do this you'll need to create the watermark text as in image file. 
    STEPS:
    1.  Add image field to master page
    2.  click on image field and set the image
    3.  On the "Object" tab for the image field, change the field type to static image.
    Regards
    Pradeep Goli

  • Problem with printing multiple Embedded PDF in HTML page

    I have a list of embedded pdf in a html page to be printed in particular order. Using following java script i am trying silently print the pdf one by one. <br /><br />var objectList=document.getElementsByTagName("object");<br /><br />for(i=0;i<objectList.length;i++){<br />   priobj=document.getElementById(objectList[i].id);<br />   priobj.printAll();<br />}<br /><br />Actually the order of call to the printAll methods works correctly.  But the printing of PDF are not is correct order of call. <br /><br />Any Inputs or directions or workarounds on this issue will be really appreciated.<br /><br />Thanks a lot<br /><br />Prem

    HI,
    wat i understand is u r trying to loop at a variable window .but tht is not suggestable.
    write a loop in program lines. read the values in to different variables and the try printing them as text elements that will solve the problem.
    or else in other way use a template and that can also solve the problem.

  • Can a menu link to .html pages?

    I want to make a DVD that will start with a video introduction, and upon finishing the brief minute or so intro, it will display a menu screen.
    1.) I would like the menu buttons to link to .html pages saved on the DVD. So after clicking on a link from the menu, it will open up a full-screen .html page.
    2.) Each .html page will link to other .html pages and have embedded images, and short quitcktime video clip links that will open up in small windows when links are clicked.
    3.) I need to have a link on each .html page that links back to the main dvd menu.
    Can this be done? Any issues with doing something like this?
    Thanks in advance for any advice!!!!

    Mark - you need to read up on DVD@ccess if you intend doing this through DVDSP. Yes, it is all possible, but you haven't quite got the way it works correct.
    What happens is you embed a URL into a menu. When the menu is accessed (typically by a button from a previous menu) the link is activated and the resource is launched. This opens in a window in front of the DVD playback window. The DVD player continues to run in the background - so you need to allow for that when returning. The viewer will simply close the web browser window and be back at the DVD window - by then you should have made the @ccess menu 'time-out' and return to the previous menu.
    You set up the HTML file (or whatever file you are using) in a folder on your Mac, and place it all within a parent folder. From within DVDSP you then use the property Inspector for the disc itself (click not he disc icon in the outline view) to specify a ROM folder. You browse for the parent folder you just created. Everything inside that will get added to the root level of the DVD, which is why you place your HTML inside a folder within that parent folder (unless of course, you don't mind your HTML file/s being scattered all over the root of the DVD).
    You set the URL for the @ccess link by using the following path format:
    file:///DVDname/ParentFolderName/filename.extension
    So if your html file is called 'index' and it is in a folder called 'ROM' on your DVD called 'Project' then the URL you set in the menu would be:
    file:///Project/ROM/index.html
    This should then get activated (as long as you have enabled DVD@ccess links in your DVD Player software).
    However, there are some caveats.
    Whilst this will work quite well on a Mac, a PC user will have a wildly varied experience - for some the links will work. For some the links won't work, and for some, all links will launch the moment the first link is encountered... ALL PC users will need to install the DVD@ccess software (which will be on the built DVD by default (DVDSP includes it there for you), unless they have already done so previously (unlikely).
    In order to maximise the experience for PC users and Mac users you should consider using Sonic's 'eDVD' to add the hyperlinks. This makes use of the Interactual player which has a far higher installed base in PCs, but will need installing in Macs. Again, this gets included on the disc when you use eDVD.
    eDVD is a PC only app - you'll need to build your project and transfer the VIDEO_TS folder to a PC, add the links and then burn it to disc or use software such as Gear Pro to create a DLT. Hopefully Jim (WTS) will see this and give more advice on how to use eDVD.
    Getting DVD@ccess working on a PC is a tricky thing to do - a lot depends on the PC software spec, and since you can't govern the user's choice in this, you are walking a tightrope of compatibility.
    Of course, you could simply set some text into your menu to say that there is additional content on the disc, and let the user browse to it at their leisure instead of relying on embedded links...

  • How to put water mark in web dynpro abap Adobe forms

    Hi
    Can any body tell me how to put water mark in web dynpro Abap adobe forms ,
    actually I need to print water mark as back ground in gray color.
    Points will be rewarded of Helpful answer..!
    Regards,
    Sidram

    Hi,
    for more information about layout options in forms, go to your form in transaction SFP, layout view and choose Help -> Adobe LifeCycle Designer Help. There you find information on page layout, e.g. " Objects can be placed anywhere on a master page, inside or outside the content area. As a general rule, do not place objects inside the content area unless your intention is to have other objects laid down on top of the master page objects when the form is rendered. If you are setting up a watermark, place it inside the content area. "
    Besides, there's an Adobe forum where you might get more information for such Adobe questions.
    Regards, Heidi

  • Viewing HTML page saved  on the server from the browser

    Hi all
    In my application i am having some HTML pages saved on the server. I had given an option to the user to view the HTML page from my application. behind the scene what i am doing is that the view request will get handled by a servlet and from that servlet iam locating the HTML page on the server directory and sending the HTML page to browser by using the Servlet OutputStream. The HTML page is shown on the browser but the attached images are not shown. The images are also there in the server directory and are refered in the HTML file correctly. When i directly open the HTML file then the images are shown correctly.
    Can anyone suggest wat's wrong there.
    The code i m using is
    ServletOutputStream out=response.getOutputStream();
                        if(format.equalsIgnoreCase("pdf"))
                             logger.info("Seleted format is pdf..\n");
                             response.setContentType("application/pdf");
                        else
                             logger.info("Seleted format is html..\n");
                             response.setContentType("text/html");
    String file = ReportingConstants.URL_GENERATEDREPORTS+reportPath+itemName;
    // file : HTML file absolute path as string.
                        URL url=new URL(file);                    
                        BufferedInputStream bis=new BufferedInputStream(url.openStream());
                        BufferedOutputStream bos=new BufferedOutputStream(out);
                        byte[] buff = new byte[2048];
                        int bytesRead;
                        while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
                             bos.write(buff, 0, bytesRead);
                             bos.flush();
                        }

    You have to undertsand how the browser handles images and other resources in a HTML page. In the HTML there is an image tag that has a url to an image which can be a reletive url or an absolute url (starts with a "/").
    If the url is a relative url the browser interprets the url as being relative to the url currently displayed in the address field discarding the last element of the url . So if the url in the address bar is http://www.myserver.com/myapp/mypage.html and the relative url is images/myimage.jpg, the browser will submit a request to the server for http://www.myserver.com/myapp/images/myimage.jpg
    Now let's say that you are call mypage.html from a servlet that has the url http://www.myserver.com/myapp/servlets/myservlet. Then when the browser tries to retrieve myimage.jpg it will use the url http://www.myserver.com/myapp/servlets/myservlet/images/myimage.jpg and since this is incorrect it will not be able to display the images.
    One solution to this is to change all of the image urls to absolute urls. That is the start with a slash where the slash represents the start of the url after the application domain name. For example you used an absolute url for myimage.jpg it would look like /images.myimage.jpg and when accessing the page through the servlet url (http://www.myserver.com/myapp/servlets/myservlet) the browser will discard everything after http://www.myserver.com/myapp and look for the image at http://www.myserver.com/myapp/images/myimage.jpg which is the correct url.
    A second solution is to use the HTML BASE tag which tells the browser not to interpret the image tag urls (and other resourses) using the current url in the address bar but to use the url supplied in the HTML BASE tag. The browser will still perform the same process for relative urls but now relative to the BASE tag url. Since the BASE tag url will be the same every time the page is accesssed the images should be correctly accessed no matter how the page is accessed (eg directly, using RequestDistpatcher or via your servlet)

  • How to display HTML pages always in first rank in search result?

    I have a sharepoint 2010 site where search is configured, but when it is displaying the search result some time it is  showing the pdf files  in the first order and the html pages in the second order, I need to display html pages always
    in the first order.How can I accomplish it?

    Alex's link is by far the best one but this is an alternative if you wanted to read a bit more widely
    http://sharepointkaos.wordpress.com/2011/01/13/custom-ranking-model/
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Insert Water mark on current document

    I have some documents that I want to insert a watermark on them behind the text.
    A simple diagonal faded red OVERDUE or COPY across the page behind the text.
    In MS Word this was quick and easy. I cant find a way to do this in Pages. I tried a Help search and it brings up some stuff about floating and inline objects, but nothing that obviously seems to help in creating a watermark
    Anyone know if Pages can do this?
    Thanks
    Neil

    WP mode or layout mode....do not know it says Word Processing at the top of the document so I assume WP mode. This is an existing document.
    I created the text box and put in the text.
    I can drag the text box edges, and that resizes the box, but not the text, so I have to get out of that and hit the fonts button and enter numbers to expand the text size manually, then re position the box, change the text size, possibly change the text box size again, etc.
    I want to expand the text to a size that fills the page, and at an angle that just looks correct. Is there a way to grab the edge of the text box and drag it so that it expands the text and changes its angle by dragging without having to use the clumsy inspector way of doing it. I want the text to auto fill/fit in the box and then drag the handles of the box to fit it to the page.
    I eventually created a watermark that looked correct and did
    +Menu > Format > Advanced > Move object to section master+
    but now when printed it does not look correct and I need to change it. How do I get back to it to edit it again? I cant seem to select it again. I would appear I need to access the 'Section master' since that is where the object is moved to.
    The Sections icon in the toolbar is greyed out and after reading through the help on Sections I cant seem how to do it.
    This is far harder to learn that I imagined it would be. In Word this is a menu item, Format, Background, Insert Printed Water Mark, you type your text and in it goes, sized and fitted per page. This is v. difficult in comparison. Will send feedback and put in a feature request
    Anyway, thanks to your help at least I am getting it done.

  • How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget

    Hi,
    I have a requirement as below:
    1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
    2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages  which are hosted in my sharepoint site.
    Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
    Thanks.
    Knowledge is power.

    Hi Manoj,
    As I understand, you would like to display SharePoint page in another platform.
    Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
    From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
    page could be displayed on other platform.
    Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
    https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • How to embed a HTML Page in a Web Template and display it

    Hi All
    Can you please share ideas how I can embed a HTML page in a web template and how I can make it displayed as a popup when a button is pressed.
    Also, how do I call a HTML page stored in Portal KM from the press of a button in the web template.
    Your help is greatly appreciated.
    Thanks
    Karen

    Using C# or javascript to authenticate the user to AD to read the property directly will be very difficult. Creating a custom user profile property and adding a sync from AD to that property is definitely the easiest way to do what you are describing.
     Once its in User Profiles there are lots of samples on how to add it to the page.  
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Script to print an html page in both sides (duplex printing)

    Hi,
    I have a website that can print page automatically without showing the print dialog box. Now, user's have requirement to print the page in both sides.
    Is there any vbscript/javascript that will auto print the html page in both sides (duplex)
    Thank You!

    Hello,
    This should be asked in Microsoft's ASP.Net forums:
    http://forums.asp.net/
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • Open Html page as dialog

    Hi,
    I am trying to open a html page, which is available in my site pages using the dialog box.
    I have tried the below code, but it is not working. Page is not opening as a popup.
    lblMessage.Text += "<a class='openinwindow' href='" + clickHereUrl + "' onclick='javascript:OpenPopUpPageWithTitle('" + clickHereUrl + "',null,null,null,'Test Name')>Click Here</a>";
    I have added reference to sp.js,sp.ui.js, sp.ui.dialog.js.
    How to fix this?
    Thanks

    Check this thread, can be helpful for you
    http://social.technet.microsoft.com/Forums/en-US/a1cec8f9-260d-4514-b452-5d1cc5c2d324/sharepoint-modal-popup?forum=sharepointdevelopmentprevious
    OR
    you can also check it with below code.
    <script type="text/javascript">
    function openDialog(eid, etitle) {
    var options = {
    url: "employeedetail.aspx?IsDlg=1&eid=" + eid,
    title: etitle,
    allowMaximize: false,
    height: 500,
    width: 600,
    showClose: true
    //SP.UI.ModalDialog.showModalDialog(options);
    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
    </script>
    and for calling in your anchor tag you can use below code.
    <a href="javascript:openDialog('<%= empLoyeeID("ID") %>','Employee Title"')">
    you can pass url as I am passing ID in above code.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

Maybe you are looking for