Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a landing page with a list of articles. Users can open every article in a modal window. The problem is that in this way I don't have a possibility to share a link for a specific article. I am trying to find a solution similar to how facebooks newsfeed is working- when you open a picture in the newsfeed, the link is changing and you can copy this link and share it with anybody else.
My website is made on django (python) and it's using bootstrap for modal. I heard that the solution can be in using a JS framework like Angular or similar. Unfortunately I am not so familiarized with JavaScript. What solutions can I find for this issue?
Why don't you just make a separate page displaying individual articles? I know that you already had the modal but by sharing the url that displays the individual page url people could read what's being shared without other useless contents and also make your life easier. The unique identifier could be the article id or a slug.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
For a while now, i want to create an autoclicker for in the browser to click on specific buttons on a website. Since i am pretty familiar with javascript i want to use javascript to write the script. To clarify what i want, imagine a website with a list of items. Each of these items has a button with the content "add" and contains the css class "add-btn". What i want is a script that scans the code of the wanted website and searches for all buttons with the "add-btn" class attached to it. Then i want to trigger the click event for each of these buttons one by one. (If it is possible i want the browser minified and not opened while running the script).
I already did a lot of research on the internet and still haven't found a clear javascript tutorial to achieve my goal. Does anyone maybe have a link to a tutorial that matches my wishes? Or maybe a push in the right direction?
What you want is a headless browser, like PhantomJS or Zombie. PhantomJS is no longer maintained. Then you can navigate to the page and find buttons using css selectors, which you can then trigger click events on.
https://phantomjs.org/
http://zombie.js.org/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am trying to find out how I can make a program in JavaScript/HTML that takes a user's input and automatically enters this information onto a different web page. I am new to JavaScript/HTML so any help would be appreciated!
You specified the website as:
Supreme
Now, when you go to checkout, right click and click Inspect Elements. Then find all of the input fields on the website. For example, I found the Full Name input field. The field has a name: order[billing_name]
What you want to do next is in your URL do something like this:
https://www.supremenewyork.com/checkout?order[billing_name]=yourname
Now if you want multiple values (most likely) you need to find the names of the other fields and add the values to the URL, as so:
https://www.supremenewyork.com/checkout?order[billing_name]=yourname&order[email]=youremail
This way you can pass the values from your application and fill in the form on that website.
Hope this helps.
Use localstorage. see working demo in the link below;
Note: localStorage won't work in snippet; hence I made a fiddle.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
So I have an app user can create a tag, and choose a tag to post their stories. Everything works fine, but I want to change the way user choosing a tag to post stories. Right now, user has to scroll through the tag they want(more tags created, more scrolls user has to do)
What I'm trying to do is to display, some main tags I make to be inside box and user to be able click the tag that the tag to be chosen. It would be nice to make a search engine that user can type and the tag to be shown up that user can pick....but this seems too advanced for me now. (if you know how, please let me know)
the above is what I hope mine to be replaced to.
I'm not even sure which code I should touch to make this happen.
views.py?forms.py? or is this javascript?html file?
I think you are searching for Select2, there is a django package called django-select2
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've got a setup of HTML, PHP & jQuery. The steps I want the user to take are as follows:
Click a button
Modal Appears with dynamic data (taken from button markup, parent div etc.)
User Submits Modal & Close
I have two options. To:
Generate the HTML prior the user clicking the button. With PHP & Just hide it & then manipulate it with jquery once clicked.
Request the the HTML on click via Ajax using an API & again manipulate it with jQuery.
My question is. From the two options which would be the best for performance?
Reading through this and documenting my logic. I'd say that point 1. would be best as I'm not requesting a large amount of data through the API every time?
Can anyone see any advantages to number two? Apart from not requesting the data server side on page load?
Thanks.
I think the main question here is "how dynamic is the information used to produce that HTML ?".
If there isn't any high probability that the information used to produce that HTML could change at any time, then you should better off with 1st option, since therefore you will be avoiding an additional request to the server.
If the information used to produce that HTML could change at any time, that would be the reason to use the 2nd approach.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
http://www.advocotek.com/demo/enhancedv2/index.php?module=Accounts&action=EditView&return_module=Accounts&return_action=index
When you open the link, You see arrow icons , upon clicking one, a popup opens and lets you filter and select a record and drops the value for form's text field.
How can I accomplish this?
I am a python, django user and with a litle javascript knowledge. I need a plug and play way to use this across all form widgets, programatically.
thx.
The Django admin can do this already, wherever you have a ForeignKey field in the ModelForm the admin site will show the + button and popup selector functionality you want.
Here is an article about how to achieve the same thing in your own views outside the admin:
http://sontek.net/blog/detail/implementing-djangos-admin-interface-pop-ups
...author has released the code as a reusable Django app:
https://github.com/sontek/django-tekextensions
Here is another app which does more but also includes the functionality you're looking for:
https://django-autocomplete-light.readthedocs.org/en/latest/addanother.html