w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Showing html page inside a php page by echo the html page contents
hmm, a simple html page: <html> <head> <title>Page title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="your-style-file.css" media="all" /> <script type="text/javascript" src="your-javascript-file.js"></script> </head> <body> <div id="div-tag">A div tag</div> <script type="text/javascript" src="another-javascript-file.js"></script> </body> </html> You can load external html file via javascript (or jquery load()). like this: $('#div-tag').load('external-file.html'); Or via php, like this: $external-html = file_get_contents('external-file.html'); print $external-html; Check your javascript, mayb

Categories : PHP

window.location.href inserts new page inside of current page
It's usually used as follows: window.location.href = "newpage.html" href is NOT a function, but a property. References: https://developer.mozilla.org/en-US/docs/Web/API/window.location I think you may have been confused with window.location.assign("http://whatever") method Caveat: href(url) may work on some browsers (IE???), but definitely not in FireFox - it gives an explicit "Not a function" error when run via JS-Execute

Categories : Javascript

Ember inside static page as a part of the page - how can I use named anchors?
I think you might be looking for the rootElement property: App = Ember.Application.create({ rootElement: '#ember-container' }); Search rootElement in the api doc for Ember.Application.

Categories : Ember Js

Why when loading page inside another using ajax the parent posts back to the sub page?
You should not load the whole ASPX Page into the DIV because when you make a AJAX request to get an ASPX page from the server and load it into the DIV, actually some parameters like ViewState of the main page gets overwritten. Accordingly the ViewState will gets corrupted however if you load a HTML Page into a DIV, you can see it will be working fine. So, Instead get the Data in the JSON Format and load in into the DIV accordingly Hope it answers your question!!

Categories : Asp Net

How to increase the height of iframe of container page from the page shown inside it
Specify the context in which the selector should be applied: $("iframe", window.parent.document).css("height","1000px"); Here is an example with different files: http://www.css-arts.com/iframe_test/iframe_test.html Browsers usually blocks the access to the iframes parent when the iframe content page is another domain than the parent page. If this is the case you have no chance.

Categories : Javascript

pass form values from one page to a hidden iframe inside page
If I've understood you correctly, you want to pass some input parameters without the page reload. If so, then you should dig into ajax in order to call asynchronously different parts of the web page. Fortunatelly there are many frameworks that can help you. I prefer Knockout.js, but you can use for instance Angular.js or Backbone.js and so on.

Categories : Javascript

How do I find all controls of a particular type from a page inside a master page?
RadComboBox exposes an array at client-side that contains all RadComboBox instances. This array can be accessed like: Telerik.Web.UI.RadComboBox.ComboBoxes For example: If RadComboBox controls are embedded in another control, you can simply get these controls from the array described above. Here is an example of radcombobox nested inside a Grid: <telerik:RadGrid ID="RadGrid1" runat="server" ...> ... <EditItemTemplate> <telerik:RadComboBox ID="RadComboBox1" runat="server"></telerik:RadComboBox> <telerik:RadComboBox ID="RadComboBox2" runat="server"></telerik:RadComboBox> <telerik:RadComboBox ID="RadComboBox3" runat="server"></telerik:RadComboBox> </EditItemTemplate> ...

Categories : C#

simple login page and welcome page (2 html files) with angularjs
Well actually most of the Javascript MVC-s main features belong to single page applications, you should look more the features which belongs to component based solutions. One of component based framework in JS is Flight by Twitter. http://twitter.github.io/flight/ JavascriptMVC http://javascriptmvc.com/

Categories : Angularjs

Load other page HTML inside page or DIV element
You need to remove css classes from other_page.html which are conflicting with base page. Best practice is that do not apply css classes for ajax pages (other_page.html is your ajax page as you are getting content of it by jquery load method) only get page content. And on main page write required classes for Ajax content. This will resolve your problem

Categories : Jquery

How to redirect /page/index page to /page (and /page to /page/) in Ruby on Rails?
If you don't want to cause a full reload of the page, then you should not use "redirect" in your routes, as that simply issues a browser redirect. That would cause Rails to issue a 301 "Moved Permanently". That essentially means "there is a /page/index route but it's a mistake, we don't use it anymore, please go to /page instead and never come back here." If that is the case then that is what you want to do. If you're using Passenger and will continue to use Passenger, it would be more efficient to put an Apache redirect rule in the htaccess file. It also seems strange that this is even an issue. How have /page/index, /page, and /page/ emerged in the wild as URLs that all point to the same index#index action? What is this index controller? The usual thing is to have, say, a PagesControlle

Categories : Ruby On Rails

Unicode signs shown on development page, but not on actual page with same code
Try putting this in your <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Also, try changing the de-DE in the <html> tag to <html lang="de" prefix="og: http://ogp.me/ns#"> let me know if that works

Categories : CSS

how to run method in master page before execute child page code in IsPostBack?
You need to have a look at the ASP.NET Webforms page lifecycle in order to understand what happens when. Here is some docs regarding that: http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx#lifecycle_events The problem you have at the moment is that the Button click event happens after the Page_Load event, so when you click the button you probably experience that Label1.Text is one click "behind". Look at the docs and place the Label1.Text assignment in PreRender for example. Like @ArabicProgrammer is answering, it is better yet to actually make use of the Culture support that is available in the .NET Framework. If you use that method instead, you can display the language using something like this. <%= System.Threading.Thread.CurrentThread.CurrentCulture.DisplayName %

Categories : C#

node.js page in different tabs shows the same page source code
Yes, it's because your browser caches page sources and when you are trying to view it, shows the latest loaded page. If you add some logging, you'll understand what i mean. http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.write('<p>' + Math.random() + '</p>'); res.end(); console.log('Message has been sent'); }).listen(3000); When you open your page in new tab, you can see in console that browser loads new version of it. But when you trying to view the source browser doesn't load anything. If you want to avoid this behaviour, try to reload the source, after you open it.

Categories : Node Js

how to use ZeroClipboard.js to copy static word when page load copy to clipboard
As mentioned in the comments, this requires a user interaction. I recommend having a div with this style. .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; text-align: center; background: rgba(255, 255, 255, .5); } Bind zero clipboard to that, and instruct the user to click to copy the text and continue. Users should always be notified of their clipboard modifications. If you end up replacing their college thesis with some arbitrary text, without warning, they might not be so happy...

Categories : Javascript

C# Code only getting pagesource for visible page, not for scrolled down page
using HtmlAgilityPack; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication5 { class Program { static void Main(string[] args) { WebClient wc = new WebClient(); var sourceCode = wc.DownloadString("http://dota-trade.com/equipment?order=name"); HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(sourceCode); var node = doc.DocumentNode; var nodes = node.SelectNodes("//a"); List<string> links = new List<string>(); foreach (var item in nodes) { var link = item.Attributes["href"].Value; links.Add(link.Contains("h

Categories : C#

insert html code to a page via php script in other page
As Filippo Toso said, you may include the HTML file in your code.php. Perhaps, if you don't want to have two files, you may make only one file and set the form to act like that: <form id="createNewGallery" name="newgallery" method="GET" action="./"><p><strong>please choose the number of pictures you want to upload: </strong> <select name="numOfPictures" id="numOfPictures"> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> </select></p> <input name="submitNumOfPictures" type="submit" /> <

Categories : PHP

 will not display the page - will not let me see the page
Your problems is most likely that TinyMCE escapes all HTML tags. To allow code to be embedded without adding the security risk of allowing other HTML tags to be inserted, I think this is what you want: https://code.google.com/p/tinymce-pre-plugin/

Categories : Javascript

Page-up doesn't work inside bash inside conqueterm inside vim
Bind is a bash built-in command. It is nothing to do with vim. PgUp and PgDown is used by vim on the most usual way, and You cannot show bash command history in vim. Actually You can, but it seems to be pointless to me. If I know well the best place for key-bindings for bash is the ~/.inputrc file. I added your lines to it "e[5~": history-search-backward "e[6~": history-search-forward And it works well! But the "standard" way is the up and down arrow for these. Please describe what is your goal! ConqueTerm interprets "e" (escape) before bash does. This is why this would not work.

Categories : Bash

How to Convert Multi-Page PDF files to Multi-Page Tiff with out installing any exe
You should always research thoroughly before asking the question here. Example might contain your answer.

Categories : C#

JQuery Function not firing on page load it works only after i refresh page or re-visit the same page again
Well I got the general gist of your question but the entire question description is pretty confusing so I'll try to just help you out where I think it counts. var leftbar = $(".pg-left-bar").height(); var rightbar = $(".pg-right-bar").height(); if (leftbar >= rightbar) { $(".pg-right-bar").css({ "height": leftbar + "px" }) }else{ $(".pg-left-bar").css({ "height": rightbar + "px" }) } I omitted your magic numbers and the other code to make the change apparent but I think your issue was due to the lack of "px" being concatenated to the ends of your css declarations. If this isn't the issue would you mind showing a full example.

Categories : Javascript

how can I pass a variable from an input box on one page to another page and use this info to perform a search on page 2?
Did you try and search for the answer first? This should help you... Link to your question that has already been answered

Categories : PHP

With Flying Saucer, how do I generate a pdf with a page number and page total on every page at the footer?
In your html, you need to put this somewhere in the body tag: <div id="footer"> page <span id="pagenumber"></span> of <span id="pagecount"></span> </div> And this should be your css/style: #footer { position: running(footer); text-align: right; } @page { @bottom-right { content: element(footer); } } #pagenumber:before { content: counter(page); } #pagecount:before { content: counter(pages); } You can learn more about that @bottom-right option here.

Categories : Java

How can the Page Size, Page Orientation, and Page Margins of an ods Spreadsheet Be Set Using ODFDOM?
The necessary calls can be made to some of the underlying ODF objects which the SpreadsheetDocument provides access to. First, we need to get the proper document properties reference (for all examples, "spreadsheet" is a reference to a created SpreadsheetDocument): StyleMasterPageElement defaultPage = spreadsheet.getOfficeMasterStyles().getMasterPage("Default"); String pageLayoutName = defaultPage.getStylePageLayoutNameAttribute(); OdfStylePageLayout pageLayoutStyle = defaultPage.getAutomaticStyles().getPageLayout(pageLayoutName); PageLayoutProperties pageLayoutProps = PageLayoutProperties.getOrCreatePageLayoutProperties(pageLayoutStyle); Then, we can set the various properties, such as margins, orientation, and height/width. Note that the height and width values seem to

Categories : Java

how to display a coming soon page when a page doesn't have an index page using htaccess
I'm guessing that for http://domain1.com/, you've got the document root pointed to /domain1.com/, which means it will never be able to access files outside of the document root. You'll need to move the comingsoon.php file to the /domain1.com/ folder and include the same ErrorDocument. Another option is to include the full hostname in the original error document: ErrorDocument 403 http://maindomain.com/comingsoon.php But this will change the location in the browser's address bar.

Categories : Htaccess

XCode "Add Copy Files" build phase fails to copy header files when building universal framework
I found that one of the workaround is - just open and save all the files you included in the copy build phase and then build (Cmd+B). (just make the file dirty by adding a space so that modified date is updated)

Categories : IOS

ajax popup extender with aspx page inside iframe inside panel
Try this way <asp:Panel ID="pnlPopUp" Style="display: none ;padding:3px;" runat="server" > //Test.aspx page is a page which you want to show as a popup <iframe id="frame1" src="Test.aspx" style="overflow: auto;height:200px; width: 100%;" scrolling="auto"></iframe> </asp:Panel> <asp:ModalPopupExtender ID="mdlPopup" Y="50" runat="server" BehaviorID="mpe" TargetControlID="btnShowPopup" PopupControlID="pnlPopUp" BackgroundCssClass="bModal"> </asp:ModalPopupExtender>

Categories : Ajax

Find a repeater inside a unordered list inside a master page?
The reason your code (as-written) isn't working, is because that Repeater is nested within 2 other server controls: <li runat="server"> and <ul class="categories" runat="server" id="categorylist">. This means the Repeater is in a different "naming container" than your top-level elements, and isn't directly accessible from you masterpage's codebehind file. To fix this, you need to either Remove runat="server" from those controls (if you don't actually need to access them from the server side code). This will allow your code to work the way it is now. Or, Add an ID to the <li> element, and then use the FindControl method to access your nested Repeater. Option two would look something like this (we'll assume you gave the <li> an ID of "categoryItem"): i

Categories : Asp Net

parallax refreshing the page not taking the page to the landing page
Did you try: document.getElementById("body").scrollTop = 0; If this doesn't work, you may want to replace the "body" element id with the id of the container of your parallax section. If you need parallax-specific scrolling help, my company and I have a list of parallax tutorials at http://potentpages.com/parallax-tutorials/. You will likely want the jQuery section. A tutorial there may be able to help you if the "scrollTop" solution doesn't work.

Categories : Misc

How to copy the page with current date?
Try: Page myPage = ... // the Page object Date date = new Date(); SimpleDateFormat df = new SimpleDateFormat("_yyyy-MM-dd_HH-mm"); String newName = myPage.getName() + df.format(date); pageManager.copy(myPage, newName, null, true, false); NOTE: As I am not 100% sure of what .getName() actually returns, it is possible that you will need to cut off any file name extention (.html ?) it may return and then tag it back on for the call to .copy(...).

Categories : Java

How to copy content from a dynamic page using PHP?
Use cURL to get the page content and then parse it - extract the <pre> section. $ch = curl_init(); // Set query data here with the URL curl_setopt($ch, CURLOPT_URL, 'val=24655740&db=nuccore&dopt=fasta&extrafeat=0&fmt_mask=0&maxplex=1&sendto=t&withmarkup=on&log$=seqview&maxdownloadsize=1000000'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, '3'); $content = trim(curl_exec($ch)); curl_close($ch); // show ALL the content print $content; $start_index = strpos($content, '<pre>')+5; $end_index = strpos($content, '</pre>'); $your_text = substr($content, $start_index, $end_index-$start_index); UPDATE Using the link from @ovitinho's answer - it now works :)

Categories : PHP

Cocoa code- how to print 1024 bytes of a file in one page and next 1024 bytes in the next page after pressing the next button?
Each call to the next method appends the hex output to the instance variable (?) string. You have to start with an empty string in the next method. Either call [string setString:@""]; at the start of next, or replace the instance variable with a local variable NSMutableString *string = [[NSMutableString alloc]init]; in the next method. Also, as trojanfoe correctly commented, you should not call [textview setString: string]; 1024 times inside the for-loop, but call it once after the loop.

Categories : Objective C

Frame control load new copy of page
I found a solution: In this case better to create instance of the class explicit in code behind and then push to content property of the frame: MyClass my = new myClass(); if (Frame1.Content == null) { Frame1.Content = my; } or if (Frame1.Content == null) { Frame1.Content = new MyClass(); } Also this will speed up loading of page.

Categories : Wpf

ABCPDF: Split PDF files into single page PDF files
So I talked to the support at WebSuperGoo (The creators of ABCpdf) and they gave me the following: Doc theSrc = new Doc(); theSrc.Read("C://development//pdfSplitter//Bxdfbc91ca-fc05-4315-8c40-798a77431ee0xP.pdf"); int srcPagesID = theSrc.GetInfoInt(theSrc.Root, "Pages"); int srcDocRot = theSrc.GetInfoInt(srcPagesID, "/Rotate"); for (int i = 1; i <= theSrc.PageCount; i++) { Doc singlePagePdf = new Doc(); singlePagePdf.Rect.String = singlePagePdf.MediaBox.String = theSrc.MediaBox.String; singlePagePdf.AddPage(); singlePagePdf.AddImageDoc(theSrc, i, null); singlePagePdf.FrameRect(); int srcPageRot = theSrc.GetInfoInt(theSrc.Page, "/Rotate"); if (srcDocRot != 0) { singlePagePdf.SetInfo(singlePagePdf.Page, "/Rotate", srcDocRot); } if (sr

Categories : C#

Make a copy of an aspx page without Ambiguity errors
Just change the name of the code-behind class. For example, from: public class SomePage : Page { To: public class SomePagePublic : Page {

Categories : Asp Net

Excel vba how to copy sheet with all formatting & page setup
I see two problems with your 1st piece of code... You are using Activeworkbook. When you add a new workbook, the new workbook becomes your active workbook :) The second problem is the DOT before .Sheets.Count in wb.Sheets(.Sheets.Count). why pick the count from the workbook you are copying? Try this Sub Sample() Dim thiswb As Workbook, wb As Workbook Dim newtab As Worksheet Set thiswb = ThisWorkbook Set wb = Workbooks.Add() With thiswb .Sheets("Sample Attendance").Copy After:=wb.Sheets(wb.Sheets.Count) Set newtab = wb.Sheets(wb.Sheets.Count - 1) End With End Sub

Categories : Excel

Access function in a JS page from another JS page on page load
Scripts are loaded asynchronously, so you never know which file will load first. Most probably one with less bytes. If you want to load scripts in order you provide, use library like requirejs.

Categories : Jquery

How can I copy a page to a given path, if the parent of the target destination does not exist yet?
How would PageManager know what content to use to create "target"? Why not just check if target exists & create it yourself if not, with whichever template you want to use? Page page = "pagePath"; ResourceResolver resourceResolver = getResourceResolver(); Resource parent = resourceResolver.resolve(pagePath + "/target"); PageManager pageManager = resourceResolver.adaptTo(PageManager.class); if (parent.getResourceType().equals(Resource.RESOURCE_TYPE_NON_EXISTING) { pageManager.create(pagePath, "target", "SOME_TEMPLATE_NAME", "SOME_TITLE"); } pageManager.copy(pagePath, pagePath + "/target/newPage", null, true, false);

Categories : Java

using addEventListener to live copy to a summary page, running into a bit of an issue
wrap var ac1DIV = "<div class='summaryDIV'>" + accountCoordinator1GV + "</div>"; as var ac1DIV = $("<div class='summaryDIV'>" + accountCoordinator1GV + "</div>"); try var accountCoordinator1GV = function () { var accountCoordinator1GV = $("#accountCoordinator1").val(); var ac1DIV = $("<div class='summaryDIV'>" + accountCoordinator1GV + "</div>"); $("#summaryAccountCoordinator1").append(ac1DIV); };

Categories : Javascript

Adding JavaScript Code to A Single Page in Joomla (Google Remarketing Code)
You could use a module which allows to run custom code in it. There are several solutions to this in the JED: http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules

Categories : Javascript

AJAX code for calling code-behind method from aspx page doesn't work
try this: in your anchor do this: <a href="javascript:void(0)" id="kontakt">Go to Kontakt</a> and modify your ajax script to this: $('a').click(function (e) { var data = { 'id': $(this).attr("id") }; var dataVal = JSON.stringify(data); $.ajax({ type: "POST", url: "Default.aspx/loadNewPage", contentType: "application/json; charset=utf-8", data: dataVal, dataType: "json", success: function (id) { } }); });

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.