How do I post to a new page when the 1st page is full?

How do you create a bul. board where the posts go on a 2nd
page when the first page is filled ...and 3rd page when 2nd is
full, etc ... Maybe I can stick a wordcount in a while loop before
the CFOutPUT Tag? Is there such a variable that holds a word count
or better still, a line count?
thnx a billion, please, please help!

Check out this code-Use a cfc which will be the same for you
and then change my query for yours in the .cfm HTHs:
functions.cfc:
<cfcomponent output="yes">
<!--- Next x record function --->
<cffunction name="nextXpage" access="public"
returntype="struct" hint="Next x page function" output="No">
<cfargument name="recordcount" required="Yes" default="0"
type="numeric" hint="The total numbers of records / values">
<cfargument name="page" required="Yes" type="numeric"
default="0" hint="The page number that you are currently on. (for
example URL.page)">
<cfargument name="maxrows" required="No" type="numeric"
default="10" hint="The maximum records / values to be displayed per
page">
<!--- Define the return structure --->
<cfset var nextXpage = structNew()>
<!--- Calculate how much page are available according to
the maxrows displayed --->
<cfset nextXpage.pagecount =
CEILING(arguments.recordcount / arguments.maxrows)>
<!--- Set the maximum rows to be displayed --->
<cfset nextXpage.maxrows = arguments.maxrows>
<!--- Set the currentpage --->
<cfset nextXpage.currentpage = arguments.page>
<!--- Set the currentpage --->
<cfset nextXpage.recordcount = arguments.recordcount>
<!--- Set the startrow value --->
<cfif arguments.page eq 1>
<cfset nextXpage.startrow = 1>
<cfelse>
<cfset nextXpage.startrow = (arguments.page *
arguments.maxrows) - (arguments.maxrows -1)>
</cfif>
<!--- Define the previous and next values. --->
<!--- Next values --->
<cfif arguments.page neq nextXpage.pagecount>
<cfset nextXpage.next = true>
<cfset nextXpage.nextpage = arguments.page + 1>
<cfelse>
<cfset nextXpage.next = false>
<cfset nextXpage.nextpage = 1>
</cfif>
<!--- Previous values --->
<cfif arguments.page eq 1>
<cfset nextXpage.previous = false>
<cfset nextXpage.previouspage = 1>
<cfelse>
<cfset nextXpage.previous = true>
<cfset nextXpage.previouspage = arguments.page - 1>
</cfif>
<!--- Return the structure --->
<cfreturn nextXpage>
</cffunction>
</cfcomponent>
Then on your output page where you have the info:
.cfm page:
<cfquery name="qrysales"
datasource="davanzo_villa.admindb" >
SELECT DISTINCT
clientinfo.Id, clientinfo.RemoteAddress, clientinfo.visit,
clientinfo.country
FROM clientinfo
order by clientinfo.Id
</cfquery>
<!--- display hit counter --->
<cfquery name="GetHits">
SELECT * FROM hit_counter
</cfquery>
<cfparam name="URL.page" default="1">
<!--- Determine the navigation parameters --->
<cfset functions =
createobject("component","functions")>
<cfset nav =
functions.nextXpage(qrysales.recordcount,URL.page,15)>
<table width="792">
<h4>Total Hits: <CFOUTPUT
query="GetHits">#hit_count#</cfoutput></h4>
<h4>Total Unique Visitors:
<cfoutput>#qrySales.RecordCount#</cfoutput></h4>
</table>
<table width="792">
<tr><td>
<cfoutput>Unique Visitors: #nav.recordcount# (page
#nav.currentpage# of #nav.pagecount#)
<cfif nav.previous>
<a
href="hitcount.cfm?page=#nav.previouspage#">Previous</a>
<cfelse>
Previous
</cfif>
<cfif nav.next>
<a
href="hitcount.cfm?page=#nav.nextpage#">Next</a>
<cfelse>
Next
</cfif>
<ul>
<cfloop From = "1" To = "#nav.pagecount#" index =
"pagenumber">
<cfoutput>
<a
href="hitcount.cfm?page=#pagenumber#">#pagenumber#</a></cfoutput>
</cfloop>
</ul>
</cfoutput>
</td></tr>
</table>
<table width="792">
<tr>
<td>Date</td>
<td>Visitor Number</td>
<td>Visitor`s IP Address</td>
<td>Visitor`s Country</td>
<td>Path Taken</td>
</tr>
<cfoutput query="qrysales" startrow="#nav.startrow#"
maxrows="#nav.maxrows#">
<tr>
<td>#qrySales.visit#</td>
<td>#qrySales.id#</td>
<td>#qrySales.RemoteAddress#</td>
<td><cfif qrysales.country neq ""><a
href="country.cfm?Remote_Addr=#qrysales.RemoteAddress#">#qrySales.country#</a><cfelse><a
href="country.cfm?Remote_Addr=#qrysales.RemoteAddress#">Find
country</a></cfif></td>
<td><a href="hitpathdetails.cfm?id=#id#">See path
taken</a></td>
</tr>
</cfoutput>
</table>

Similar Messages

  • How to change the homepage for a new tab when the home page of the initial tab and subsesequently opened tab are different?

    When iam using firefox i selected google as my home page. But while opening another tab in the same window(ctrl+T), I am getting babylon search as home page for it. How can i get rid of this problem?

    '''''"...while opening another tab in the same window(ctrl+T), I am getting babylon search as home page for it."""
    Any search toolbar and changes to search engines can take place by downloading and installing software; usually "free" software from the internet. Babylon can be downloaded and installed by itself or as a "ride-along" when installing/updating some software from the internet. Always look for an opportunity during the installation to un-check boxes that will install "ride-along" items that you do not want. Firefox installation does not include such "ride-along" items.
    #Remove Babylon Toolbar (if you have it installed). The most complete removal is to remove it from your system using (Windows) Control Panel > Add or Remove Programs): http://kb.mozillazine.org/Uninstalling_toolbars#Uninstalling_via_Windows_Control_Panel<br />
    #*Also see:
    #**http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
    #**http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on
    #**http://kb.mozillazine.org/Uninstalling_toolbars
    #Reset your home page (if the Babylon search page is displayed when starting Firefox): http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    #*You can reset to the default by clicking "Restore to default" on Options > General > Startup > Home page. Be sure to set "When Firefox starts" to "Show my home page" on that same panel.
    #Reset your Location Bar search engine (if typing a few words in the URL/Location Bar takes you to Babylon search):
    #*type '''''about:config''''' in your Location Bar, like typing a web site address, and press the Enter key
    #*ignore warning and choose to continue
    #*in Filter, type '''''keyword.URL'''''
    #*in lower part of screen, if it is '''bold''' and shows "'''user set'''", right-click keyword.URL and choose "Reset"
    #*in Filter, type '''''babylon'''''
    #*any items in lower part of screen in '''bold''' and showing "'''user set'''", right-click and choose "Reset"
    #*close about:config tab
    #*See:
    #**http://kb.mozillazine.org/About:config
    #**http://kb.mozillazine.org/Location_Bar_search#Location_Bar_search_.28external_-_search_engine.29
    #**http://kb.mozillazine.org/Keyword.url
    #**http://www.techrena.net/computers/address-bar-search-provider-firefox/
    #If Babylon is shown in your Search Bar and you want to remove it:
    #*https://support.mozilla.com/en-US/kb/Search%20bar
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How to query from view with parameter, only  when the JSP-page loading

    I use JSF/ADF BC, create two viewes:view1 and view2, in the JSP page the user press a button to query from the view1, but I hope the view2 can be queried only when the page loading, it have no relation with user-operator, and pass the column value of view2 into some variables, the view2 return one record.

    Hi -
    You may want to have a look at this other thread:
    Re: Execute ViewObject with Parameters at JSF Page Load?  JSF/ADF/BC 10.1.3
    John

  • Pages, downloaded from the web, beyond the 1st page appear 50% reduced when printed. How can I resolve this?

    How can I resolve a recent printing problem I'm experiencing regarding downloads from the web where pages beyond the 1st page appear 50% reduced when printed or lines of type at bottoms of pages are missing?

    David,
    Thanks for the reply. I wish I could tell you that your suggestions solved my problem - they didn't.
    I've deleted the affected printer, then added the printer again; I've reset the printing system, then added the printer again; I've downloaded printer drivers, deleted the affected printer, then added the printer again.
    I plan to contact hp later this week for further assistance as you suggest.
    My printer is a hp OfficeJetPro L7590.
    I've enclosed screen shots illustrating the situation.
    Regards,
    R

  • How to delete the 1st page of aging report

    Dear All,
    When we print Aging report from SAP (statement one page per customer), it print the parameters page to the 1st page. As our customer want to send the statement by email from SAP, they don't want to send the 1st page to the customer. Is there a way when we print the statement, we don't print the 1st page? They don't want to export the statement to a PDF file and send it from outlook. They want to send the statement directly. That means we cannot have the 1st page in the layout. Thanks in advance.
    Regards,
    Yuka

    Gordon, Thanks for the reply. Their issue is, they don't want to print it to a printer. They want to SEND it by outlook integration. So the whole report will be in one attachment and they don't want to see page 1st.
    Regards,
    Yuka

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • How can I start firefox with new tab instead of blank page?

    Today I update firefox to 13.0. I like the new "new type". I want to konw how can I start firefox with new tab instead of blank page?
    I don't want to change the homepage to about:newtab.
    Sorry for my bad English.

    This is a very annoying thing. Every update from Firefox resets this config setting back to about:newtab. I changed '''''browser.newtab.url''''' in 12.x to '''''about:blank''''' and it resetted back in update 13.0 and now I have to do the same thing again in 13.0.1.
    The drawback with about:newtab is Firefox opens up dataports for every URL that are linked and gets reopened for every lame 'newtab' you click on. Just use [http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx Tcpview - data port viewer] and watch how many extra dataports that opens up from this crazy 'feature'.

  • How can I ensure newer versions of the same page are opened every time I visit

    I am advised by my Uni IT screen to ensure that firefox is set to check for 'newer versions of the same page with every visit to the page'. This is to ensure proper functioning inside the University's internal tutorial program.

    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.cache.check_doc_frequency''', double-click on it and change its value to '''1'''
    http://kb.mozillazine.org/Browser.cache.check_doc_frequency

  • When I click the Sections button then click on the 1st page I get  a page that is titled "Lorem ipsum dolor sit amet"! Where did it come from and how do I get rid of it. I have tried deleting and "dont save" but it comes back.

    In Pages when I click the 'Sections'  button then click on the 1st page I get  a page that is titled "Lorem ipsum dolor sit amet"!  Where did it come from and how do I get rid of it? I have tried deleting and "dont save" but it comes back. It is a full page in some unknown language. The only thing I can decifer is 'cupy uf cak'.   Rdal

    Roger,
    The icon is +Sections, not just Sections, as in "Add a Section". When you click that icon you get a section break and and a new section template, complete with preformatted text called placeholder text. The reason "Lorem ipsum" is there is so you can see what the format looks like. The reason that it is Latin gibberish is so you won't get hung up on, or distracted by, what it says. It's just a display of format. Select the "Lorem ipsum" text and start typing your content.
    Jerry

  • How do I activate on my new computer when I am unable to deactivate on my old one?

    How do I activate on my new computer when I am unable to deactivate on my old one?

    You're allowed two activations, so you may be okay. If not, you will need to contact activation support:
    http://www.adobe.com/products/activation/
    Most times you can start a chat session right on that page and get it taken care of right away.

  • Calling a new browser in the overview page

    Hello,
    I'm trying to open with an url a new browser in the overview page. With the function module "CALL_BROWSER" and the method "cl_gui_frontend_services=>execute" I get an exception like "not_supported_by_gui ".
    I found out that a new browser in WebUI can only be opened in a page with iframe. But if I call a method from a bsp-application with this statement below in the html page:
    <%DATA lv_url type string.
    lv_url = ZL_IUCONI_DETAILS_IMPL=>lv_url.%>
    <iframe id="EK-Frame" name="EK-Frame" src="<%= lv_url %>"
    height="0%" width="0%" frameborder="0"></iframe%> 
    the new page cann't not be opened.
    Hs anybody an idea how to fix this problem?
    Kind Regards,
    John h.

    Hello John,
    please try setting width and height to 100% instead of 0%.
    If you want to open a new browser window you can place some Java Script code to the view layout like "window.open('http://www.sap.com')" on first rendering of the view. Or you create a link on your view using a P-Getter.
    Regards,
    Christian

  • Add new row in the same page

    Can anyone give me the code for adding the new row in the same page itself.If we click on add button a new row should come in the table.
    Thanks in advance

    Hi,
    invoke a method in AM on button click
    public void addrows()
    AddressesVOImpl vo1 = getAAddressesVO1();
    AddressesVORowImpl row1 = (AddressesVORowImpl)vo1.createRow();
    vo1.insertRowAtRangeIndex(0,row1);
    vo1.setCurrentRow(row1);
    Thanks,
    Gaurav

  • I can not open new tabe in the same page

    i can not open new tabe im the same page
    when i click on new tabe , it donsnt open at all

    Uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox that prevents new tabs from being opened.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

  • How do you get a table to flow onto the second page?

    Since upgrading to Yosemite, I cannot figure out how to get my table to continue on to the second page. If you look at my screenshot, you can see that my table was so big so the whole thing was moved to the next page. I want it to remain on the 1st page and have additional rows continue on to the second page. In the previous version of pages, the column titles would also appear on the second page. Thank you very much for your help.

    Hi F.AD.;
    Go to View > Show Invisibles (Shift+Command+I).
    This will display Paragraph marks (¶) at the end of each paragraph.
    Delete the paragraph mark (¶) that is at the end of the paragraph before the table, i.e. just between the table and the paragraph.
    This will bring the table surely just beneath the paragraph (text), I suppose.
    Hi BePositive26;
    You didn't mention whether my suggestion made easy to solve your problem.
    Regards,

Maybe you are looking for