If you have ever played with jeditable, eventually you will get to this issue, which is dealing with the textarea. The Textile renderer on the official jeditable demo page works perfectly fine, but when I tried it I experienced quite some difficulty.
Basically the text I enter would NOT be what I see after pressing the ok button, due to the html rendering of the newline character. I found a lot of people sharing their pain all over the internet:
After quite some time hacking around (especially on that demo page and its source), I finally got it working that way it’s supposed to be. Here is my solution.
First, your save and load scripts should be doing what they have been doing. No change at all. Just make sure you have clean data in the database.
Second, call a string replace function to change all substring “\n” to “<br>\n”. If you are using php, then below is the code. It will make sure you will have good initial values rendered correctly by your browser.
After much research, at least at this point there is no way to include html tags in the mailto body. If a particular email client plays nice then you are in luck, otherwise there is no standard, or cross email client way to include html tags in the mailto body.
During my research (just googling around…), I found this nice tool that can help construct the mailto link. You simply need to fill in the to, cc, subject, and body, then the mailto link will be generated for you. Check it out at http://jscode.com/generators/mailto_generator.shtml
Sometimes people prefer to use their own email client application to add their own styling. That’s when we will need to pass the relevant email content to the email client. It’s simple enough so I won’t explain much. Here I am passing the email info from php to javascript.
$email_to = "johnsmith@somewhere.com";
$email_subject = "some email subject";
$email_body = "some long text, will need to escape this.";
//$email_body = urlencode($email_body); // not this one, empty spaces will turn into +'s
$email_body = rawurlencode($email_body); // this will encode correctly
$email_url = "mailto:$email_to?Subject=$email_subject&Body=$email_body";
$('.editable').editable('http://www.example.com/save.php', {
data : " {'E':'Letter E','F':'Letter F','G':'Letter G', 'selected':'F'}",
type : 'select',
submit : 'OK'
});
To take away that OK button, just take out that “submit” attribute. Magically, after picking a value from the dropdown the value gets updated. Kudos to the contributor who enabled this feature.
I have been playing with qTip2 for a bit. Once you figure out the code to popup a tooltip, the next thing you think about is probably styling.
I was looking for ways to set the background color from the default white to something else. If you give your qTip2′ed content, say a div, the background color yellow, you will still see white padding around your div.
To take away that white border or padding, Have the following styling.
If you ever shop for cheap air tickets, I would highly recommend you to watch the full video. You really need to know who are the people who are actually flying your plane.
http://www.pbs.org/frontline/flyingcheap/ In this revealing sneak peek from “Flying Cheap,” FRONTLINE provides glimpse into the lives of regional airline pilots—from low pay and long hours to nights in cramped “crash pads.” “Flying Cheap” airs Tuesday, Feb. 9 at 9PM on PBS (check local listings).
One year after the deadliest domestic airline accident in seven years, FRONTLINE investigates the crash of Continental 3407 in Buffalo, NY, and discovers a dramatically changed airline industry, where regional carriers now account for half of the nation’s daily departures. The rise of the regionals and arrival of low-cost carriers have been a huge boon to consumers, and the industry insists that the skies remain safe. But many insiders are worried that now, thirty years after airline deregulation, the aviation system is being stretched beyond its capacity to deliver service that is both cheap and safe.