0

Button issues

My issue is in the tab view of my app, I have buttons using three different situations and all generate the same error

"ReferenceError: Can't find variable: openmail"

I place the javascript directly into the view html file. I even tried to check to see if the function is applicable

if(openmail.Mail.compose)
that half of a conditional returned the same error

These are the buttons code

<button onclick="openmail.Mail.compose({to: 'joe@joe.joe', subject: 'hi joe',body: document.getElementById('msgbody').value})">Compose 2</button> main1.html:303ReferenceError: Can't find variable: openmail

<button onclick="openmail.Mail.compose({ to: 'joe@joe.joe', subject: 'hi joe', body:'example content' })">Compose 3</button> main1.html:317ReferenceError: Can't find variable: openmail  
I must need a js file for the openmail class. I thought it would run embedded into the app. I am running safari, could that be the problem? I am going to try to make a new application every wee

by
2 Replies
  • here is my button code

    <script>
    <button onclick="openmail.Mail.compose({to: 'joe@joe.joe', subject: 'hi joe',body: document.getElementById('msgbody').value})">Compose 2</button> main1.html:303ReferenceError: Can't find variable: openmail

    <button onclick="openmail.Mail.compose({ to: 'joe@joe.joe', subject: 'hi joe', body:'example content' })">Compose 3</button> main1.html:317ReferenceError: Can't find variable: openmail</script>

    QUOTE (Houyhnhnm @ 25 Dec 2011 9:19 AM) My issue is in the tab view of my app, I have buttons using three different situations and all generate the same error

    "ReferenceError: Can't find variable: openmail"

    I place the javascript directly into the view html file. I even tried to check to see if the function is applicable

    if(openmail.Mail.compose)
    that half of a conditional returned the same error

    These are the buttons code

    main1.html:303ReferenceError: Can't find variable: openmail

    main1.html:317ReferenceError: Can't find variable: openmail  
    I must need a js file for the openmail class. I thought it would run embedded into the app. I am running safari, could that be the problem? I am going to try to make a new application every wee
    0
  • Does your view's HEAD section pull in om-min with a script tag?  If you're already doing that and the below doesn't work, you might try adding click handlers using YUI 3, e.g. "Y.on('click', . . .)".

    -j

    QUOTE (Houyhnhnm @ 25 Dec 2011 9:21 AM) here is my button code



    QUOTE (Houyhnhnm @ 25 Dec 2011 9:19 AM) My issue is in the tab view of my app, I have buttons using three different situations and all generate the same error

    "ReferenceError: Can't find variable: openmail"

    I place the javascript directly into the view html file. I even tried to check to see if the function is applicable

    if(openmail.Mail.compose)
    that half of a conditional returned the same error

    These are the buttons code

    main1.html:303ReferenceError: Can't find variable: openmail

    main1.html:317ReferenceError: Can't find variable: openmail  
    I must need a js file for the openmail class. I thought it would run embedded into the app. I am running safari, could that be the problem? I am going to try to make a new application every wee
    0
This forum is locked.

Recent Posts

in Yahoo! Mail Application Platform