i am using react-calendly for embedded another website to my website (using InlineWidget react calendly ). i need to hide some fields like name, email on my webpage that are currently appearing from that ebedded url .please give some suggestion as i don't see any props in react-calendly.
You cannot hide the standard name and email fields from the Calendly booking page. Even if you are prefilling them from your website, the invitee has to confirm these details when booking, per current design.
Related
Currently I am developing an eCommerce platform with Node and React where the user has to fill in a form their shipment information + email and after they submit that information they receive the shipping cost calculation. The thing is I also want to display the submitted information on the webpage in case the user misspelled something and needs to edit the information. I will not use dangerouslySetInnerHtml for this I was more thinking of just rendering the state values of the input. Can I do that or am I enabling an XSS attack by displaying the users input on to the webpage?
From what I understand the values of the state variable will not be rendered as HTML and instead as a string. Therefore, I should be fine doing this?
You are correct. Provided that you are not using dangerouslySetInnerHtml, the content that was input by your users will render as text.
By using use dangerouslySetInnerHtm you will be putting yourself at risk of an XSS attack by displaying the user's input on the webpage, the best way as is to do the following:-
Render the data submitted by the user (shipment information) on a
page and put an edit button
When the edit button is clicked, the
data of the object that you want to edit will be accessed by ID
Render the data to a component that contains editable field and a
submit button which will be clicked once editing the data is done
I've got functionality on my website to share to twitter. It's just a simple Twitter Intent with some custom text. I'd now like to share an image with this text, not a link to the image, but the image itself like how they're shown in Twitter Cards. I'm at a loss of how to achieve this though.
I've got a web app that changes the data shown based on filters that the user engages. When they click the "share" button, I use PHP GD to generate an image using the current data shown. This image is saved on the server and the url is passed back to the javascript via ajax. Now I would like to open a "twitter share" dialog with my pre-filled text and this image. I have discovered that this is not possible with twitter intents because they don't allow images, only image urls (because actual images shown in tweets are pic.twitter.com images).
So I'm looking at Cards but it seems as though Cards are static. I was wondering if it's possible to make the card metadata dynamic by having a php file which has a hash (e.g. www.example.com/tweet.php?esd87fsduh) that is used to dynamically populate the twitter card meta tags? Or would this not work because it takes a long time for twitters bots to crawl the website again?
I basically want the simple functionality that the user clicks "tweet" and they are presented with the Twitter dialog showing dynamic text and the image based on the data filters they'd applied. Is this possible?
Thank you for your time.
url for LinkedIn advanced search: https://www.linkedin.com/vsearch/p?adv=true&trk=advsrch
I am trying to fill fields and hit the submit button on the LinkedIn advanced search page using Selenium (Python).
However, when I try to send keys to the fields that I would like to fill (ex. First Name), I get this error: ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with. I'm guessing this has to do with the toggle show/hide of the advanced search frame. I had thought the advanced search frame was by default visible, but it seems the Selenium Driver does not recognize this.
How would I make these "invisble" field and submit button elements visible?
I have tried:
using the Wait function to put a delay on the page.
running a script to make the div element holding the advanced search page
self.driver.execute_script("document.getElementById('advs').style.display='block'")
"clicking" on the toggle show/hide button for advanced search although I am not sure I did it correctly
self.driver.find_element_by_id("advs-link").click()
If you look at the submit button you can see that it is a GET request. So you could alternatively assemble from the input fields and values you want to fill in a URL with the parameters. The only tricky value would be the rsid but it can be found as "searchId" in the site.
Then when the URL for the GET request is there you can use Scrapy to call that URL as a Request and scrape the contents.
I have added a facebook button to my company's site so that people can quickly distribute surveys to users via facebook. It is a pretty simple JavaScript:
function SFace()
{
window.open("http://www.facebook.com/sharer/sharer.php?u=[[:SurveyUrl:]]","Facebook","width=700,height=300,toolbar=0,resizable=0");
}
<img src="http://www.snap-surveys.com/test/face.jpg" onClick="SFace()" />
It works fine, but people want a customized title to appear. So, I added &t=Something, however, when you click the link, it still just shows the long URL. I thought maybe it was because I wasn't using encodeURIComponent. So, I added a variable
var SFace="http://www.facebook.com/sharer/sharer.php?u=[[:SurveyUrl:]]&t=something"; document.write(encodeURIComponent(uri));
And then using that in the function. Same thing, shows the URL and not the title. What exactly am I doing wrong? How can I get it to show a custom title in the shared link?
In case anyone wanted to know my solution:
First needed to get an App ID from Facebook (get the developer's app, create a new app and set the URL as the base/common domain for the site with the button you are adding). Once you have the ID The URL is:
http://www.facebook.com/dialog/feedredirect_uri=THE_URL&app_id=YOUR_APP_ID&link=THE_URL_YOURE_LINKINGTO&name=TITLE_YOU_WANT_TO_DISPLAY
My recommendation is to write the full URL out like normal and create a variable with document.write(encodeURIComponent); like in my example above. This will add the appropriate spacing characters.
If the URL matches the URL listed in the App, you can have a share link with a custom title and can therefore use your own button and not the default Like button that facebook provides.
On Mouse-over i wish to show user information such as User Id, User Name, User Location, User Age etc. All this info would be coming from database. As well, this information would be in a rectangular block that would actually come-up on Mouse-over.
I am aware that JavaScript could be use to show div (in mouse-over) but don't know how to fetch from database?
Plus the application is a Windows Based Asp.net Application. I am not aware whether that could be possible in Windows based as i'm web based developer.
Thanks for all your inputs.
You could use the jQuery qtip plugin that can display dynamic content, see a documentation at
http://craigsworks.com/projects/qtip/docs/tutorials/#dynamic
and a demo at
http://craigsworks.com/projects/qtip/demos/content/loading
The url parameter should point at an aspx page that show the text that is loaded from database.