1. How To Use SAJAX (AJAX Framework) from HTML

    Date: 05/15/06 (Java Web)    Keywords: php, html, web

    Sajax is an useful ajax framework to simplify ajax based development for languages like PHP, Ruby etc. Not many realize Sajax can be used equally well from plain old html pages (as in .html or .htm). Their website doesn’t mention it anywhere so I can guess it was not one of their use cases. However [...]

    Source: http://blog.taragana.com/index.php/archive/how-to-use-sajax-ajax-framework-from-html/

  2. Export GridView to Excel

    Date: 05/16/06 (Asp Dot Net)    Keywords: html, asp, web

    Hey gang, I've got an odd Internet Explorer/MS Excel behavior that I need to figure out and fix.

    My xls.aspx.cs:

        protected void Page_Load(object sender, EventArgs e)
        {
            GridView grdExcel = (GridView)grdReport;
            Response.Clear();
            Response.Buffer = true;
            Response.AddHeader("content-disposition", "attachment;filename=rpt.xls");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.ContentType = "application/vnd.ms-excel";
            Response.Charset = "";
            this.EnableViewState = false;

            System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
            System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

            Response.Write("");
            //this.ClearControls(grdExcel);
            grdExcel.RenderControl(oHtmlTextWriter);

            Response.Write(oStringWriter.ToString());

            Response.End();
        }

        public override void
            VerifyRenderingInServerForm(Control control)
        {
            return;
        }

    Common code example from all over the net.

    What happens: When clicking on my link to download the excel doc, I am finding that "Open" in IE does not work.  I can save the document to my local drive and then open, but when I try to click the link and select "Open" it tells me:

    "'C:\Documents and Settings\user\local settings\temp net files\content.IE5\0L6RCHUN\rpt[n].xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.

    If you are trying to open the file from your list of most recently used files on the File menu, make sure the file has not been renamed, moved, or deleted.
    " (note: file path location isn't exact. just giving general idea of temp location)

    But, if I click ok on that excel window error, and then return to the IE window and click on the link once more (now MS Excel is open).... My excel document opens properly.

    I'm using:
    MS Excel 2003 (11.5612.5606)
    IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
    Windows XP Pro ver. 2002 SP 2
    .NET 2.0/C#

    (FYI: Works beautiful in Firefox.)

    Anyone experience anything similar?


    UPDATE: If I set Caching to private, it works. (Response.Cache.SetCacheability(HttpCacheability.Private);)

    Source: http://community.livejournal.com/aspdotnet/66369.html

  3. Google Web Toolkit: A Brief Review

    Date: 05/17/06 (Java Web)    Keywords: html, java, google

    Google has released GWT - a java window toolkit which converts your java applications (using the toolkit API) to javascript (incl. AJAX) and HTML. What follows is a brief review of the features and some thoughts. But first lets see why Google thinks it is important. Java technologies offer a productive development plaform, and with GWT, [...]

    Source: http://blog.taragana.com/index.php/archive/google-web-toolkit-a-brief-review/

  4. Adding random quotes to lj

    Date: 05/18/06 (HTML Help)    Keywords: html, web

    This website provides an HTML code so you can add random quotes to your website/LJ. For some reason, when I paste the HTML code into my entry box on the Update Journal page, the entry box does not have a quote inside (the box is blank). However, the HTML code works on the website because the preview box has a quote inside.

    Does anyone know how to fix this HTML code so I can paste it into one of my LJ entries and have random quotes appear? Any help would be great.


    Thank you! :)

    EDIT: I tried the website that antisora commented with below but my entry still ended up blank. Here is my code:






    Source: http://community.livejournal.com/htmlhelp/2301877.html

  5. Putting an email sender on my page

    Date: 05/19/06 (Web Development)    Keywords: html, asp, web, spam

    Hey guys,

    I'm looking for your advice and help on an email related question. Specifically, I want to create a system that allows visitors to my website to send email messages to third parties using their own email address with one-click. I heard that this is a questionable practice, used by spammers, no less--but I've seen it used also on a lot of legitimate websites, which usually encourage you to fill in your name and emaill address and click to send a prewritten text to a government official. Case in point: http://www.transalt.org/e-bulletin/2006/May/0518.html#parks

    That is one site among many that implement this stuff. I guess what I'm trying to find out is how do they do it? You'd have to rig up the protocols of the email server to accept sending email to third parties, right? I have no problem setting up the form itself, but am confused about these two things: 1) how to rig up an email server to send email from a different email account (and not just one time only!) and 2) how to relay the information a visitor types from the website to the email server. (I guess I need to use something like asp to sort that out?)

    At any rate, please help. If this is not the right forum, can anyone direct me to a forum where I can pose this question????

    Thank you!!!

    Source: http://community.livejournal.com/webdev/321339.html

  6. Email "Blasts"

    Date: 05/19/06 (Web Development)    Keywords: css, html, ebay

    I've never had the need to develop many HTML emails, though lately they seem to the magic cure for all business ills at my full-time job.
    I can complete them and they turn out OK using tables and making sure the images are absolutely referenced on a server.
    How are these typically done by Amazon, ebay, Crate & Barrel, etc? Is it just down and dirty basic coding. Most of the sites I design utilize CSS layouts and styling extensively so whenever I do one of these emails I feel like I'm stepping back a bit.

    Source: http://community.livejournal.com/webdev/321205.html

  7. how I feel about the web:

    Date: 05/23/06 (Web Development)    Keywords: html, java, web

    ... I've found that in the last five years, the web has overly gorged itself in stupid plugins, obnoxious shock, frittery DHTML, unreliable Java, senseless, irritating JavaScript (to name a few)--so much in fact that the mere concept of 'Content' is out of the throne of context like last year's one-hit-wonder.

    - Sean H. 2001

    Source: http://community.livejournal.com/webdev/321903.html

  8. Strange img problem

    Date: 05/23/06 (WebDesign)    Keywords: html, hosting

    I'm having an odd Dreamweaver/HTML problem. I want to have two images appear one after another on the same line. This is the code i'm using:
    FeaturedProject

    Pretty standard. But in Dreamweaver and in the site itself the images (Featured and Project) are showing up stacked instead, on both Firefox and IE. I've tried doing the same thing on a new blank html page and it works fine. I can't see anything in the stylesheet that would cause this. I've included it below a cut anyway.


    body {
    font-family: Tahoma;
    }

    h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #e14000;
    }
    h2 {
    font-family: Tahoma;
    font-size: 12px;
    color: #E09E45;
    border-bottom: 1px dotted #D3D3D3;
    margin-bottom: -10px
    }

    h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    color: #E14000;
    }
    .footertext{
    font-family: tahoma;
    font-size: 10px;
    }
    hr{
    color: #E09E45;
    padding-bottom: -3px;
    padding-top: -3px;
    border-style: outset;
    }
    .tdMain {
    text-align: left;
    vertical-align: top;
    font-family: Tahoma;
    font-size:12px;
    color:#7C8387;
    }
    p {
    font-family: Tahoma;
    font-size: 12px;
    color: #7C8387;
    }
    .tightText {
    font-family: Tahoma;
    font-size: 12px;
    color: #7C8387;
    line-height: 12px;
    }



    .Sidebar {
    border: 1px solid #A9A9A9;
    font-family: verdana;
    font-size: 10px;
    letter-spacing: 0;
    background-color: #ededed;
    width: 80%;
    margin-left: 15px;
    text-align: center;
    }

    form
    {
    margin:0px;
    }
    a {

    text-decoration: underline;
    color:#7C8387;
    }
    .y
    {
    color:#E09E45;
    }
    a.y
    {
    color:#E09E45;
    text-decoration:underline;
    }
    a.yn
    {
    color:#E09E45;
    text-decoration:none;
    }
    a.red
    {
    color:#E14000;
    text-decoration:underline;
    }
    a.0
    {
    color:#71777A;
    text-decoration:none;
    }
    a.1
    {
    color:#E14000;
    text-decoration:none;
    }

    .red
    {
    color:#E14000;
    }
    .t11
    {
    font-size:11px;
    }
    .tdMain ul{
    list-style-image: url(../LayoutImages/arr2.gif);
    }

    .tdMain li{
    padding-bottom: 5px;
    }

    .tdMain a {
    color: #696969;
    font-weight: bold;
    text-decoration: none;
    }

    .tdMain a:hover {
    color: #E14000;
    }

    .ImagePadRight {
    padding-right: 10px;
    }

    .ImagePadLeft {
    padding-left: 10px;
    }

    .tdquote {
    font-family: verdana;
    background-image: url(../LayoutImages/QuoteBackground.jpg);
    font-size: 10px;
    letter-spacing: 0;
    padding: 5px;
    border: 1px #F7D393 outset;
    }

    ul {
    margin-left: 10px;
    padding-left: 10px;
    line-height: 15px;
    }

    .TableMenu {
    text-indent: 6px;
    }


    .TableMenu a {
    display:block;
    text-decoration: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #333333;
    border: 1px #333333 outset;
    padding: 2px;
    background-color: #F0F0F0;
    }

    .TableMenu a:hover {
    background-color: #CCCCCC;
    text-decoration: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    border: 1px #333333 outset;
    }

    td.highlightrow {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 16px;
    }

    td.quoterow {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 16px;
    }

    .ClientTestimonial {
    color: Gray;
    font-size: 11px;
    font-weight: normal;
    background-image: url(../LayoutImages/QuoteStart_yellow.gif);
    background-repeat: no-repeat;
    background-position: left top;
    margin-top: 0;
    margin-right: 2em;
    margin-bottom: 1em;
    margin-left: 0;
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 0px;
    padding-left: 35px;
    }
    .ClientName {
    margin-top:0;
    color: #999999;
    text-align:right;
    }

    td .hosting {
    background-color:#F5F5F5;
    }
    .yellow {
    color: #e09e45;
    }

    Source: http://community.livejournal.com/webdesign/1113098.html

  9. Strange img problem

    Date: 05/23/06 (Web Development)    Keywords: html, hosting

    I'm having an odd Dreamweaver/HTML problem. I want to have two images appear one after another on the same line. This is the code i'm using:
    FeaturedProject

    Pretty standard. But in Dreamweaver and in the site itself the images (Featured and Project) are showing up stacked instead, on both Firefox and IE. I've tried doing the same thing on a new blank html page and it works fine. I can't see anything in the stylesheet that would cause this. I've included it below a cut anyway.


    body {
    font-family: Tahoma;
    }

    h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #e14000;
    }
    h2 {
    font-family: Tahoma;
    font-size: 12px;
    color: #E09E45;
    border-bottom: 1px dotted #D3D3D3;
    margin-bottom: -10px
    }

    h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    color: #E14000;
    }
    .footertext{
    font-family: tahoma;
    font-size: 10px;
    }
    hr{
    color: #E09E45;
    padding-bottom: -3px;
    padding-top: -3px;
    border-style: outset;
    }
    .tdMain {
    text-align: left;
    vertical-align: top;
    font-family: Tahoma;
    font-size:12px;
    color:#7C8387;
    }
    p {
    font-family: Tahoma;
    font-size: 12px;
    color: #7C8387;
    }
    .tightText {
    font-family: Tahoma;
    font-size: 12px;
    color: #7C8387;
    line-height: 12px;
    }



    .Sidebar {
    border: 1px solid #A9A9A9;
    font-family: verdana;
    font-size: 10px;
    letter-spacing: 0;
    background-color: #ededed;
    width: 80%;
    margin-left: 15px;
    text-align: center;
    }

    form
    {
    margin:0px;
    }
    a {

    text-decoration: underline;
    color:#7C8387;
    }
    .y
    {
    color:#E09E45;
    }
    a.y
    {
    color:#E09E45;
    text-decoration:underline;
    }
    a.yn
    {
    color:#E09E45;
    text-decoration:none;
    }
    a.red
    {
    color:#E14000;
    text-decoration:underline;
    }
    a.0
    {
    color:#71777A;
    text-decoration:none;
    }
    a.1
    {
    color:#E14000;
    text-decoration:none;
    }

    .red
    {
    color:#E14000;
    }
    .t11
    {
    font-size:11px;
    }
    .tdMain ul{
    list-style-image: url(../LayoutImages/arr2.gif);
    }

    .tdMain li{
    padding-bottom: 5px;
    }

    .tdMain a {
    color: #696969;
    font-weight: bold;
    text-decoration: none;
    }

    .tdMain a:hover {
    color: #E14000;
    }

    .ImagePadRight {
    padding-right: 10px;
    }

    .ImagePadLeft {
    padding-left: 10px;
    }

    .tdquote {
    font-family: verdana;
    background-image: url(../LayoutImages/QuoteBackground.jpg);
    font-size: 10px;
    letter-spacing: 0;
    padding: 5px;
    border: 1px #F7D393 outset;
    }

    ul {
    margin-left: 10px;
    padding-left: 10px;
    line-height: 15px;
    }

    .TableMenu {
    text-indent: 6px;
    }


    .TableMenu a {
    display:block;
    text-decoration: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #333333;
    border: 1px #333333 outset;
    padding: 2px;
    background-color: #F0F0F0;
    }

    .TableMenu a:hover {
    background-color: #CCCCCC;
    text-decoration: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    border: 1px #333333 outset;
    }

    td.highlightrow {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 16px;
    }

    td.quoterow {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 16px;
    }

    .ClientTestimonial {
    color: Gray;
    font-size: 11px;
    font-weight: normal;
    background-image: url(../LayoutImages/QuoteStart_yellow.gif);
    background-repeat: no-repeat;
    background-position: left top;
    margin-top: 0;
    margin-right: 2em;
    margin-bottom: 1em;
    margin-left: 0;
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 0px;
    padding-left: 35px;
    }
    .ClientName {
    margin-top:0;
    color: #999999;
    text-align:right;
    }

    td .hosting {
    background-color:#F5F5F5;
    }
    .yellow {
    color: #e09e45;
    }

    Source: http://community.livejournal.com/webdev/322197.html

  10. Putting Your Own Templates On A Website

    Date: 05/24/06 (HTML Help)    Keywords: templates, html, web

    Alright, I've volunteered to make / maintain my church's website, and it turns out that I know absolutely nothing about doing this.


    I've downloaded a template from Boxed Art and I've also downloaded a program (SEEdit) to view the template, because I couldn't open the .html files with TextEdit.




    I don't know where to begin. My webhost (iPower) uses an application-like thing called vDeck (here's a screenshot of it), and I'm not sure how to go about installing these templates and putting them to use.


    One of the template pages is an .html file that looks like this:





    41Baptist Template




































































     





    We listen and effectively respond
    to your needs and those of your clients. We are
    experts at translating
    those needs into marketing
    solutions that work, look great and communicate well.
    We listen and effectively respond to your needs and those
    of your clients. We are experts at translating those needs
    into marketing solutions that work.



    We listen and effectively respond to your needs and those
    of your clients. We are experts at translating those needs
    into marketing. We listen and effectively respond
    to your needs and those of your clients
    . We are
    experts at translating those needs into marketing solutions
    that work, look great and communicate well. We listen
    and effectively respond to your needs and those of your
    clients. We are experts at translating those needs into
    marketing solutions that work. We listen and effectively
    respond to your needs and those of your clients. We are
    experts at translating those needs into marketing.
    We
    listen and effectively respond to your needs and those
    of your clients. We are experts at translating those needs
    into marketing solutions that work, look great and communicate
    well. We listen and effectively respond to your needs
    and those of your clients. We are experts at translating
    those needs into marketing solutions that work, look great
    and communicate well.


    We listen and effectively respond to your needs and those of
    your clients. We are experts at translating those needs into
    marketing. We listen and effectively respond to your
    needs and those of your clients
    . We are experts at
    translating those needs into marketing solutions that work,
    look great and communicate well. We listen and effectively respond
    to your needs and those of your clients. We are experts at translating
    those needs into marketing solutions that work. We listen
    and effectively respond to your needs and those of your clients.
    We are experts at translating those needs into marketing.
    We
    listen and effectively respond to your needs and those of your
    clients. We are experts at translating those needs into marketing
    solutions that work, look great and communicate well. We listen
    and effectively respond to your needs and those of your clients.
    We listen and effectively respond to your needs and
    those of your clients. We are experts at translating those needs
    into marketing.
    We listen and effectively respond to
    your needs and those of your clients. We are experts at translating
    those needs into marketing solutions that work, look great and
    communicate well. We listen and effectively respond to your
    needs and those of your clients.





    © 2003 The Company, Inc.
    All rights reserved.
    Terms
    of Use and Disclaimer





    Um... if you need more information, I'd be happy to give it to you. *sigh* Any help in this area would mean the world to me! I feel like my head is about to explode. :-/


    Thank you!

    Source: http://community.livejournal.com/htmlhelp/2305584.html

  11. problems sorting an array

    Date: 05/24/06 (PHP Community)    Keywords: html

    i have an array
    Array ( [0] => . [1] => .. [2] => index.html [3] => shouts_1-100.html [4] => shouts_1001-1100.html [5] => shouts_101-200.html [6] => shouts_201-300.html [7] => shouts_301-400.html [8] => shouts_401-500.html [9] => shouts_501-600.html [10] => shouts_601-700.html [11] => shouts_701-800.html [12] => shouts_801-900.html [13] => shouts_901-1000.html )

    however i'm trying to reserve sort it, numerically so i thought rsort($array, SORT_NUMERIC):
    Array ( [0] => shouts_901-1000.html [1] => shouts_801-900.html [2] => shouts_701-800.html [3] => shouts_601-700.html [4] => shouts_501-600.html [5] => shouts_401-500.html [6] => shouts_301-400.html [7] => shouts_201-300.html [8] => shouts_101-200.html [9] => shouts_1001-1100.html [10] => shouts_1-100.html [11] => index.html [12] => .. [13] => . )

    however as you can see, i still have a problem what should be at the 0 key is shouts_1001-1100.html. is there anyway to sort this array numerically without it grouping together numbers at the first digit?

    Source: http://community.livejournal.com/php/452803.html

  12. Auto Page Generation

    Date: 05/25/06 (HTML Help)    Keywords: browser, html

    Anyone know a way to quickly generate individual HTML pages for images?

    (For example:  I want to create a gallery where the full size images come up in their own browser window.  So I’d like to know if there is a way to automate the production of these pages to speed up production.)

    Thanks--

    Source: http://community.livejournal.com/htmlhelp/2306773.html

  13. zmlc 1.0

    Date: 05/25/06 (C Sharp)    Keywords: software, html, xml

    I just finished the beta of ZMLC, which can be located at:
    http://www.mathgladiator.com/jeff/code.html

    In a nutshell, the software lets me (and anyone that wishes) to define an object model in one large file. This file is compiled to produce C++ headers, serialization code to and from XMLjr, and serialization code to and from flat binary. Furthermore, a C# class library is built with the same behavior (except for binary serialization). My goal was to create a C# scene editor for a C++ scene graph that evolves constantly.

    Anyone want to beta test?

    Source: http://community.livejournal.com/csharp/62921.html

  14. The Blogger of DOOM!

    Date: 05/25/06 (PHP Community)    Keywords: html, database, sql, security

    Currently I'm working on a small and simple blogger for someone.  It doesn't have to be anything extraordinary or anything, however, of course, I want it to be as secure as possible within my means.

    I've heard all of the horror stories of SQL injection and whatnot where users input bad things to make bad things happen and that there is a general rule about NEVER letting the user input directly into a database without cleaning it up.

    Well... in this case, it isn't that simple.


    I don't want to really limit what characters the user can enter in (except for html.. That I'm stripping out).  But, I don't want to limit it to alpha-numerical characters.  So, I thought of another way where the user has more freedom, but I'm hitting some walls with it... and perhaps some of you could let me know if you see any glaringly obvious problems.

    I was thinking of having the users input sent to a text file.  A file, automatically named, maybe by timestamp or whatever, that contains the text the user has entered.  Then, the DB would only contain the name of the file created, its ID number, and the user associated with it.  Then, when viewing them, simply pull the name of the file from the DB, fopen and fread it and echo the results.  I have the open and reading part working, however... I want to avoid people being able to go to that file directly (by some stroke of luck by guessing its name).  So... my two concerns are:

    1. Are there any obvious security issues by doing this with external files?
    2. Is there any way I can prevent direct opening of these files?

    Thank you in advance.

    Source: http://community.livejournal.com/php/453279.html

  15. Graphic design

    Date: 05/26/06 (WebDesign)    Keywords: css, html, web

    I've taken quite a few classes on web design in school, and just wrapped up a class in XHTML. The classes do a great job of teaching you coding, the planning and design stages, and how to make the website clean, well coded, and not a pile of crap. But what most classes don't teach you is how to make your website look good.

    I am not a good graphic designer. I used to fancy myself as being a decent artist, I used to draw a lot of still life, abstract, b&w pattern, and Escher-ish optical illusion pieces, but either I've lost my magic touch, or art on a computer is far different than art on paper, because I just can't work up the creativity to think up good designs for webpages.

    Currently I want to make one or more webpages to practice my design skills with xhtml and css, but I can't think of what I want my site to look like, or what theme I want it to have.

    My question for all you perfessional designers, those who do this for a living, is how do you figure out a design for a page? How do you determine what colors, what pictures, what borders to use? How do you decide where the pictures go on the site? How do you decide where to put the site navigation? How do you figure out the theme of the site?

    Source: http://community.livejournal.com/webdesign/1116148.html

  16. [solved] Issues with streaming PHP/AJAX (using iframes)

    Date: 05/30/06 (PHP Community)    Keywords: php, html, xml, java

    This issue has been solved to a satisfactory level. Working example here.

    Hey folks. I've been attempting to replace some AJAX stuff that refreshed every X milliseconds using the XMLHTTP object, with a streaming equivalent using inline frames and PHP delays. However, i've hit a snag in that data seems to be sent out in 4kb chunks - far too large for my intended purpose.

    While this streaming example is fine providing that 4096 bytes of data is sent between each portion, this dosen't go very far towards increasing consecutive update speed and efficency (by preventing the constant cycle of connect-download-disconnect). I am aiming to only send out about 512 bytes from the server, per portion. I have yet to work out if the 4kb limit is being implemented by the client or the server.

    So basically what I want to do is be able to have the code below work without needing 4kb of useless padding.

    This code is not currently Moz/FF compatible, due to an issue with the way I move the content from the iframe with javascript (window.frames["streaming_iframe"].document.body.innerText returns "undefined" in FF).

    header("Cache-Control: no-cache, must-revalidate");

    echo "";

      if (@$_GET["stream"]) {
      
        for ($i=0;$i<10;$i++) {
            
          for ($x=0; $x<(1024 * 4); $x++) { //4kb chunks seem favoured?
          echo " "; // Padding
          }
          
        echo $i."\n\r";
        usleep(500000);
        }
      
    echo "
    ";

      exit;
      }
    ?>








    Solution:
    Inital padding with echo str_pad('',256)."\n"; (I feel that 256 bytes is an acceptable level of padding)
    Output flushinf with flush(); ob_flush();

    Code (for possible future reference):
    header("Cache-Control: no-cache, must-revalidate");

    echo "";

    if (@$_GET["stream"]) {
    echo str_pad('',256)."\n";

    for ($i=0;$i<10;$i++) {
    echo $i."\n\r";
    flush();
    ob_flush();
    usleep(500000);
    }

    echo "
    ";
    exit;
    }

    ?>





    Source: http://community.livejournal.com/php/454188.html

  17. Source Issues

    Date: 05/30/06 (HTML Help)    Keywords: html

    When I go into Source mode in Rich Text, 

    I try to put the cursor in a different spot, then about 2 seconds after I click, the cursor automatically goes back to the very beginning of the text. 

    Help? Anyone? It's stopping me from changing HTML and it's really bugging me. Help is appreciated. 
    Thanks.

    Source: http://community.livejournal.com/htmlhelp/2309704.html

  18. A PHP Archive?

    Date: 05/31/06 (PHP Development)    Keywords: php, mysql, html, sql, java, web

    I've created a site hoping to archive php coded forums from the world wide web. This way an internet surfer can login and search categorized listings of forums so they can easily find what they're looking for.

    Since there are thousands of php coded forums of all different content, I'd like to set up categories and list them under it.

    unfortunately I know very little php. I know how to implement MODS into my forums and that's just about it.

    Here's the site I'm working on. http://phpforumarchive.com/

    Any suggestions or anyone willing to help? I am sure this will be a decent site when completed and people (internet surfers) will probably use it frequently. Forum owners will like it because of the free advertising they get for their site.

    I know html, some javascript, no php beyond pre written MODS that show you how to instal them. MySQL? Forget it.

    Tell me I'm in over my head.

    Source: http://community.livejournal.com/php_dev/69050.html

  19. commas in the string.

    Date: 05/31/06 (WebDesign)    Keywords: html, database, java

    So I have this simple function that swaps an image and its caption on an HTML page:


    function changeBigImg(source, content) {
    if (source != null) {
    document.getElementById("showedImage").src = source;
    document.getElementById("imageCaption").innerHTML = content;
    }
    }


    The problem being is that 'content' is being fed from a database, and I have no pull on how they enter the data, and some of the strings being fed into 'content' contain commas, which break the function.

    If the title of the image has commas or single quotes, then the JS image switching fuction does not work.

    edited to add examples-

    This one works:

    javascript:changeBigImgSideBar('/photo_servlet?contentId=34153&ver
    sion=1&locale=EN-US&subtype=MIMG','Napoleon Dynamite wishes he had skills like this','height')

    This one does not:

    javascript:changeBigImgSideBar('/photo_servlet?contentId=33918&ver
    sion=1&locale=EN-US&subtype=MIMG','Cindy, Kim, and Q doing their best Sinead O'Connor impersonations','width')

    Slight variance from js protocol in my examples aren't the problem -- it consistently happens with commas and/or single-quotes.

    So I was pondering if anyone had a suggestion for a way to replace the commas in the string with commas that will only be read as text, not seperators.

    Thank you!

    Source: http://community.livejournal.com/webdesign/1118592.html

  20. PHP 4.4.1 mail() issue

    Date: 05/31/06 (PHP Community)    Keywords: php, mysql, html, database, sql, microsoft

    Alright guys, I'm having a bit of a problem. I'm in the process of writing this small document-tracking application for my mother's work and was writing it on my own site. It worked almost perfectly except for some functionality that I had yet to add.

    But when I went to upload it to the server it was supposed to be on, I found out they were running an older version (4.4.1) than the one I had been writing for (5.1.2). So, I went in to go fix the problems (like removing Try-Catch statements), and I seem to have gotten most of them worked out, except one: for some reason the mail() function isn't actually sending any mail.

    I've tried it with many different email addresses and no luck. Now, the server this is currently on (the server it will have to be run from as well) is using Microsoft Exchange which I don't really know much about. We've been looking at some of the other applications that are run on this server with working mail functionality and can't figure out why this application isn't running.


    //File Name: docFunctions.php
    //Author: Lisa Obenauf
    //
    //For use by Union Station of Kansas City (http://www.unionstation.org) only.
    
    function generateEmail()
      {
        //MYSQL DB Connection and Table selection removed for privacy puroses//
        
        //Verify the connections to the Database and Table
        if (!$email_connect || !$db_select)
        { 
          die("Problem connecting or selecting a database."); 
        } //end if
    
        //initialize variables
        $sender = $_POST['docFrom'];
        $attachment = $_FILES['docAttachment']['name'];
    
        $headers = "From:" . $_POST['docFrom'] . "\r\n";
        $headers .= "Reply-To:" . $_POST['docFrom'] . "\r\n";
        $headers .= "Content-Type: text/html;\r\n charset=\"iso-8859-1\"\r\n";
    
        $body = "    
          
            
          
    
          
            

    File: " . $_FILES['docAttachment']['name'] . "
    Respond By:" . $_POST['docDue'] . "

    " . $_POST['docDescription'] . "

    "; //Verifies that a recipient has been selected. If not, an error is displayed. if ($_POST['docTo1'] === "") { die("Please choose someone to receive the attached document."); } //end if else { //Initialization of the $query statement for INSERT $query = "INSERT INTO `doc_tracking` ( `doc_id` , `doc_from` , "; $query .= "`doc_to_1` , `doc_to_2` , `doc_to_3` , `doc_to_4` , `doc_to_5` , `doc_to_6` , `doc_to_7` , `doc_to_8` , `doc_to_9` , `doc_to_10` , "; $query .= "`doc_route` , `doc_distribution` , `doc_due` , `doc_action_1` , `doc_action_2` , `doc_action_3` , `doc_action_4` , `doc_action_5` , "; $query .= "`doc_action_6` , `doc_action_7` , `doc_action_8` , `doc_action_9` , `doc_action_10` , `doc_description` , `doc_attach` ) "; $query .= "VALUES (NULL , '" . $_POST['docFrom'] . "', '" . $_POST['docTo1'] . "', "; //Sets the recipient of the email $recipient = $_POST['docTo1']; //if there are more recipients, they are added to $recipient for use in mass mailing. //The $query variable is also augmented with either the person's email address or NULL if no address was selected. if ($_POST['docTo2'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo2'] . "', "; $recipient .= ", " . $_POST['docTo2']; } //end else if ($_POST['docTo3'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo3'] . "', "; $recipient .= ", " . $_POST['docTo3']; } //end else if ($_POST['docTo4'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo4'] . "', "; $recipient .= ", " . $_POST['docTo4']; } //end else if ($_POST['docTo5'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo5'] . "', "; $recipient .= ", " . $_POST['docTo5']; } //end else if ($_POST['docTo6'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo6'] . "', "; $recipient .= ", " . $_POST['docTo6']; } //end else if ($_POST['docTo7'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo7'] . "', "; $recipient .= ", " . $_POST['docTo7']; } //end else if ($_POST['docTo8'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo8'] . "', "; $recipient .= ", " . $_POST['docTo8']; } //end else if ($_POST['docTo9'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo9'] . "', "; $recipient .= ", " . $_POST['docTo9']; } //end else if ($_POST['docTo10'] === "") $query .= "NULL ,"; else { $query .= "'" . $_POST['docTo10'] . "', "; $recipient .= ", " . $_POST['docTo10']; } //end else //Initialization of the "Respond By" information $dueBy = $_POST['docYear'] . "-" . $_POST['docMonth'] . "-" . $_POST['docDay']; //Continuation and conclusion of the INSERT statement $query .= "'" . $_POST['docRoute'] . "', 'all' , '" . $dueBy . "', NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , '" . $_POST['docDescription'] . "', '" . $attachment . "');"; //Email Information to be displayed to the user. Contains the information sent in the email. echo "Document Number: " . $_POST['docID'] . "

    "; echo "From: " . $_POST['docFrom'] . "
    "; echo "To: " . $recipient . "

    "; echo "Attachment: " . $_FILES['docAttachment']['name'] . "

    "; echo "Respond By: " . $_POST['docMonth'] . "-" . $_POST['docDay'] . "-" . $_POST['docYear'] . "
    "; echo $_POST['docDescription']; //Inserts information into the Database $result = mysql_db_query("test", $query); //Checks to see if the email needs to be sent to each person Sequentially or all at once. //If sequentially, then the e-mail is just sent to the first recipient, and will be sent to the rest of the recipients. //through confirmation via a different form. if ($_POST['docDistribution'] === "all") mail($recipient, "", $description, $headers); else mail($_POST['emailTo1'], "File: " . $_POST['docAttach'], $body, $headers); //verifies the successful insertion of the information into the database. if (!$result) { die("

    Invalid Query: " . mysql_error() . "

    "); } //end if else { echo "

    Insert successful.

    "; } //end else } //end else mysql_close(); } //end generateEmail()



    Anyway, thanks for any advice you can give me. I appreciate it. I've wracked my brain, searched through my books and the internet, asked my friends, and now I'm asking you.

    Cheers!
    --Lisa

    P.S. The code isn't fully compliant with any HTML/XHTML standards as of yet, because it is still in development. I am more concerned with functionality than with compliance, and will update any HTML to be as compliant as possible when everything is working, so I apologize for any weird tags and suchnot.

    Source: http://community.livejournal.com/php/455409.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home