This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using a button, pass data from the screen to a website.

I would like to know how to take something from the screen, say line # 3 from positions 31-39 and pass that to a website with a button.  I created the button and directed it to go to the website; which works; but I want to pass data from the screen to it.

Labels:

Rumba
  • 0  

    Hi Diane,
    which approach did you take to create the button? ( VBA Rumba Script Engine (*.csf) ? , the VBA Addon ? Or Plus UI modernization ?)
    What Rumba version are you using.

    With the Plus-Feature in Rumba it can be achieved without coding.

    Screen designer view:

    Result in Rumba: On Button click the standard browser will open with the configured url, the value commes from the colloector control.

    cheers

    andree

  • 0 in reply to   

    Thank you so much for your response  .Actually I have already solved it like you stated above.  In Rumba+ screen designer,  I created a collector over the data, gave it a name, added the website with the name collector to the the button and voila, it worked. 

  • 0

    The thing to understand is that POST/GET are ways to send data around between webpages of a  website -- between the browser and the server. The process of sending the data around can be triggered by HTML (an <a> link), Javascript (a function that calls a URL or triggers that a FORM get submitted), or FORM elements like <input type="submit" />.

    I'm not intending any offense, but the way you asked your question makes me think that you're not trying to figure out different formats to transfer the data to the receiving page (as other posters discuss), and figuring out how to parse cookie values or iterate through your form fields to create a query string would be really challenging.

    So here are some options:

    1. If your form was already using Javascript to submit the form (cases 1, 2, or 3 above), you just add the same onclick part to an HTML link:

      Save my data

    The function submitMyForm might look something like this:

    function submitMyForm() {
      // Get the form object -- you can also do this with the document.form array
      var myForm = document.getElementById( 'userdata' );
      // use the submit method of the form object
      myForm.submit();
    
    }
    

    So in summary, you'll add a javascript behavior ("event handler") to a normal HTML anchor link. One note -- in general, users expect the rule "links go places, buttons do things". It's not a hard and fast rule, but people generally are happier when a button is used for things like submitting form data.