Focal Point
sending &variable in HTML thru push-buttons

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7021029422

April 24, 2007, 10:36 AM
fnu
sending &variable in HTML thru push-buttons
I messed up the posting thread on my last question. I added HTML code to my reply and now I can't edit it nor delete it. So, I'm starting a new one.

I'm trying to pass an &var in an HTML. with no forms and the report is submitted via [xml] [request].

If anyone has some example code that can be put into an ONCLICK, that would be most helpful.
April 25, 2007, 07:19 AM
Lucas
Here is an example using Javascript to send a varible.
<html>
<head>
<script>


//THIS FUNCTION SENDS YOUR VARIBLE passed to it from the onClick in the
//in the input tag. Change the word WebFocus to a word of your choice and
//you will have a google search on that word.

function sendVarible(Vari)
{
var sendUrl = "http://www.google.com/search?hl=en&q=" +Vari;
window.open(sendUrl);
}
</script>
</head>
<body>


<input type=button name='someButton' value='Click Me' onClick='sendVarible("WebFocus");'>

</body>
</html>


Cut and paste this into an Html file to test it out.


7.6.6 Mainframe
7.6.4 Web Focus
Windows

April 25, 2007, 07:31 AM
Lucas
BTW.........
You will need to change the letter q in the sending url to the name of your varible you are passing to WebFocus.

http://www.google.com/search?hl=en&q=" +Vari;


7.6.6 Mainframe
7.6.4 Web Focus
Windows

April 25, 2007, 08:22 AM
fnu
Lucas,
Thank you so much for your example! I will try it immediately! Awesome.

betty.