Click here to Skip to main content
15,794,795 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionXML NodeList Java object showing null in Nashorn Javascript Pin
shampoo7224-Oct-20 10:40
shampoo7224-Oct-20 10:40 
AnswerRe: XML NodeList Java object showing null in Nashorn Javascript Pin
Richard MacCutchan24-Oct-20 22:59
mveRichard MacCutchan24-Oct-20 22:59 
GeneralRe: XML NodeList Java object showing null in Nashorn Javascript Pin
shampoo7225-Oct-20 7:04
shampoo7225-Oct-20 7:04 
GeneralRe: XML NodeList Java object showing null in Nashorn Javascript Pin
Richard MacCutchan25-Oct-20 7:14
mveRichard MacCutchan25-Oct-20 7:14 
AnswerRe: XML NodeList Java object showing null in Nashorn Javascript Pin
shampoo7225-Oct-20 17:36
shampoo7225-Oct-20 17:36 
QuestionGetting a video webm from client to server Pin
Rayj201023-Oct-20 10:58
Rayj201023-Oct-20 10:58 
Questionimport declarations may only appear at top level of a module Pin
jkirkerx19-Oct-20 10:38
professionaljkirkerx19-Oct-20 10:38 
AnswerRe: import declarations may only appear at top level of a module Pin
jkirkerx19-Oct-20 11:16
professionaljkirkerx19-Oct-20 11:16 
Got it to work

module literately meant module.
So instead of type="javascript", it's type="module"

my file remains the same
export class UndefinedValue {

    projectNumber;
    variableContingencyValue;
    actualCost;
    varibleContingencyCost;
    actualPlusContingencyCost;

}

export function writeUndefinedValue(projectNumber, variConRate, actualCost, variConCost, actualPlusCost) {

    let uVo = new UndefinedValue();
    uVo.projectNumber = projectNumber;
    uVo.variableContingencyValue = variConRate;
    uVo.actualCost = actualCost;
    uVo.varibleContingencyCost = variConCost;
    uVo.actualPlusContingencyCost = actualPlusCost;

    localStorage.setItem('undefinedValue', JSON.stringify(uVo));
}

export function readUndefinedValue(projectNumber) {

    let uVo = JSON.Parse(localStorage.getItem('undefinedValue'));
    if (uVo !== undefined || uVo !== null) {
        return uVo;
    }
    return null;

}
But the script ended up like this
// Script to write the Undefined Value to Local Storage
// 10/19/2020 - jkirkerx
// I don't like doing this, but it's clean and avoids the issues with PHP and Frames
// MSRP.phtml can just read the local storage and match the project number
echo "
<script type='module' scr='./source/js_undefinedValue.js'></script>
<script language='JavaScript' type='module'>
    import { readUndefinedValue, writeUndefinedValue, UndefinedValue } from './source/js_undefinedValue.js';
    writeUndefinedValue (
        $sess_proj_no, 
        $vari_contingency_rate, 
        $actual_cost, 
        $vari_contingency_cost, 
        $actualPlusContingency_cost
    );

</script>";

So far no complaints from the browser, the console is clean and I got a clean write of the class in string format in local storage.
If it ain't broke don't fix it
Discover my world at jkirkerx.com

QuestionGetting a textbox in another frame Pin
jkirkerx18-Oct-20 13:18
professionaljkirkerx18-Oct-20 13:18 
Answer[abandon] the idea Pin
jkirkerx19-Oct-20 10:29
professionaljkirkerx19-Oct-20 10:29 
AnswerRe: Getting a textbox in another frame Pin
DerekT-P19-Oct-20 10:46
professionalDerekT-P19-Oct-20 10:46 
GeneralRe: Getting a textbox in another frame Pin
jkirkerx19-Oct-20 11:12
professionaljkirkerx19-Oct-20 11:12 
QuestionVirtual populate in JS Pin
adids122123-Sep-20 2:38
adids122123-Sep-20 2:38 
QuestionSetting max length property of masked input control in ember js Pin
simpledeveloper22-Sep-20 6:45
simpledeveloper22-Sep-20 6:45 
AnswerRe: Setting max length property of masked input control in ember js Pin
ZurdoDev22-Sep-20 7:07
professionalZurdoDev22-Sep-20 7:07 
QuestionNeed to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper9-Sep-20 11:02
simpledeveloper9-Sep-20 11:02 
AnswerRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB11-Sep-20 9:59
W Balboos, GHB11-Sep-20 9:59 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper21-Sep-20 9:14
simpledeveloper21-Sep-20 9:14 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB21-Sep-20 10:07
W Balboos, GHB21-Sep-20 10:07 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper21-Sep-20 10:28
simpledeveloper21-Sep-20 10:28 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB22-Sep-20 3:27
W Balboos, GHB22-Sep-20 3:27 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper22-Sep-20 6:47
simpledeveloper22-Sep-20 6:47 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB22-Sep-20 6:53
W Balboos, GHB22-Sep-20 6:53 
GeneralPixelated in javascript Pin
Hasan Moussawi8-Sep-20 21:52
Hasan Moussawi8-Sep-20 21:52 
QuestionI have HTML and jQuery as below, I want to convert that into EmberJS Pin
simpledeveloper8-Sep-20 10:44
simpledeveloper8-Sep-20 10:44 

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.