SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Devilware's Avatar
    Join Date
    Oct 2005
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question calling contents from pages into one ..!

    Hey guys

    I have articles in my web site and each article is divided into 2-4 pages .

    each page has a content as follows:

    <div id="print_content">
    txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt </div>


    and I have made a print page that takes the content from article page

    and the code for the print page as follows:
    function Clickheretoprint()
    {
    var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
    disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25";
    var content_vlue = document.getElementById("print_content").innerHTML;

    var docprint=window.open("","",disp_setting);
    docprint.document.open();
    docprint.document.write('<html><head>');
    docprint.document.write('<style type="text/css">');
    docprint.document.write('.style13 {font-size: 10px}');
    docprint.document.write('.style39 {font-family: Tahoma}');
    docprint.document.write('.style40 {font-size: 9pt; font-family: Tahoma; }');
    docprint.document.write('.style45 {font-size: 10pt; font-family: Tahoma; color:black; }');
    docprint.document.write('.style47 {font-size: 9pt; font-family: Tahoma; color: black; }');
    docprint.document.write('.style48 {color: black;font-family: Tahoma;}');
    docprint.document.write('.style49 {color: black}');
    docprint.document.write('.style51 { font-size: 11pt;font-family: "Trebuchet MS";font-weight: bold;color: black;}');
    docprint.document.write('.style54 { color: black;font-weight: bold;font-size: 11pt;}');
    docprint.document.write('</style>');
    docprint.document.write('<title><% =sqlreadArticle("Article_name") %></title>');
    docprint.document.write('</head><body dir="rtl" onLoad="self.print()"><center>');
    docprint.document.write('<img src="../images/LogoPrint.jpg" border=0 >');
    docprint.document.write(content_vlue);
    docprint.document.write('<font color=black size=1pt face=Tahoma>جميع الحقوق محفوظة 2005م - دايف أريبيا.كوم©</font>');
    docprint.document.write('</center></body></html>');
    docprint.document.close();
    docprint.focus();
    }
    </script>



    it runs well but it takes only the first page of the article . I want to call and import the content of all article pages into one print page such as sitepoint articles . please can someone give me a hint

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This could be done with server-side script. Does your host provide PHP?

    For example, each page of article content could be in separate '.php' files. Then you could dynamically "include" them into any other page, in any combinations.

  3. #3
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (in response to a PM)

    I'm sure asp.net has something similar to php's "include" - but I know nothing about asp. Perhaps request that this thread be moved to the ASP forum?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •