I have a task: I have three switches, each of them allows the user to add or remove some parts of the pdf, so basicall customize the pdf output.
So far I understood, that I need to cache the params, for this purpose I'd need to transform those switches into a kind of a "real" form, so that the input can be cached. I am super new to this, I hope, I am getting it right so far.
Thing is, as I don't really know, what am I supposed to do here, I am looking for some help online, but wasn't successfull by just googling. Maybe there are some tipps or tutorials on that, or what's the best way to search for the stey-by-step form params caching? Thanks for any help!
Related
I am new to the community and I am in no way an advanced programmer. I am a support in a company and would like to make our job easy in any way I can. In regards to this, could you please help me with my problem?
I have created a link wherein I want to automatically disable a program, but to do so, all values must be present. And in order to do that, I have to inspect the elements of the page and include each item in the link I am making. Here is an example below.
(WEBSITE)frmTarget=PROGRAM&frmOption=EDIT&program_ident=xxxxx&status=D&labor_console_mode=D
With the link provided above, the labor_console_mode part is what I want to retain. Each program_ident has a different value when it comes to the labor_console_mode part; sometimes it has A value, sometimes it has C value. My question is, how do I retain the value of the labor_console_mode part without changing its value in the link and being able to submit the whole URL.
Let us say:
C=Scheduled
A=Auto
D=Disabled
Something like, labor_console_mode=selected is what I thought would work but it didn't. If I remove it from the equation, the page loads saying that the labor_console_mode is missing. It frustrates me as to why I cannot find any answers online or if I am wrongly searching for the phrase. Please help me. I would greatly appreciate any help I can get regarding this matter.
Thank you!
I've tried the TChromiumOSR and TPaintbox32,it works fine. However, but not all the screenshot of webpage, only the part.So maybe I need the width and the height of the webpage,but I can't find a way to get it.This is my method of solving the problem,could you give me the solution or is there any faster ways?
You could use html2canvas inside a your chromium instance. The user could choose a part of a openstreetmap and our application made the screenshot and stored it somewhere on the disk. The advantage with this approach is, that you allways get the hole page and not just with what you see. You could use the OnLoadEnd event, to put your javascript inside the page your are loading and then make the screenshot and save it somewhere. I'm sorry I cant provide any sourcecode, I dont have access to this project any more. The downside of this approach is, that you need some decent javascript skills, to pull this one off.
We are looking to implement User customizable backgrounds in our Rails 3 App. We want to add this facet to the settings page, and from there allow users to upload a JPEG or whatever image file extension it may be, and then make sure it is tiled to fit each Browser window.
How should we go about implementing something like this?
If including code from our repo would assist in gathering a solution, definitely let me know.
Thank you all for your valuable time.
You can make a get request from javascript for a rails resource that is said image and add this as the background-image() for the body. To get the non-public image, this should be useful: https://stackoverflow.com/a/8313398/1040358. To modify the css, this should be useful: https://stackoverflow.com/a/253710/1040358. Good luck! :)
I'm trying to create an ajax-driven gallery where each photo in a sequence is loaded with an Ajax.Actionlink.
The user can get to any given photo by passing a parameter to the action method, eg: Gallery/Index?photo=100
The problem is that when the user is cycling through photos with the Ajax.Actionlink's the URL is no longer being updated (the way it would be during normal post-backs) so they can't copy paste from the address bar to get back to a photo.
My question is: what is the best way to solve this issue in ASP.NET MVC? One thing I was thinking of was updating the address bar with hashtags, but frankly I don't know if this is a good approach.
I could use some best-practice advice on how to solve this problem. Any suggestions would be much appreciated, thank you.
If you really want to update the address bar with each ajax update there are a couple of jquery / javascript libraries you can use as described in this blog post: http://stephenwalther.com/archive/2010/04/08/jquery-asp-net-and-browser-history
However, the best practice solution is usually not to try and fake something like this (its only going to go wrong). If you want to give your users the ability to share or link to a photo is to provide a field with the appropriate url or permalink to the url that they can copy from. Google maps has a good example of this - if you wanted to share a map with someone else.
I would look into rewriting your routes to include the photo ID in the path.
E.g., /Gallery/Index/100 instead of ?photo=100. This would be why your ActionLink methods aren't working how they should, as the querystring isn't part of the route.
I am unlucky to be in charge of maintaining some old Yahoo! Store built using their RTML-based platform.
Recently I've noticed that HTML code generated by some RTML functions is sprinkled all over with "padding images" (or whatever is the conventional name for those 1x1 pixel images used to enforce layout). I have nothing against using such images, but... all those images are supplied with an ALT attribute like this:
<img href="http://.../image1x1.gif" alt="pad">
With all due respect to the original authors of RTML, but they must have been smoking something when they came up with this "accessibility enhancement"... :-(
Anyway, here are my questions:
Does anybody know a list of all RTML functions that generate HTML with all these "pad" images?
Is there any way to get rid of all those alt="pad" attributes without rewriting a lot of RTML code?
NB: This may sound a little cynical, but improved accessibility is not the main goal here. The main goal is to stop exposing those moronic alt="pad" attributes to Google and other smart search engines. So client-side scripting is not going to help, as far as I know.
Thank you!
P.S. Probably, most of you are really lucky and never heard of RTML. Because if somebody would establish a prize for software products based on
commercial success
------------------
usability
ratio, this RTML-based "platform" would probably win the first place.
P.P.S. Apparently someone from Yahoo! finally listened, because I can no longer find those silly "pad" tags in the RTML generated for our store. Nevertheless, one of the ideas offered in response to my original question does provide a very practical solution - not just to the original problem but to any similar problem with RTML platform. See the winning answer - it's really good.
The only way I see is to have your own website front-end that will filter whatever you want from the RTML site....
for example, your rtml site is at http://rtmlusglysite.yahoo.com/store/XYZ01134 , you could host a simple PHP front-end at http:://www.example.com that would be acting like a "filtering" HTTP web proxy, so http://rtmlusglysite.yahoo.com/store/XYZ01134/item1234.rtml would be accessed by http://www.example.com/item1234.html
It's not an ideal solution, but it should work, and you could do some more fancy stuff.
Nice try from the other posters, but there is a very simple RTML command that will do it. . .
TEXT PAT-SUBST s GRAB
MULTI
HEAD
BODY
TEXT #var-with-alt-tag-equals-pad-in-it
frompat "alt=\"pad\""
topat ""
The above RTML will find all instances of alt="pad" and replace it with nothing.
Well you're right on RTML being relatively untraveled :)
Do you have a way to add your own attributes to these images tags? If so, would it be possible to override the alt attribute? If you specify alt="", I would think that would override Yahoo's... Otherwise consider putting a useful alt tag in there for the blind and dialup types.
It's the first time I'm hearing about this platform, but here is an idea: if you can add javascript to the pages, you could write a function that will run after the page has loaded and remove all the alt="pad" attributes from the page.
Unfortunately this solutions works only with browsers that know about scripting, so lynx or some other text based browsers might not support it.
I have shared a link official RTML guide from yahoo. Hope it will help. Thanks!
List of available RTML books and resources