Jump to content

Help with onchange programming for required dropdown


Recommended Posts

Someone please help me -- this is driving me crazy! I keep getting errors, simplifying my code, getting more errors, etc... So now I'm down to this barebones code in the footer:

document.getElementById("InsertRecordLoanPurpose").onchange= alert('ok');

/*

(doesn't matter, commented out...)

*/

I get one 'ok' alert when the page loads, then a "not implemented" error on line 416:

document.getElementById("InsertRecordLoanPurpose").onchange= alert('ok');

Has something gone out of scope somehow?

Here is the URL of the problem page: http://b3.caspio.com/dp.asp?AppKey=77e7 ... b8e4j6a7c0

Thanks!

Link to comment
Share on other sites

Thanks for the reply. I get the following error with that code:

Message: Expected '('

Line: 416

Char: 71

Code: 0

URI: http://b3.caspio.com/dp.asp?AppKey=77e7 ... b8e4j6a7c0

I would expect that "function" would be a keyword to declare a new function. Maybe with a capital "F"? I'm trying all sorts of stuff.

Thanks for the help!

Link to comment
Share on other sites

Wow, this works!

document.getElementById("InsertRecordLoanPurpose").onchange= flipFlags;

function flipFlags()

{

alert('ok');

}

And for the event handler, "flipFlags" must be minus the parentheses. So it looks like parameter passing is out. Maybe. But who cares?? I can code around that. This thing has been giving me fits!

Thanks for the input, Jona :-)

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...