comunicate between 2 windows with javascript - javascript

Following problem:
I have one website which contains a huge number of data sheets, another website which contain a form to be filled out. I want to have a third windows, which contains a control script. The control script asks the user to enter the number of a datasheet, it then opens the datasheet from the website, reads the data and fills in the form on the second window. The user checks adds further information and clicks on the form to submit it.
Any idea if this is possible and if it is, how to achieve it ?
I now this is scross site scripting, but in this case it is, was the user needs
Thx a lot for any hint

What about window.postMessage? See: https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage

Related

HTML/JS - Asking the user to input a number, then displaying a different page on the same site based on the input

I'm using HTML, CSS and JS to build a website, the website has many functions and one important function is that i want to ask the user to manually enter a number from 1 to 40, then once the number is inputted the page changes to display a different page on the same website with information based on the inputted number. One way im thinking of doing is using a form then making the action be a switch statement for all 40 pages. But i'm struggling to find anything similar on Google or Youtube. And im unsure how to link the switch statement to my form, if that would even work. Any help would be appreciated!!
If you just want to redirect than you can add this line window.location.replace("<your link to page>"); in a function and call it when the user clicks the submit button. and make sure to pass the number to the page to process it. (this might be easier if you use php too, but won't be hard with javascript as far as i know)

How do I make specific inputs go into another .html file in the project?

I wanted to make specific inputs go into another part of a site (e.g. https://myexamplesite.com/anotherpartofit.html)
And also make those specific inputs be the ones that someone saved it in.
An example of what I think would work is: Get value from input 1 from /apartofit.html and put it in input 2 at /anotherpartofit.html and make it non-editable
If it needs to use a database, I would prefer if you could help me with firebase (Google's Database). But in my knowlege, it probably needs to use javascript, so I'll be tagging it, if it doesn't, let me know!
in visual studio or notepad or every offline web creating spaces you can't but if you buy a domain or simple , online site , you have to crate a page and get the link of that page then open another page create a button set the button's href to link of pervious page finally hit the button !

I am trying to do Element Control, Redirection and Form Submission Processing with WIX Code but I am unable to find a suitable method

I'm kind of a beginner to WIX Code. I have this site which I have made i.e www.rat-store.com. I am facing three problems which I know might get solved with some code but I don't know how to do it. Here are the problems:
In manual payment, I need to accept some form input from the user on a page and only if the user agrees to the terms and enters the correct date should the submit button get activated following which an otherwise collapsed image should also reveal (it's the QR code to make payment; Image 1) (www.rat-store.com/manual-pay-rat)
Image 1
I'm trying to link a repeater background to a page but it's not working. I have to create a button inside the repeater to do this. Any workarounds? I know an image will work but the thing is that the motive is to create a kind of a list which will keep on incrementing in the future and I can't just keep on drag-dropping images, text and then group them up and link. (Image 2) (www.rat-store.com/shop-by-events)
Image 2
Since WIX Stores doesn't have an inbuilt cancellation feature I built a form to substitute for the same but I want that no two same order cancellations are submitted i.e. a customer can only submit his/her cancellation request for a particular order number once. The next time s/he tries to do that it should show that the request already exists. (Image 3 and Image 4) (www.rat-store.com/cancel-orders)
Image 3
Image 4
Some help with the code and approach would really be great. I'm almost finished with my site; Only these last few things bother me. I'm attaching a screenshot of each page, serially w.r.t the question number. P.S: The order number is the number generated for each order by the Wix store app itself. I have nothing to do with that. The customer needs to enter his/her number and if that is valid we will process the request. Apologies for the length of the post.

Sending users to different sections of survey

So I just created a google forms survey and wondered if its possible to send the users to different sections.
I am looking for at way to direct half of the users directly to section 2 and have the other half only see section 1.
User 1: Sees only section 1
User 2: Sees only section 2
User 3: Sees only section 1
and so on
Is there a way to keep a counter in google scripts that that sends the users directly to a section depending on whenever its odd or even without having them answer any questions first?
On the form you can specify that after each of those sections, the form should be submitted instead of continuing on to the next section.
Then, you can get a pre-filled URL for each of the different users by:
Go to the form editor, and on the first page of the form, add a multiple choice question that has each different user as the options.
Then, check the box that says Go to page based on answer.
Next to the multiple choice options for each user, choose Go to page X, depending on which users should go to which sections.
In the menu, go to Responses > Get pre-filled URL.
For each user, select that user from the first multiple choice question and then click Submit.
In the new URL to share the pre-filled form, change viewform? to formResponse? and add &continue=continue to the end of the URL.
Repeat this for each of the different users and then give the users these new URLs for them to fill out the form.

Techniques to pass data from one open window to another open window (HTML)

I have two open webpages. The first one is a form, and the other one is list of products. What I want to do is when I click a product on the second webpage, the data (name, description etc.) will be send to the first page. The sent data will be posted on a textarea in the first page. Then the form will be send to email.
What are the ways to do this? I thought of storing data to cookies, but I don't know how the first page will detect if there will be new values for cookies. What are other possible ways to this?

Categories