April 24, 2007, 10:36 AM
fnusending &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
LucasHere 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.
April 25, 2007, 07:31 AM
LucasBTW.........
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;
April 25, 2007, 08:22 AM
fnuLucas,
Thank you so much for your example! I will try it immediately! Awesome.
betty.