I have an interesting situation where I am trying to render a link which could be a URL to a site or a mailTo tag.
The issue is that when I put any spaces in the subject field these get converted into %20's when I save the link then the link doesn't get pulled into the rendering at all (it just returns null in the view).
Interestingly if I manually remove the %20's after I save the link (this can be done in the page editor) the link comes through fine!
Now if I save and publish the link returns null but if I manually edit and remove the %20 GlassMapper grabs the link fine.
Any ideas why GlassMapper wont get the link when there is %20's in there?
Related
I have installed my application and it is running on following URL
http://localhost:3000
Above URL will the load form with some fields, Then I will the fill the data in the required field and then submit form. My div element will displayed at the bottom of the page. Picture will be displayed inside the iframe with in the div element.
User will the above URL and then submit form. After submitting the form, Picture should be downloaded into their local machine.
Right I am calling the following line after form submission, how can I get the existing page into the browser object and download screenshot?
browser = Watir::Browser.new
b.div(:id => "phone_shell").screenshot("/home/user/Documents/preview.png")
I found few problems in your code
screenshot method is not available for element object, it's available for browser object and also you need to call the method save to save the file in the destination folder. So write the following code, it would work.
Code to get the html of the page
b.html
Code to take the screenshot
b.screenshot.save("/home/user/Documents/preview.png")
Now this will save the image in the destination folder.
I noticed that with a URL of the format
facebook.com/username/timeline/2013/4
we move to the end of the specified month of the year.
Now I need to use an url to navigate a user in my timeline to a specific post (facebookID) in a way that he can still move up and down on timeline from this point of time (anchor).
Any clues?
On a Facebook page, each post's HTML element has its own unique HTML id.
You can make use of this fact to directly link to a post within a page on Facebook by identifying the post's id and using it as the fragment identifier in the URL.
To find a post's HTML element id, right click the particular post in your browser [I'm assuming Chrome], then click "inspect element". In the opened development environment, find an enclosing div of the inspected element which contains an id HTML attribute.
For example, a link to a particular post on Disney's March 2013 Facebook timeline is the following:
https://www.facebook.com/Disney/timeline/2013/02/#tl_unit_6154529015953642023
I've become dumbfounded by this. This might be something that I've just assumed worked all along, but in fact has never worked.
I've got an anchor link on a page [Activities] and later on the page I have the anchor <a name="activities"></a>. This is the URL of the page: https://iassid.org/index.php?option=com_content&id=216
For some reason, the anchor link on the page brings the user back to https://iassid.org/index.php#activities
Has removing the query string always been normal behavior? The href in the anchor tag doesn't include anything but the hash, why would it even assume to go off the page? Why does it go back to the original URL without the query string? Is there any way to get this to work without putting the entire URL including the query string in the URL as well? I'm trying to make this easy for someone who isn't very familiar with HTML, so using onclick events and other options aren't desired.
Maybe I've just been crazy to assume this would work all along! Thanks for any insights.
This is a stupidly easy question, however after searching for a long time I have yet to yield any results.
My question is as follows.
I have a webpage with the url http://domain.com/mypage/ladeda/
I have a link on this page.
Page 1
That link sends me to http://domain.com/1/
Page 1
That link takes me to http://domain.com/mypage/1/
How do i get my link to take me to http://domain.com/mypage/ladeda/1/
without having to extract all the aspects of the page url and put them within the href.
Many Thanks
<base href="/mypage/ladeda/" />
...
(goes to http://domain.com/mypage/ladeda/1/)
Via the <base> element.
But!
Page 1 should take you to http://domain.com/mypage/ladeda/1/ already provided that (a) you don't use a <base> element already and (b) the current resource is really http://domain.com/mypage/ladeda/ (with a trailing slash).
Page 1
If the current page isn't in the same directory (real or virtual) as the target page, you're going to have to specify a complete path. Either relative, or absolute. There's no way around it.
Say I have this url "/my#stuff"
I am using asp.net mvc and when I try to goto this page it takes me to just "/my". The "#stuff" part has been removed.
Now I can get it to work fine if I encode the URL like so "/my%23stuff" since %23 decodes to #
However, is there a way I can get this to work without having to encode the url?
I'd like it if typing in "/my#stuff" as the URL worked just the same as "my%23stuff"
I don't think there is a way to do what you are saying. The hash is used in a URL for anchor tags.
You are pointing at a page /my and navigating to anchor tag "stuff" on that page. If anchor tag "stuff" does not exist it will just navigate to page /my.