User Profile

Collapse

Profile Sidebar

Collapse
larztheloser
larztheloser
Last Activity: Jul 16 '10, 05:15 AM
Joined: Jan 13 '10
Location: New Zealand
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • elseif, then and endif don't exist in javascript. Also you forgot the logical OR operator (||) in your if statements and the second part of your if statements doesn't make sense unless you restate the variable you're comparing (in your case, ShpWt).
    See more | Go to post

    Leave a comment:


  • Ah yes it does seem to work now.
    See more | Go to post

    Leave a comment:


  • I'm using Internet Explorer v8. Oh and by the way, the script works away from the site, but not on themosaicdesign s.com.
    See more | Go to post

    Leave a comment:


  • I assume you have a table tag somewhere?
    See more | Go to post

    Leave a comment:


  • Just so you know, my IE won't do your top menu either!

    I'm probably going to be shot down for saying this but this would be my solution:
    1) Test whether or not the user is using IE (test for document.all or something!)
    2) If the user is using IE, disable the minimization animation and just make it disappear

    OR

    2) If the user is using IE, create a timeout whenever said animation is activated. After...
    See more | Go to post

    Leave a comment:


  • Well, rather than pass a string of the key hit to the function, browsers pass the scancode of the key. This is more suitable for international keyboards. However, some pass it as the event parameter of the first argument of the function, and some as the which parameter (the second argument is not used by the function). I think it is IE that uses e.event.
    See more | Go to post

    Leave a comment:


  • Well, it is used together with some sort of event handler, such as onkeydown. Different browsers pass different values to event functions so the next few lines have a way of getting the pressed key code for 2 different browsers. Finally the big if checks whether this key code is a number key on the keyboard. So many numbers must be checked cause there are several keyboard configurations.

    So far as I know this is the best and most efficient...
    See more | Go to post

    Leave a comment:


  • larztheloser
    replied to caculating values in JavaScript
    Making a submit button is HTML code.

    Navigate to the form tag. Add this to the end: onsubmit="calcu late();".

    That's about all (:
    See more | Go to post

    Leave a comment:


  • I do apologize for still trying to think in purely javascript terms. It just occurred to me that another easy way would be regenerating a new page with the initial values of the form set to the current values of the form and then sending this HTML code to a server-side script which processes it into a PDF. Again sorry for my over-complication.
    See more | Go to post

    Leave a comment:


  • larztheloser
    replied to caculating values in JavaScript
    No - you make a submit button! Then in the form tag make sure that the action for onsubmit is "calculate( );". Now it should all work automatically. The return true submits the form.
    See more | Go to post

    Leave a comment:


  • larztheloser
    replied to caculating values in JavaScript
    Code:
    function calculate() { 
        var total = 0; 
     
        for (var i = 1; i < arguments.length; i++) { 
            total += parseInt(arguments[i].value, 10); 
        } 
     
        document.forms.myForm.myTotal.value = total;
        return true;
    }
    Worked for me. I also got rid of the initial zero in the call to calculate() cause it's redundant, then made i==0 at the start of your FOR loop. Just...
    See more | Go to post
    Last edited by larztheloser; Feb 24 '10, 11:20 AM. Reason: Small coding mistake

    Leave a comment:


  • Sorry - I didn't see a single dynamic HTML to PDF converter there. I only saw static ones that, while converting form data, would not convert current form input. Most of them rely on the script loading the page dynamically over HTTP, which invalidates form input. Or running through a loaded "source" and rendering each element - also not sufficient as it doesn't ever touch the values of the current page.
    See more | Go to post

    Leave a comment:


  • "start a browser with the URL and make a screenshot"
    I say bad idea if you want it to look like a proper screenshot. Particularly Linux has issues with rendering the same as, for instance, a client running under a Windows enviroment, let alone cross-browser problems. I still think it's easier to just render the HTML into a javascript array, particularly since the fonts will be known in advance. And the output would be better. But...
    See more | Go to post

    Leave a comment:


  • In general, Javascript has no functionality whatsoever. Browsers support various add-on libraries collectively called DOM. They manipulate document objects, and any text within those objects. There is nothing else Javascript can do - you can't save a file to the server for downloading, you can't convert hypertext to PDF (at least not with any speed), and you can't properly capture a screen shot cause various browsers interpret CSS differently.
    See more | Go to post

    Leave a comment:


  • Taking a snapshot of the screen is impossible. Taking a snapshot of the browser window is technically also impossible. The nearest you could get is to parse your own HTML code. This could be sped up somewhat because the only areas that you need to change are the areas inside the form.
    BUT then changing this semi-predetermined image into a PDF file is the problem. Just to reiterate, until very recently only Adobe held the secret to encoding...
    See more | Go to post

    Leave a comment:


  • You might also want to check out http://code.google.com/apis/customsearch/docs/api.html
    See more | Go to post

    Leave a comment:


  • What you want to do, if I understand you correctly, is modify a preset PDF file at runtime to include form text. Or generate a PDF file using a client side script? Both of these are bad ideas. Option 1 is near impossible because of the way PDF compression works. Option 2 would take FOREVER. Both options would not allow you to download the file, rather only display the file.
    See more | Go to post

    Leave a comment:


  • larztheloser
    replied to Struts 2 and javascript...?
    Also could we see your adduploat function please?
    See more | Go to post

    Leave a comment:


  • larztheloser
    replied to window.onerror problem
    I think you need to apply that code to the external page, not the main page.
    See more | Go to post

    Leave a comment:


  • put your nokia, motorola etc links in an appropriate DIV layer. Make it initially hidden using CSS.

    In the <a> tag for mobile, add an onmouseover event and set it to "document.getEl ementById('divI D').style.visib ility='visible' ;". Do the same for onmouseout but make it "hidden" instead of visible. Replace divID with the ID of your div tag.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...