dom

load a php file into a popup and post php variable to that popup (using onclick)

老子叫甜甜 提交于 2021-02-08 06:50:56
问题 I am trying to post the $GLABALS variable to another php file and get it to open in a popup and load the printOnly.php file with the value of the $GLOBLAS variable (which passes the name of the xml file used by $dom. Currently it opens the popup but cannot find the value of the variable posted but it also loads the variable into the existing navigator window where the value of the posted variable is retrieved without a problem. I want the main window to stay on the original php page and only

load a php file into a popup and post php variable to that popup (using onclick)

雨燕双飞 提交于 2021-02-08 06:50:02
问题 I am trying to post the $GLABALS variable to another php file and get it to open in a popup and load the printOnly.php file with the value of the $GLOBLAS variable (which passes the name of the xml file used by $dom. Currently it opens the popup but cannot find the value of the variable posted but it also loads the variable into the existing navigator window where the value of the posted variable is retrieved without a problem. I want the main window to stay on the original php page and only

pointer to variable in JavaScript

和自甴很熟 提交于 2021-02-08 05:10:46
问题 Is there any way to create\return a pointer to variable in JavaScript ? like, in PHP : function func() { ..... return &$result; } I have a JS function like: function(...) { x=document.getElements..... //x is HTML tag if (x.localName=='input') return x.value //String variable else if (x.localName=='textarea') return x.innerHTML //String variable } Using this function, I can get a copy of the data from x, but not to change the source. I want possibility to change it too. Thanks 回答1: Hej Dani-Br

pointer to variable in JavaScript

人走茶凉 提交于 2021-02-08 05:09:57
问题 Is there any way to create\return a pointer to variable in JavaScript ? like, in PHP : function func() { ..... return &$result; } I have a JS function like: function(...) { x=document.getElements..... //x is HTML tag if (x.localName=='input') return x.value //String variable else if (x.localName=='textarea') return x.innerHTML //String variable } Using this function, I can get a copy of the data from x, but not to change the source. I want possibility to change it too. Thanks 回答1: Hej Dani-Br

Send simple HTTP request with HTML submit button

眉间皱痕 提交于 2021-02-07 18:40:18
问题 I have added a submit button to the index.html page that resides on my server side <form method="get" action="/start"> <h5>Start Ad-Placer!</h5> <input type="submit" value="Start"> </form> I need the button to simply send a http request to http://127.0.0.1:8484/get/start to start some process. Then once the process is done after a few seconds, I need to simply display an alert message with the response message, acknowledging it is done. How can I do that with minimum efforts (without using

How can I unit test an event listener on an input field?

南楼画角 提交于 2021-02-07 14:30:35
问题 In the simplest test possible, I'm attempting to test the following function: addPercentSign: function (oEvent, control) { var inputVal = oEvent.getParameters().value; var inputNumber = parseFloat(inputVal); if (inputNumber) { if (inputNumber < 50 || inputNumber > 100) { //see learningCurveFormatCheck return null; } else { var finalVal = inputNumber.toFixed(1); var finalOutput = finalVal + "%"; control.learningCurve.setValue(finalOutput); return finalOutput; }; } } The above function is an

XML parser written in pure javascript for embedded environments [closed]

南楼画角 提交于 2021-02-07 14:19:27
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Improve this question I'm looking for a parser which can run in a javascript environment where there is no access to document , DOMParser or any other browser extension. The javascript application can run in browsers (IE, Firefox, Chrome, Safari...) in node.js but it is destined to run

XML parser written in pure javascript for embedded environments [closed]

那年仲夏 提交于 2021-02-07 14:19:05
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Improve this question I'm looking for a parser which can run in a javascript environment where there is no access to document , DOMParser or any other browser extension. The javascript application can run in browsers (IE, Firefox, Chrome, Safari...) in node.js but it is destined to run

Apple iOS browsers randomly won't render HTML objects loaded dynamically

蓝咒 提交于 2021-02-07 13:24:42
问题 We have a problem that is only evident on iOS browsers (iOS 12.0) with our SPA application that uses HTML object tags to load widgets (HTML/CSS/JS files) through JavaScript onto the page. The issue is an intermittent one when the page is loaded some of the widgets don't display/render on the screen, yet are loaded into the DOM and can be viewed/highlighted with full element properties in the Safari Web Inspector. but are “invisible” to their user. The problem will occur about 50% of the time

How do I parse a large XML file using Java?

穿精又带淫゛_ 提交于 2021-02-07 10:50:15
问题 I am trying to parse an XML file using Java. The XML file size is 256 kb only. I am using a DOM parser to parse the XML file. How can I parse the large XML file content? Here's the method that parses the file content: public Document parse_a_string(StringBuffer decodedFile) { Document doc1 = null; try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder db = factory.newDocumentBuilder(); InputSource inStream = new InputSource(); // problem here inStream