Click here to Skip to main content
15,886,362 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionProblem with Geolocation Pin
Member 146374312-Nov-19 10:48
Member 146374312-Nov-19 10:48 
AnswerRe: Problem with Geolocation Pin
A_Griffin2-Nov-19 11:23
A_Griffin2-Nov-19 11:23 
QuestionProblem with Geolocation Pin
Member 1463743128-Oct-19 13:50
Member 1463743128-Oct-19 13:50 
AnswerRe: Problem with Geolocation Pin
Nathan Minier29-Oct-19 1:31
professionalNathan Minier29-Oct-19 1:31 
GeneralRe: Problem with Geolocation Pin
Richard Deeming29-Oct-19 2:16
mveRichard Deeming29-Oct-19 2:16 
GeneralRe: Problem with Geolocation Pin
Nathan Minier29-Oct-19 2:46
professionalNathan Minier29-Oct-19 2:46 
AnswerRe: Problem with Geolocation Pin
A_Griffin2-Nov-19 8:00
A_Griffin2-Nov-19 8:00 
QuestionOpening an External URL Page in my Modal Dialog and capture some of the information that's being submitted to the parent React Pin
simpledeveloper23-Oct-19 12:29
simpledeveloper23-Oct-19 12:29 
Hi, I have a Component called Dashboard which is opening a modal dialog, what I want is, I want to open an external url like google.com in that modal dialog, what user enters in the search textbox I want to capture it into my parent Window or component, is that possible, if it is not from google.com, then some other url, is it possible using React JS/React native?
Here is Dashboard component code:
import React, { Component } from "react";
    import ReactDOM from "react-dom";
    import { Modal } from './Modal';
    
    class Dashboard extends React.Component {
        state = { show: false };

    showModal = () => {
        this.setState({ show: true });
    };

    hideModal = () => {
        this.setState({ show: false });
    };

    render() {
        return (
            <main>
                <h1>React Modal</h1>
                <Modal show={this.state.show} handleClose={this.hideModal}>
                    <p>Modal</p>
                    <p>Data</p>
                </Modal>
                <button type="button" onClick={this.showModal}>
                    open
        </button>
            </main>
        );
    }
    }    
    export default Dashboard;

Here is my Modal js code
import React, { Component } from "react";
    import './ModalSS.css';
    
    export const Modal = ({ handleClose, show, children }) => {
        const showHideClassName = show ? "modal display-block" : "modal display-none";
    return (
        <div className={showHideClassName}>
            <section className="modal-main">
                {children}
                <button onClick={handleClose}>close</button>
            </section>
        </div>
     );
    }

Here is my CSS:
body {
    }
    
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .modal-main {
        position: fixed;
        background: white;
        width: 80%;
        height: 80%;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
    }
    
    .display-block {
        display: block;
    }
    
    .display-none {
        display: none;
    }

Any idea how can I load a new external url in this modal and when user enters values and clicks on search or submit, it closes the modal and sends some of the information to the end parent component. Is it possible, if yes how can I do it - any help please - thanks in advance.
AnswerRe: Opening an External URL Page in my Modal Dialog and capture some of the information that's being submitted to the parent React Pin
jkirkerx24-Oct-19 12:35
professionaljkirkerx24-Oct-19 12:35 
GeneralRe: Opening an External URL Page in my Modal Dialog and capture some of the information that's being submitted to the parent React Pin
simpledeveloper24-Oct-19 13:23
simpledeveloper24-Oct-19 13:23 
QuestionCan ms blazor be next level of client-side coding Pin
simpledeveloper23-Oct-19 11:42
simpledeveloper23-Oct-19 11:42 
AnswerRe: Can ms blazor be next level of client-side coding Pin
jkirkerx24-Oct-19 12:00
professionaljkirkerx24-Oct-19 12:00 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper24-Oct-19 13:22
simpledeveloper24-Oct-19 13:22 
GeneralRe: Can ms blazor be next level of client-side coding Pin
jkirkerx25-Oct-19 10:53
professionaljkirkerx25-Oct-19 10:53 
AnswerRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 0:45
mvePete O'Hanlon5-Nov-19 0:45 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper5-Nov-19 6:09
simpledeveloper5-Nov-19 6:09 
GeneralRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 20:40
mvePete O'Hanlon5-Nov-19 20:40 
QuestionOpen base64 encoded pdf file using javascript Pin
Member 1286358021-Oct-19 4:16
Member 1286358021-Oct-19 4:16 
AnswerRe: Open base64 encoded pdf file using javascript Pin
jkirkerx21-Oct-19 12:22
professionaljkirkerx21-Oct-19 12:22 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Richard Deeming22-Oct-19 1:15
mveRichard Deeming22-Oct-19 1:15 
GeneralRe: Open base64 encoded pdf file using javascript Pin
jkirkerx24-Oct-19 12:18
professionaljkirkerx24-Oct-19 12:18 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Parth Munjpara22-Oct-19 23:11
Parth Munjpara22-Oct-19 23:11 
QuestionWant to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper17-Oct-19 13:27
simpledeveloper17-Oct-19 13:27 
AnswerRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx21-Oct-19 12:11
professionaljkirkerx21-Oct-19 12:11 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper21-Oct-19 13:16
simpledeveloper21-Oct-19 13:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.