Jump to content
CMorris

Passing parameters to Javascript on change

Recommended Posts

Hi, I am a beginner to Caspio and scripting.  I have a datapage that is embedded into the HTML on my site.  I have the datapage set to conditionally format/hide certain sections of the page based on user input.  That is all working perfectly.  However, the first option on my datapage is a dropdown with 2 choices.  I would like to pass a parameter from that dropdown to conditionally change an image on the webpage where the datapage is embedded.  So, for example:

User chooses option "A" from the dropdown on the datapage and the image on the page where the datapage is embeded becomes a picture of an apple

User chooses option "B" from the dropdown on the datapage and the image on the page where the datapage is embeded becomes a picture of a banana

I have found examples on line of scripts that will change an image based on the output of a dropdown, but the dropdown and the image are both part of the same source (if that makes sense).  In my case, my dropdown is in Caspio, but the image isn't.  I know this needs to be done with Javascript and I know I can pass parameters from Caspio "on exit", but can I pass them "on change"?  If so, how do I do that?

Share this post


Link to post
Share on other sites

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...