javascript debug who is blocking form submit [closed] - javascript

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 have a lot JS files in legacy project. Some JS code is blocking form submit, how I can find what JS events is listening form submit ?

Chrome actually has a great tool that is able to do this. Right-click on the submit button and open dev tools. Then go to event listeners in the sub tab from there you should be able to see the submit action. You can expand the action and view the source.

the comments are a good start, additionally search through all files for any reference to the forms name or id and if thats not enout for any code looping through all forms.
depending on the techniques used, e.g. jquery you might need to change your search like
document.getElementsByTagName("form")
$("form")
$("#ID_OF_FORM).submit
and so on... i guess best chances by using the ID of the form

You can also add event listener in Console Tab.
More in article below.
How to debug Front-end: Console

Related

Autoclicker in the browser using javascript based on attached css classes [closed]

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/

Get text from leave site alert using JavaScript? [closed]

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 3 years ago.
Improve this question
Is there any way to get the text from an alert in JavaScript?
Below I have attached the screenshot of an alert.
Actually I am trying to automate a website using selenium and java and selenium isn't able to handle such alert.
I wonder whether the JavaScript has solution to such alerts.
I am not aware of JavaScript syntax and code styling so posting only a question. Please excuse me for this.
driver.switchTo.alert().getText()
only works for if it is a JS alert,if it is browser alert then it doesn't work
ALERT EXAMPLE:
You should try this, with Selenium:
Alert alert = driver.switchTo().alert();
alert.getText();
The only way I know to do this within javascript is using the confirm popup. It has generic 'OK' and 'Cancel' buttons which I don't believe can be edited and is formatted according to the users web browser. To use the confirm method you write:
if (confirm("Do you really want to leave here?"){
//do whatever
}

Autofilling a different webpage with user input [closed]

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.

Oracle apex 5 - redirecting to page from a dynamic action [closed]

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 4 years ago.
Improve this question
I have a classic report where the last few columns are fa icons.
Using jQuerySelector i capture the "on click" event.
I do some calculations, and get back a number that I wanna pass to another page. I assign that number to a page item, that has an "on-change" event. Inside the event I have an "Execute JavaScript Code" containing the following:
var href = 'f?p=&APP_ID.:41:&SESSION.::::P41_ITEM:' + $("#P40_ITEM").val();
window.location = href;
Now... the thing that bothers me the most with this, is that I already have code like this inside a dynamic tree, that's used for navigation, and it works as expected. But this get's bypassed all together. I encapsulated the "Execute JavaScript Code" with two "Execute PL/SQL Code" blocks with logs, and both of them recorded in the logs. Also, when i had "Fire on Page Load" set to yes the redirect happens.
I also tried something like this, thinking there's some mysterious reason it won't execute js code:
owa_util.redirect_url('f?p=&APP_ID.:10:&APP_SESSION.');
apex_application.stop_apex_engine;
but this also doesn't work(can't even find if it's even suported in apex 5).
Does anyone know of a reason why this isn't working? Or another way to call a page redirect from a dynamic action?
tnx
You already answered your question with the comment
Or if there's a way to fake a request, so i can submit and initiate a branch?
In dynamic action that listens to change event create True action submit after Execute JavaScript Code.
If you have trouble doing it, recreate the scenario on apex.oracle.com. Provide login credentials and I will check what you are doing wrong.
Sorry for not replying sooner. All your answers are probably correct, but i didn't get the chance to use them - as soon as i read my own highlighted text :) i figured what i was doing wrong. I put some of the logic in dynamic events and some of it in branch/process.. so yeah.. that didn't work.. fixed that up and all was well..

customize choosing a tag feature [closed]

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

Categories

Resources