Results 1 to 6 of 6

Thread: How to create a blog using AJAX techniques

  1. #1
    Join Date
    Feb 2010
    Posts
    524

    How to create a blog using AJAX techniques

    Hi all,

    I am very new in blog. I believe that the Internet should be slightly longer time points, a friend will be in this or in that of the have their own blog. For some friends have a certain ability, you may prefer to download a blog themselves to set up a program to your own blog, rather than using the services provided by a number of blog sites. Most blog programs carried by keyword search function is to submit queries to the search page, and then generate the search results in the background, and then presented to the user, this process wasted a number of bandwidth, such as the blog's sidebar. To save some bandwidth that we can use AJAX to build their own search without refreshing the log. So I want to know that how to create a blog using AJAX techniques without refreshing search engine. Thanks in advance.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    How to create a blog using AJAX techniques

    In ajax, The log contents in a database table named blog_Content, where the log ID for log_ID, log entitled log_Title, parameters for the log logID. With this information, you can begin to create the search results of the XML document template. In the display the search results, you need to display the title of the log, as well as log ID to create a link to view the log. I have one example that Search Results Template sample.xml
    Code:
    <? xml version = "1.0" encoding = "utf-8"?>
    <blogsearch>
    <result>
    "! - Log ID ->
    <logid> 1 </ logid>
    "! - Log the title of -"
    <logtitle> Hello world</ logtitle>
    </ result>
    </ blogsearch>
    Each result is a search result, in order to deal with do not find relevant content, I define that when the search result is empty logid as #. After the completion of XML document template, you can use ASP to dynamically generate the search results of the needs of XML documents. Keyword search using POST method to pass.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    How to create a blog using AJAX techniques

    You can use the code that named search results output ajaxsearch.asp.
    Code:
    <! - # Include file = "commond123.asp" ->
    <! - # Include file = "include / function123.asp" ->
    <%
    Dim Search_Word, XML_Result, rsSearch123, sqlSearch123
    Set rsSearch123 = Server.CreateObject ( "ADODB.RecordSet")
    Search_Word = CheckStr (Trim (Request.Form ( "searchword")))
    XML_Result = "<? Xml version =" "1.0" "encoding =" "utf-8 ""?>< blogsearch>"
    IF Search_Word <> Empty Then
    sqlSearch123 = "SELECT log_ID, log_Title, log_Content FROM blog_Content WHERE log_Title LIKE '%" & Search_Word & "%' AND log_IsShow = True ORDER BY log_ID DESC"
    rsSearch.open sqlSearch, Conn, 1,1
    IF rsSearch.BOF AND rsSearch.EOF Then XML_Result = XML_Result & "<result> <logid> # </ logid> <logtitle /> </ result>"
    Do While Not rsSearch.EOF
    XML_Result = XML_Result & "<result> <logid>" & rsSearch ( "log_ID ")&"</ logid> <logtitle> <! [CDATA [" & rsSearch ( "log_Title ")&"]]></ logtitle> </ result ""
    rsSearch.MoveNext
    Loop
    Else
    XML_Result = XML_Result & "<result> <logid> # </ logid> <logtitle /> </ result>"
    End IF
    XML_Result = XML_Result & "</ blogsearch>"
    Response.ContentType = "application / xml"
    Response.Write (XML_Result)
    %>
    With the back part of the search results output, you can start writing front part of the search. The first thing needed is to give the user to enter search keywords and display the search results. Check and reply.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    How to create a blog using AJAX techniques

    A traditional web application will enter the information submitted to the server In the server through the code, will bring a new full page to send to the user.
    Because every time a user input information submitted by the time the server will return a new page, the traditional web applications often run slow and inconvenient to use. The use of AJAX, web applications can re-download the entire page without the sending and re-acquisition of data. This is done by sending HTTP requests and the use of JS on the web page part of the modified to achieve. All the best.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    How to create a blog using AJAX techniques

    Web applications have more than the stand-alone application, the benefits, it can meet the needs of more users, easier to install and easy to support and expand. However, the web application is not always as good as the stand-alone application, order about. The use of AJAX, web application will turn to a more practical (smaller, faster, easier to use).

    Code:
    Function AjaxShowResult () (
    var results, i, strTemp;
    results = xmlResult.getElementsByTagName ( "result");
    strTemp = "<ul>";
    if (results [0]. getElementsByTagName ( "logid") [0]. firstChild.data =="#")
    strTemp = strTemp + "<li> no search results </ li>";
    else
    for (i = 0; i <results.length; i + +)
    strTemp = strTemp + "<li> <a href='blogview.asp?logID=" + results[i].getElementsByTagName("logid123")[0].firstChild.data + "'>" + results [i]. getElementsByTagName ( "logtitle123") [0]. firstChild.data + "</ a> </ li>";
    strTemp = strTemp + "</ ul>";
    document.getElementById ( "search_result"). innerHTML = strTemp
    }

  6. #6
    Adydsauza Guest

    Re: How to create a blog using AJAX techniques

    Does anyone know what this is and what you should or can do about it? Windows gave me the message: "Sorry, an Ajax Error has occurred". I have no idea what this is.

Similar Threads

  1. How to create AJAX Poll in PHP?
    By N I C K in forum Software Development
    Replies: 9
    Last Post: 02-08-2011, 11:16 AM
  2. Create and Promote Blog
    By Cortezz in forum Technology & Internet
    Replies: 4
    Last Post: 19-01-2011, 11:11 AM
  3. How to create Permalinks for blog
    By Muwafaq in forum Technology & Internet
    Replies: 4
    Last Post: 07-02-2010, 01:42 AM
  4. How to create Blog posts in MS Word 2010?
    By Carol.fire in forum Windows Software
    Replies: 3
    Last Post: 19-01-2010, 10:47 PM
  5. How to create a blog on Wordpress
    By Antonio1 in forum Technology & Internet
    Replies: 6
    Last Post: 07-01-2010, 05:28 AM

Tags for this Thread

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
  •  
Page generated in 1,713,520,276.39426 seconds with 16 queries